5 ms·
Avoid OOP (Overzealous Optimization Programming)
- kghose 12y agoThe advice I've always been given is that speed optimization is a second step after writing your code in the idiomatic, easy to read and maintain way. The optimization is done after profiling to find out where the real bottlenecks are for your application.
- namuol 12y agoBy the same token, don't worry too much about writing "maintainable" code before you actually start solving the problem at hand.
- nstart 12y agoAbsolutely. The only "clean" practice I advocate is test driven development. The day you want to refactor your code to avoid copy paste hell, you'll be thankful you have all those tests in place
- NewsReader42 12y agoI don't know where to start.... Telling people to not write fast code for the sake of other people checking that code is absolute madness. The code is ran thousands or millions of times per day and is the obvious choice to lean toward when optimizing instead of leaning toward optimizing for some theoretical idiot who likes to read lines of code in a fast and efficient manner to do his job. This job may be ran once or twice a year which is nowhere near the amount of savings in various computational power / hardware etc compared with the wages of some geek who simply can't be bothered to do his job well.