News for hackers. Stuff that matters.
Re:Write code that is easy to delete, not easy to extend by neilellis on Sunday February 14, 2016 @12:46PM (#11099135)
Funny I have a saying which is very similar:

"Make it work, Make it work well, Make it work fast"

I would disagree with beauty == performance, most performance problems I have found to be in the last place I would think them to be :-) On one (moderately large) system it was a hashcode() calculation ;-)

Re:Write code that is easy to delete, not easy to extend by lostcolony on Sunday February 14, 2016 @12:57PM (#11099180)
'Place I think it to be' is completely orthogonal to beautiful code. :P

From my own experience, many, many times, definitely a majority of them, when I have had performance issues, and finally found the bottleneck, and fixed it, my code was more beautiful afterwards. Algorithms were simplified, duplicated effort was removed, etc. One major one in my mind was where code was attempted to be reused, but in doing so it caused an O(n^2) behavior, where an O(n) could have been done instead. Upon finding it, and refactoring it, the code had fewer interdependencies, the logic was far more straightforward, both things I find to make for 'beautiful' code, and it ran far, far faster (from 'this particular operation takes an hour' to 'this particular operation takes < 1 second'). Had I invested time up front after making it work to clean up the code (rather than stop at 'it works, good enough') I would have stumbled upon the same fix, even before seeing the performance issue.

Re:Write code that is easy to delete, not easy to extend by rakoo on Sunday February 14, 2016 @03:49PM (#11099932)
I believe the common idiom is

  Make it work

  Make it right

  Make it fast
http://c2.com/cgi/wiki?MakeItWorkMakeItRightMakeItFast
Re:Write code that is easy to delete, not easy to extend by lostcolony on Monday February 15, 2016 @08:20AM (#11103203)
It is; Joe was restating it differently ('right' is ambiguous. 'Beautiful' is subjective, but at least a more appropriate adjective for code quality), and also offering the insight that prioritizing code quality also often gives you performance.
Re:Write code that is easy to delete, not easy to extend by neilellis on Monday February 15, 2016 @09:59AM (#11103667)
That's probably where I got it from, somewhere in the mists of time, thanks rakoo!