[PHP] Writing new code vs. re-writing someone else's code
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. thanks, William -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Writing new code vs. re-writing someone else's code
Good question. Personally, I think I tend to write more new code than reworking old code. However, I have taken on numerous projects where I've been required to port ASP to PHP and MSSQL dbs to Postgre or MySQL... but these projects also require a fair bit of new code. There are *so* many legacy COBOL applications though that, yeah, I think a COBOL programmer will very rarely get to write anything new. The people who I know who work with COBOL generally either patch problems or, if there's new functionality required, will code in Java or C. Ian On Tue, 2004-12-21 at 11:41 +0100, 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. thanks, William -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Writing new code vs. re-writing someone else's code
On 21/12/2004, at 9:41 PM, Eakin, W wrote: 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. When I'm working on a new project, my time is generally spent hooking into my existing framework with new code and models. When I'm making changes to existing projects, I tend to be mainly repairing, modifying and updating code, plus adding a little new code. I'm highly addicted to cleaning and refining my old code, so if I see something messy and have a few spare minutes, I'll always clean up old code to make it better. I absolutely hate working with other people's code or inheriting a project unless it's really clean and well thought out, and well documented. --- Justin French, Indent.com.au [EMAIL PROTECTED] Web Application Development Graphic Design -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Writing new code vs. re-writing someone else's code
Honestly, I think it does depend a lot on the language you are using. From my experience, most people who work in PHP tend to write more new code than those who use COBOL. [snip] There are *so* many legacy COBOL applications though that, yeah, I think a COBOL programmer will very rarely get to write anything new. [/snip] I agree. I was reading something that like 80% of the code out there (don't quote my numbers) is in COBOL and FORTRAN. Anyways, to answer your question, I spend about 30% of my time writing new code and about 70% of my time working on legacy code. Of course, often due to lacking comments most of the time spent with old code is just trying to figure out what they were doing. :) -Chris On Wed, 22 Dec 2004 01:13:58 +1100, Justin French [EMAIL PROTECTED] wrote: On 21/12/2004, at 9:41 PM, Eakin, W wrote: 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. When I'm working on a new project, my time is generally spent hooking into my existing framework with new code and models. When I'm making changes to existing projects, I tend to be mainly repairing, modifying and updating code, plus adding a little new code. I'm highly addicted to cleaning and refining my old code, so if I see something messy and have a few spare minutes, I'll always clean up old code to make it better. I absolutely hate working with other people's code or inheriting a project unless it's really clean and well thought out, and well documented. --- Justin French, Indent.com.au [EMAIL PROTECTED] Web Application Development Graphic Design -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Writing new code vs. re-writing someone else's code
On Tue, 2004-12-21 at 11:41 +0100, 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. thanks, William All languages have this problem. It's going to happen regardless of which language that you work on. As you become a better programmer you can plan ahead better, but you should always expect to have to go back and rethink things and clean up existing code. (refactoring) If you do it effectively, the time it takes to go back and work on legacy code can be dropped: see: http://www.refactoring.com/ ..and a good book that someone recommended to me recently: http://www.amazon.com/exec/obidos/redirect? tag=gp04-20path=tg/detail/-/0201485672%3Fv%3Dglance Cheers, -Robby -- /*** * Robby Russell | Owner.Developer.Geek * PLANET ARGON | www.planetargon.com * Portland, OR | [EMAIL PROTECTED] * 503.351.4730 | blog.planetargon.com * PHP/PostgreSQL Hosting Development *--- Now supporting PHP5 --- / -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Writing new code vs. re-writing someone else's code
On Tue, 2004-12-21 at 12:26, Christopher Fulton wrote: Anyways, to answer your question, I spend about 30% of my time writing new code and about 70% of my time working on legacy code. Of course, often due to lacking comments most of the time spent with old code is just trying to figure out what they were doing. :) Hahah, that's so true. I hate committing to an E.T.A. when working on someone elses code since it entirely depends on what the heck they did and how fast I can figure it out... especially when their commenting style is complete lack thereof. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Writing new code vs. re-writing someone else's code
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