Legacy code:
-
that’s a fallback from the 80ies…
-
this gets never executed…
-
yet another undefined variable…
-
ohh, that’s clever!
- Jeffery wtf is this?
- ok so why didn’t we remove this from the codebase!?
- define the variable please I’m begging for just a smidge of readability!!! … Oh that’s actually remarkably clever
-
People that use “code” in its plural form really grind my gears
Often when I ask “why” too many times, it’s because the coder chose the most convoluted approach to the problem.
Like when someone inherited an entire class just to access a single method, but it turned out he actually didn’t need that method, so he added an extra if statement in that method and a Boolean flag so it can do the thing he actually wanted.
And this was someone who consider himself a senior programmer.
I’ve been tasked with updating some code a senior programmer (15+ years experience, internally awarded, widely considered fantastic) who recently left the company wrote.
It’s supposed to be a REST service. None of the API endpoints obey restful principles, the controller layer houses all of the business logic, and repositories are all labeled as services–and that’s before we even get into the code itself. Genuinely astounding what passes for senior-level programming expertise.
In many cases, getting something out quickly is more valuable than having it be clean.
Part of being a senior is knowing when fast is more important than perfect. Not saying your senior did everything right, just that a single example of someone’s code isn’t enough to judge the value of a person to an organization.
Man this sub just isnt funny
So post something funny. Or just post something. Sitting in the back yelling “this sucks” isn’t going to help.