Jeff Johnson wrote: > Whil: I hired a guy that wrote the most "elegant" code I have ever > seen. His specialty was "building" SQL Select statements and > re-dimensioning arrays on the fly - and not a single comment. It was so > elegant I couldn't read it. After all, I can only read my simple code > that I make sure I can understand 15 years later. I also put lots of > comments like "Patty wanted it done this way 9/10/1991". > > The customer brought this to my attention. The code predicted how much > gas was in tanks at places like hospitals for a trucking company that > delivers gas. The code worked great until you got to a certain level > and then the predicted amount started going up with use instead of going > down like it was supposed to. Fortunately for me I had a great > relationship with this customer. > > I had to do a complete rewrite of the code. I am not saying this to > demean the programmer because he is very good and has written some > amazing applications. It's just that "elegance" makes it difficult for > us hackers to understand. The rewrite was significantly faster, too. > >
I'd prefer a few SQLs and maybe even some loops that were easy to comprehend and maintain and ran slower (to an acceptable level), than to have crazy complex SQL that was a bitch to maintain. Guys who don't comment their code scare me...and make me want to run the other way. Anyone who's seem my spaghetti (lol) sees the ton of comments, sometimes even like Jeff's above. I put those there so I can tell what I was thinking the next time around, as I'm afraid I'll develop alzheimers eventually. ;-) -- Michael J. Babcock, MCP MB Software Solutions, LLC http://mbsoftwaresolutions.com http://fabmate.com "Work smarter, not harder, with MBSS custom software solutions!" _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

