News for hackers. Stuff that matters.
Re:Fred P. Brooks has passed away by zelphirkalt on Friday November 18, 2022 @03:20AM (#33651844)
The Linus quote is ripe for misinterpretation. Not worrying about the code can lead to an unreadable mess, that ones future self or others will hate working with. So a really good programmer will probably rather go the Sussman way and realize, that programs are firstly meant to be read and only lastly meant to be run by a computer (paraphrasing here).
Re:Fred P. Brooks has passed away by citrin_ru on Friday November 18, 2022 @03:27AM (#33651889)
Designing good data structures is very important for code readability too. If you struggle to understand how given data structure is used / what it contains it would be hard to understand the rest of the code.
Re:Fred P. Brooks has passed away by Cthulhu_ on Friday November 18, 2022 @04:27AM (#33652337)
There's a lot of code out there that would improve massively with better data structures though.

I mean I've waded through tons of code where the original author abused strings to indicate relationships in a table - a column with semicolon-separated values referencing other tables / rows. And a ton of code to check references.

Mind you, that's more database design than data structures, but they're close enough for this example.

Re:Fred P. Brooks has passed away by lloeki on Friday November 18, 2022 @04:44AM (#33652464)
> The Linus quote

I always attributed it to Rob Pike, but it turns out Pike's is following:

> Rule 4. Fancy algorithms are buggier than simple ones, and they're much harder to implement. Use simple algorithms as well as simple data structures.

> Rule 5. Data dominates. If you've chosen the right data structures and organized things well, the algorithms will almost always be self-evident. Data structures, not algorithms, are central to programming.

https://users.ece.utexas.edu/~adnan/pike.html

Interestingly enough, the above link has this to say:

> Rule 5 was previously stated by Fred Brooks in The Mythical Man-Month.

Which I guess references GP's excerpt.

Also says this, which kinda loops back to Linus's way of saying it:

> Rule 5 is often shortened to "write stupid code that uses smart objects".