Subj : Re: Is well written code a rare species ? To : comp.programming From : Phlip Date : Fri Aug 12 2005 11:08 pm Charles Richmond wrote: >> IMHO; ugly code is everywhere. >> >> I believe there is a many reasons for this : >> >> 1. Consultants who never maintain thier own code. I know there are >> probably >> some good consultants out there, but I'm willing to bet they agree with >> this >> statement. >> >> 2. Programmers who don't understand the code they are maintaining. >> >> 3. Deadlines undermining the programmers better judgement. >> >> 4. Project evolution turning a good design into a bad one. Either over >> the >> course of many years, or months if the requirements/specs weren't done >> correctly. >> >> 5. Weak programming culture. >> >> 6. The fastest coders are rewarded, even when they cause most of the >> maintainence work ... because nobody watches who created the bug. >> > IMO you have omitted one reason: really *bad* programmers. Also really bad micromanaging bosses. They order you to fix something within 15 minutes, you get achieve understanding of the bug in 14 minutes, and they show up and order you to add an 'if' statement to kill the bug and check the code in as soon as possible. You are forbidden to even think of cleaning up the code at that site. Code treated like this decays very rapidly. Despite all the "rewrite!" advice on this thread, sometimes that does nothing but restart the clock... -- Phlip http://www.greencheese.org/ZeekLand <-- NOT a blog!!! .