Date: Fri, 4 Jun 1999 09:08:03 -0600 From: Nate Williams <nate@mt.sri.com> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: dyson@iquest.net, freebsd-hackers@FreeBSD.ORG Subject: Re: 3.2-stable, panic #12 Message-ID: <199906041508.JAA27044@mt.sri.com> In-Reply-To: <199906040223.TAA01897@apollo.backplane.com> References: <199906040145.CAA04373@keep.lan.Awfulhak.org> <199906040223.TAA01897@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[ None of the below is assumed to be taken as reflecting any situation that occurred in FreeBSD. This is a *common* problem that exists in every software program, and any reflection on what happened in FreeBSD is by coincedence in that it's a software program. My comments apply as easily to my situation with the laptop support changes I made as it done to *any* other portion of the system. ] > The biggest mistake that programmers working on a large project make is > when they do *not* rewrite portions of the code that need to be > rewritten. Most good software engineering books would disagree with you. The *BIGGEST* mistake the most programmers make is re-writing functional code to conform to their style of programming, rather than understand why the original programmers did it the way they did it. NIH is *FAR* too common of a problem. Bugs *rarely* require a complete re-write of the code. This isn't to say that often-times it's *easier* to just re-write it from scratch than it is to understand what the original code was doing in the first place, but this often leads to errors that were fixed by the original authors in a non-obvious manner being brought back in. The above problem is almost always a problem with the original author not doing a proper job of documenting the work, but it doesn't justify ripping everything out and starting over from scratch. I know of *NO* programmer who does not delight in completely ripping out and replacing existing code with code that he has written from scratch. It's great fun, and it allows the person to feel better about the system, themselves, and make sure that they can debug the existing code better. I do it all the time. But, I know for a fact that it's rarely the right thing to do, especially when the folks who 'went before me' aren't 1st year CS students, but are seasoned professionals who have a clue and didn't do things on a whim. Almost *ALL* of the BSD kernel code (and most of the userland code as well) falls into the class of code that is written by seasoned professionals. They are not infallible, but they almost always have a reason for why they did things the way they did. Does it mean you should never re-write entire portions of code? Of course not, but it should never be taken lightly, and *IF* the original programmers are there and willing (and capable) to explain things to you, then that should be taken advantage of, and not ignored. Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906041508.JAA27044>