this post was submitted on 17 Aug 2023
974 points (90.9% liked)

Programmer Humor

32000 readers
1744 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 32 points 1 year ago* (last edited 1 year ago) (8 children)

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.

[–] [email protected] 12 points 1 year ago (7 children)

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.

[–] [email protected] 21 points 1 year ago (5 children)

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.

[–] [email protected] 2 points 1 year ago (1 children)

Forewarning : ops here, I'm one of the few the bosses come to when the "quick code" in production goes sideways and the associated service goes down.

soapbox mode on

Pardon my french but that's a connerie.

Poorly written code, however fast it has been delivered, will translate ultimately into a range of problems going from customer insatisfaction to complete service outage, a spectrum of issues far more damageable than a late arrival on the market. I'd add that "quick and dirty code" is never "quick and dirty code with relevant, automated, test coverage", increasing the likelihood off aforementioned failures, the breadth of their impact and the difficulty to fix them.

Coincidentally , any news about yet another code-pissing LLM bothers me a tad, given that code-monkeys using such atrocities wouldn't know poorly written code from a shopping list to begin with, thus will never be able to maintain the produced gibberish.

load more comments (3 replies)
load more comments (4 replies)
load more comments (4 replies)