523
Memory is overrated (programming.dev)
you are viewing a single comment's thread
view the rest of the comments
[-] anotherandrew@lemmy.mixdown.ca 1 points 11 months ago

Agreed except for the variables. You can pry the iterators i, j, k, the pointers p and q, and the temporary buffer buf, from my cold, dead hands.

Short variable names increase code clarity, particularly when the functions employing them are concise and named appropriately. There’s not much worse than using something like sourcedata[databufferiterator] instead of src[i]. It reminds me of authors who think that big words make them sound more intelligent. Needing or advocating auto complete in IDEs is a symptom of this kind of code smell, IMO.

Code should be clear and concise; it’s also why I fight for 8 character indentation; if your code is creeping across the screen it’s a damn good indication that the function might be too complex and should be broken up.

this post was submitted on 03 Oct 2023
523 points (96.3% liked)

Programmer Humor

19187 readers
1180 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 1 year ago
MODERATORS