3 ms·
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 wit
by zelphirkalt 4y ago
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).
- citrin_ru 4y agoDesigning 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.
- Cthulhu_ 4y agoThere'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.
- lloeki 4y ago> 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 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".