# thinking-together

Shubhadeep Roychowdhury

08/12/2020, 8:39 PM
Rob Pike's 5 Rules of Programming
❤️ 1

Kartik Agaram

08/12/2020, 9:33 PM
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

Chris Maughan

08/13/2020, 6:30 AM
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.....

Shubhadeep Roychowdhury

08/13/2020, 7:50 AM
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.