Rob Pike’s Rules of Programming (1989)
users.ece.utexas.edu
users.ece.utexas.edu
That quote is from Knuth, not Hoare.
https://shreevatsa.wordpress.com/2008/05/16/premature-optimi...
It's also a dupe: https://hn.algolia.com/?query=pike%20rules&sort=byDate&dateR...
> 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.
I'm not sure what the author wants me to take away from this? Data structures and algorithms should very much both be taken into consideration, although I'd agree that "it all starts with the choice data structure".
A clever algorithm can often dramatically improve performance, but usually clever algorithms are difficult to understand and their unmaintainability leads them to be abandoned as a project evolves, or, worse, subtly break when assumptions no longer hold. (Its especially hard when working with other developers)
The only example that was coming immediately to mind was a distributed lock. Once you have that primitive available your distributed systems problem can be substantially simpler to implement. Without it writing race-free code is going to be really tricky.
I've seen kludgy code when Rules 1 and 2 are violated for instance.
Employing Fancy algorithms to look good among peers, leaving behind buggy and maintainable code.
Rule 5 violation is deceptive. Often one can get it right with right understanding of business use-case.
The worst part is not the violation of these rules but the developer's chest-thumping with pride for writing seemingly intelligent code :-/
Except in an interview ;)