top | item 32964614

(no title)

iafiaf | 3 years ago

Early in my career, I took to heart such books and articles and often felt guilty and lessor-programmer when I cut corners. Here's my 2 cents now:

- Some of this is the coding equivalent of "6 rules for financial freedom" or "6 ways to find your dream soulmate". Generic advice that doesn't reflect highly nuanced reality.

- These rules are guidelines at best. There are justifiable reasons to break them; which I do often. Albeit this requires experience (and dare I say, wisdom). For example, refactoring code into a separate function levies a cost (of indirection) on the reader. Therefore copy-paste is sometimes fine.

- Clode "cleanliness" is a moving target. For a coder's mental health and value proposition for his project, he/she should know what code can afford to stay dirty.

PS: I love Jonathan Blow's opinions on coding/programming. Here are a few: https://www.youtube.com/watch?v=21JlBOxgGwY https://www.youtube.com/watch?v=ubWB_ResHwM https://www.youtube.com/watch?v=KcP1fXQv0iU

discuss

order

BlargMcLarg|3 years ago

Don't forget the most prominent part: 'your clean' and 'my clean' can differ greatly.

You can do your absolute worst and you will still find someone claiming there aren't enough comments, or the naming is bad, or the code is too dense, or the code isn't dense enough, or you should use typed objects instead of tuples and anonymous classes, or your code should be more functional, or your code should be more imperative, or it should be more event-driven, or it requires more logging, etc.

And it turns out, there is almost no research to tell you who is right and who is wrong. The only thing I can safely tell others, is all these discussions and additions will add 900% more work all things considered, and there's no guarantee it will be less bug free or more.

29athrowaway|3 years ago

Jonathan Blow is a creative, productive and overall smart guy, but reading his code will make you want to slam your head against the wall.

What irritates me the most are the long, non-linear comments full of distracting noise. It's like reading a choose your own adventure novel.

jstimpfle|3 years ago

When he talks about his approach he typically mentions the importance placed on getting feedback from an actually working prototype as quickly as possible. Don't judge him by most of the ad-hoc code you've perhaps seen on twitch. But I've seen some really good-looking stuff there as well - straight to the point, no noise, not overabstracted. I would be interested what a finished project looks like.