Eakin, W wrote: > Hello, > This question could be seen as a general programming question, but > because PHP is what I know best, I'll ask it here. > > A good friend of mine is the person who got me more interested in > programming as a career. She's a professional COBOL programmer, and > works for a large bank. She once told me that 75% of her time was spent > going over and rewriting/repairing old code that she didn't write, and > only 25% writing new code. From what I know about COBOL, it seems that > it might need more rewriting than other languages, because of all the > built up old code. But as I look forward to the day when I can work as a > full-time PHP coder, I wonder. The question is, how much of your time > (you, the professional PHP coder reading this), is spent > rewriting/repairing old code vs. writing new code. Although this is a > PHP list, and my question is in regards to PHP, if you want to give me > your opinion on this same question in regards to other languages you've > programmed in, I wouldn't mind. I try to avoid the projects where I'll spend 80% of my time fixing somebody else's code, but that does seem to be the average :-) Of course, a lot of times, you're adding a new feature, or altering the behaviour in some small way. With well-written code, this hopefully turns out to be a relatively short time figuring out what the code does where/when, and a few minutes of writing the new bit. With Bad Code, it turns into a nightmare of figuring out how any of this [bleep] works and fits in with that other [bleep] and then days of trying things that should work, but don't, and then you throw up your hands and tell the boss it's really time to scrap that module and write it correctly from scratch in less time than you've already wasted trying to fix it. :-) Documentation, when it exists at all, rarely tells you the Big Picture things you need to know to figure out what's going on, and often is nothing more than an Englishified version of the source code, only out of date. Gee, thanks. :-( At any rate, yeah, I'd have to say 75% of time fixing old code is pretty standard. You can cut that down a lot with better Design up front, better requirements analysis up front, better coding up front... But you so seldom *get* that up front time, so we waste a lot of time fixing problems caused yesterday's deadline decisions. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php