Rob Pike's 5 Rules of Programming <http://users.e...
# thinking-together
s
Rob Pike's 5 Rules of Programming http://users.ece.utexas.edu/~adnan/pike.html
❤️ 1
k
minor pedantic note on 'premature optimization':
This was originally attributed to Tony Hoare, but tracking down the origin of this quote I found that it was actually Knuth who said it first. Although Knuth did call it "Hoare's dictum" 15 years later, Hoare himself disclaimed it. See http://shreevatsa.wordpress.com/2008/05/16/premature-optimization-is-the-root-of-all-evil
https://wiki.c2.com/?PrematureOptimization
c
This is basically my approach to coding, good stuff. The first question I ask anyone who tries to check in an optimization is "What was the measured time before and after?" If they can't answer that question, they are doing the wrong kind of programming.....
s
I did not know, neither formalised the approach like Mr. Pike did. However, I do agree with it and I follow it most of the time. @Kartik Agaram Also, I had a faint memory about the "Premature Optimisation" part attributed to Knuth, thanks for confirming. This is a very important lesson and many people learn it the hard way.