Subj : Re: Is well written code a rare species ? To : comp.programming From : Phlip Date : Fri Aug 12 2005 07:04 pm Anonymous George wrote: > This is my second job now. By now, in my 10 year career, 2 jobs in 10 years? That's probably below average for programmers! > I have had to maintain some programs that were written > by others. Most of those programs were badly written. > Global variables all over the place, way too long functions > with hardly any useful comments, badly chosen function names, > you name it. > > Is bad programming common practice ? If changing code is hard, teams generally lower quality until it hurts, and then only clean up the quality where it goes below this threshold. The attitude "don't change that you might break something" takes over. > Is well written code a rare species ? When changing code is easy, To make changing code easy, write lots of unit tests and run them every few edits. > I ask this, because I want to know if I should change > myself or if I should just go to another employer. > My current job is driving me crazy, because it takes so much > effort to do even the simplest modification to the application. Right. Your pain threshold is lower than your predecessors. They didn't recognize the slow rate to change things was caused by poor design. They didn't realize the _meaning_ of all those silly design rules they hear about is to keep code ready to change. > And how can I learn during a job interview whether the company's > product has high quality source code ? Ask. This is indeed a hot-button that might get you rejected from the interview (on "personality issues"), but the team should know the answer to the question. They may also be sensitive to prima donnas who want to come in and say "I'l clean up all your code and save your sorry asses". They have heard it before! > I know every company will > say that about themselves. Seek a company using "Test Driven Development". That culture is reputedly producing the cleanest and most flexible code possible. -- Phlip http://www.greencheese.org/ZeekLand <-- NOT a blog!!! .