this post was submitted on 09 May 2024
434 points (92.1% liked)

Programmer Humor

32710 readers
1421 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] 177 points 7 months ago (11 children)

Sadly, that's not code Linus wrote. Nor one he merged. (It's from git, copied from rsync, committed by Junio)

[–] [email protected] 61 points 7 months ago (8 children)
[–] [email protected] 39 points 7 months ago (2 children)

He wouldn't make that statement unless he experienced the horror himself.

Now, if he still does it these days...

[–] [email protected] 13 points 7 months ago

I've heard similar from the worst first year CS students you could ever meet. People talk out their ass without the experience to back up their observations constantly. The indentation thing is a reasonable heuristic that states you are adding too much complexity at specific points in your code that suggests you should isolate core pieces of logic into discrete functions. And while that's broadly reasonable, this often has the downside of you producing code that has a lot of very small, very specific functions that are only ever invoked by other very small, very specific functions. It doesn't make your code easier to read or understand and it arguably leads to scenarios in which your code becomes very disorganized and needlessly opaque purely because you didn't want additional indentation in order to meet some kind of arbitrary formatting guideline you set for yourself. This is something that happens in any language but some languages are more susceptible to it than others. PEP8's line length limit is treated like biblical edict by your more insufferable python developers.

[–] nialv7 2 points 7 months ago

He barely ever code these days.

load more comments (5 replies)
load more comments (7 replies)