Linux Today: Linux News On Internet Time.

More on LinuxToday Optimization and the Bazaar

Dec 20, 2000, 23:27 (9 Talkback[s])
(Other stories by carlfish)

WEBINAR: On-demand webcast

How to Boost Database Development Productivity on Linux, Docker, and Kubernetes with Microsoft SQL Server 2017 REGISTER >

"Donald Knuth coined the phrase "Premature optimization is the root of all evil." In the development stages of a software project, the accepted wisdom is that it is most important to code for clarity first, to make sure the design is logical and the code easy to understand, and not worry about speed until the project is feature-complete. But where does this leave a project operating under the Bazaar model, that has to release un-optimized code to the public?"

"Well-factored code is beautiful. When you sit down in front of someone else's program for the first time, and in short order you've not only found the piece of functionality you're interested in, you understand exactly how it works, that's the first, most difficult step on the road to making a fix, or contributing a feature already done for you."

"Coding for clarity is important when you sit in a cubicle, because the guy down in the next office will have to maintain whatever you've just written, and any extra time he takes because of your ugly code costs your employer money. However, coding for clarity is even more important in an Open Source project, because the big advantage of Open Source is the number of eyeballs you are going to have looking at your code, and given the huge density of Open Source projects out there, if those eyeballs can't see what you're doing, then there's a good chance they'll not bother looking any more."

"The more readable your code, the better chance that a complete stranger will mail you a patch, rather than a bug-report. The better designed your code, the more chance that a complete stranger will be willing to add a feature."

Complete Story

Related Stories: