482
top 21 comments
sorted by: hot top controversial new old
[-] DarkFox@pawb.social 14 points 2 days ago* (last edited 2 days ago)
// 8 attempts have been made to clean up this code.
// A total of 47 hours have been wasted here. 
// Update the counters after your attempt.
[-] Gumbyyy@lemmy.world 4 points 2 days ago

Hi it's me, your colleague

[-] tyo_ukko@sopuli.xyz 2 points 1 day ago

Hi colleague! So I found a comment in the code from 3 years ago by you saying you should "improve this". Is it planned for the next sprint?

[-] Gumbyyy@lemmy.world 1 points 22 hours ago

I'll get right on that, as soon as I wrap up these 3 defects

[-] tyo_ukko@sopuli.xyz 1 points 18 hours ago

Just remember to mark all the things you'd like to make better but can't be arsed to at the moment with numerous TODOs.

[-] wise_pancake@lemmy.ca 24 points 2 days ago

Hey boss, I'm logging this ticket as tech debt. We need to take this on to hit our marketing deadline, and as soon as the project is over we need two scrum cycles to resolve it.

Two years later...

This ticket has been open forever, can we just delete it since nobody is ever going to clean this up? It's messing up our velocity metric.

[-] kautau@lemmy.world 15 points 2 days ago

As long as "cleaner than you found it" also includes "better documented." I've worked with people who think that "the code should speak for itself" to the point that they will make biased decisions with no explanation or documentation and then if you ask them about it after their response is "look at the PR for how that decision was made." I'm not going to git blame and find your PR to find an outcome from an argument between two people that after scrolling just says "sometimes the API returns a JSON string here instead of nested JSON so we have this conditional" when that could be a comment

[-] tyo_ukko@sopuli.xyz 1 points 18 hours ago* (last edited 2 hours ago)

In particular business logic that's not obvious should be documented in comments.

// Typically 1 = 1, but on March accounting wants that 1 = 2. This function makes that mapping.

[-] pastermil@sh.itjust.works 6 points 2 days ago

Not to mention that sometimes, the code that's supposed to "speak for itself" doesn't do the things that they think it would do.

[-] 0x0@lemmy.dbzer0.com 2 points 2 days ago

The code is speaking to me, but it's just word salad.

[-] kautau@lemmy.world 3 points 2 days ago

Right. Given the option I will always choose to work with a decent programmer who can communicate well and documents their code, over a very strong programmer that doesn’t think they should waste time with documentation

[-] superkret@feddit.org 6 points 2 days ago

ToDo's belong in tickets, not in the code.

[-] Azzk1kr@feddit.nl 3 points 2 days ago

Write a ticket, mentioning "tackle TODOs" 😅

[-] MarauderIIC@dormi.zone 4 points 2 days ago

Todo with ticket number

[-] chuckleslord@lemmy.world 5 points 2 days ago

//TODO: Refactor this method Git commit date: 10‐11‐2016

[-] unreachable@lemmy.world 8 points 3 days ago

# yeah, this needs to be done later

later: never

[-] tyo_ukko@sopuli.xyz 13 points 2 days ago* (last edited 2 days ago)

Few of the good ones I've spotted:

(complicated business logic in messy code) // TODO: check

(...) // TODO: think about better naming

(...) // TODO: This is obviously shit and needs to be changed.

(...) // TODO: THIS IS NOT USED ANYWHERE CONSIDER REMOVING ALTOGETHER (comment made 3 years ago)

[-] Kalkaline@leminal.space 4 points 2 days ago

Break the code altogether and abandon it forever and just start over.

[-] Phoenix3875@lemmy.world 2 points 2 days ago

// TODO: Leave the code cleaner than you found

// Todo - Stuff

[-] Mac@mander.xyz 0 points 2 days ago

Drake meme? Even with all the alternatives?
Ew

this post was submitted on 24 Sep 2024
482 points (98.8% liked)

Programmer Humor

32113 readers
349 users here now

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

Rules:

founded 5 years ago
MODERATORS