[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: Why is C so popular?



Colin Watson wrote:

On Thu, Aug 28, 2003 at 01:08:56PM -0700, Mark Ferlatte wrote:
Ron Johnson said on Thu, Aug 28, 2003 at 02:16:22PM -0500:
With tight budgets and tight schedules, I've *never* seen a project
rewritten.

Rewriting from scratch is dangerous anyway; you exchange all of the
bugs you know about for a whole new set of bugs which you haven't
discovered yet. Better to improve what you've got.  This can result in
a totally different codebase after a while, but at least you have been
able to test and release along the way.

Amen, brother. I spend a fair bit of my time in Debian trying to stop
people from rewriting things and getting them to fix existing code
instead. It's an uphill struggle: for some people rewriting from scratch
seems to be much sexier.

I've seen maybe one or two occurrences where rewriting from scratch was
actually worth it. Before that's the case, the existing code has to be a
complete nightmare and you have to have a deadline to add some new
feature or other to it. It does happen, but it is (and should be) rare.

Just my 2c on the rewrites from scratch. I also agree, and have one theory on why it happens anyway based on my experiance with other programmers who I've seen assigned to improve on existing code.

I think often 'rewriters' give up before getting their head around the existing code and figuring out why it works the way it does. They feel it is taking them longer to understand the code than it would to write it their way. Maybe it's hard to understand because comments suck in the code or the coder used two spaces when you are use to seeing four, but I've found that if I add my comments as I study the existing code I understand it much better.

My understanding is that a similar line of argument is used for why the Linux kernel doesn't include a debugger. To force potential developers to get their heads into it and understand what others have already figured out.

Jacob



Reply to: