518
Fair enough honestly (files.catbox.moe)
all 18 comments
sorted by: hot top controversial new old
[-] brokenlcd@feddit.it 74 points 1 week ago

Tbf, i always comment my code to do a sanity check of what i am doing along the way( think rubber duck method with comments). The problem is that my writing is so cryptic i am the only one that could ever understand it.

[-] spooky2092@lemmy.blahaj.zone 27 points 1 week ago

I have to comment my code because otherwise I have no idea wth I was writing 6mo ago.

Like, I recently had to update a script I wrote 2 years ago and had thought 'this is self explanatory, I don't need to comment it's only to have me come back and have to walk the code to figure out I forgot to include an edge case that hadn't occurred yet ..

[-] Omgpwnies@lemmy.world 12 points 1 week ago

Break it up into functions with names that describe what it does, then the script becomes basically a sequence of function calls and is easier to read and troubleshoot.

[-] 1984@lemmy.today 9 points 1 week ago* (last edited 1 week ago)

Yeah I dont know why people dont do this. Then an overall description of the script at the top is enough and anyone can just look at function names to see what is going on.

[-] Earflap@reddthat.com 6 points 1 week ago

This is how I started writing my scripts and it is sublime. Even better is when your function can be a single return statement, makes writing tests easy.

[-] jkercher@programming.dev 1 points 1 week ago

I'm on your side dude. Comments rot. Some are useless. Don't even get me started on doxygen comments.

[-] lemmeBe@sh.itjust.works 2 points 1 week ago

6 months - you're good. 3 for me. ๐Ÿ˜„

[-] Faydaikin@beehaw.org 15 points 1 week ago* (last edited 1 week ago)

my writing is so cryptic i am the only one that could ever understand it.

That sounds like my handwriting. And If written in a hurry, even I struggle to make sense of the mix of runes, hieroglyphics and child's drawings I call my "cursive".

[-] brokenlcd@feddit.it 7 points 1 week ago* (last edited 1 week ago)

my handwriting it's exactly like that. Doesn't help that i am left handed and smudge the shit out of the paper. But what i meant was the "oogabooga" caveman level of comments i add to code. You'll be lucky to find a cohesive sentence in them. Ex: "check for x if exists, assume setup is done"

[-] Faydaikin@beehaw.org 2 points 1 week ago

Yeah, I know it was unrelated. And I'm sorry for high-jacking your comment.

Just thought I'd add my own little "funny" when it came to writing. :)

[-] Swedneck@discuss.tchncs.de 1 points 1 week ago

sounds like you're writing code twice lmao

[-] spooky2092@lemmy.blahaj.zone 5 points 1 week ago

Ah, "cursive", where half of the letters aren't actually cursive, and a quarter of the rest actually resemble the actual letter it's supposed to be.

I hate reading my handwriting.

[-] Rivalarrival@lemmy.today 1 points 1 week ago

I stopped using cursive my sophomore year of high school. Started using smallcaps, and everyone was happier.

[-] criss_cross@lemmy.world 21 points 1 week ago

Nothing good ever can come after importing boto3

[-] Simulation6@sopuli.xyz 16 points 1 week ago

Check-in rejected during code review. If you can't summarize what you are doing, then you don't really understand it. You may have to edit the comments after you have worked on it a bit and have a better understanding.

[-] Artyom@lemm.ee 11 points 1 week ago

Boto3 is an suite of AWS integration tools in case anyone else was wondering.

[-] jadelord@discuss.tchncs.de 2 points 1 week ago

Yeah, deal with it, Copilot/LLM plugin!

this post was submitted on 13 Feb 2025
518 points (98.9% liked)

Programmer Humor

20033 readers
1869 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS