Comment

Comment by dspillett

A valuable life lesson though. I've followed coding standards that I don't entirely agree with¹²³, but breaking them would cause more discomfort for the larger project than the minor irritation keeping them would cause me. I'm sure the feeling is common in other career areas too, particularly professional writing.

---

[1] Not using extra space to line up similar parts of similar lines when grouped together, for instance, I find it makes things easier to read and alter afterwards

[2] Some codebases absolutely hate one-line if statements, it must be in a block even if only one statement is inside the conditional and the brackets must each be on their own line. I get that for more complex code it breaks things up visually in a way that is helpful, but stretching out 20..30 characters over four lines, artificially lengthening a function significantly if it happens multiple times…

[3] One FOSS project I once submitted a patch for insisted on absolutely no inline comments – all explanation had to be in the comment block at the head of the function declaration. It almost discouraged commenting, and I like to comment liberally.

parent dspillett 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton