Subj : Re: Is well written code a rare species ? To : comp.programming From : akarl Date : Sat Aug 13 2005 03:07 pm Roger Willcocks wrote: > I think time pressures and laziness play their part too. When I'm writing > something tricky (*), I sometimes write very ugly code with lots of global > variables, misnamed variables, commented out and misleading code and a > liberal use of goto. > > But once I understand what it is that I'm trying to do, I'll do some very > heavy refactoring to de-uglify the code. It still does the same thing, but > other people (and me in a few months) stand at least some hope of > understanding what's going on. > > The notion of what's ugly and what's not is an open question, but I've seen > quite a few examples of code where the writer just stops when it 'works', > for some value of 'works'. > > Knowing what it is, exactly, that the code is trying to achieve is > important, as is having good test data. "Pedantry in programming is not a luxury, but a necessity." -- N. Wirth August .