Subj : Re: Is well written code a rare species ? To : comp.programming From : David Date : Sun Aug 14 2005 02:16 pm Hello George, I'm a bit late to this thread, but perhaps I can add something without reading everyone elses response thus far. Your post certainly warrants a reply by both learned masters and from those people who have written that code you'd rather not associate with. On Fri, 12 Aug 2005 17:56:51 UTC, Anonymous George wrote: > Good day everyone, > > This is my second job now. By now, in my 10 year career, > 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. Why did it take you 10 years to write this? More importantly what did you _do_ when you found code that could have been written better (in your opinion, anyway)? > Is bad programming common practice ? I've seen both good and bad code. Some developers do a better job than others. We weed out those that can't be taught better methods and educate those that can. We also learn to accept different methods, as some of the rules we have for "better practices" may not be the same as others have learned. As for the code that was below par, make it acceptable where you can. Just make sure what you spend all your time in unproductive endevours or improving code ot the point that it doesn't do what it once did. > Is well written code a rare species ? I don't think so. Those that write well are easy to spot and work with. They usually tkae their time and create good code. As with all trades, "coding" is a learned art. There are many more beginers than masters. Sadly, anyone these days may be allowed to "code" and thus create whatever they like. Often times the customer (meaning the management) doesn't recognize or care that the code is not well constructed. They perhaps care first about it working properly and perhaps about the time taken to create it. > I ask this, because I want to know if I should change > myself or if I should just go to another employer. Would you be happy if you changed yourself? Would a new employer make you happier? After several years with your current employer, can you not help them improve what they create? > My current job is driving me crazy, because it takes so much > effort to do even the simplest modification to the application. Is that because the projects are structured so poorly, you do not understand how they are put together, or perhaps you are being asked to make significant changes and the changes should be rather difficult to make? I would hope that simple changes aren't that difficult to make. > And how can I learn during a job interview whether the company's > product has high quality source code ? I know every company will > say that about themselves. You cannot do that during an interview. You can ask to look at and understand some of the prospective employers code. That may not be indicative of all their code. There are many other factors to understand about a new procspective workplace. The best way is perhaps to talk with as many people as possible. Don't trust a short interview. Take time and get to know them if you can. > Ciao > > Anonymous George David .