Rewrites Considered Harmful?
ngunton writes "When is "good enough" enough? I wrote this article to take a philosophical look at the tendency for software developers to rewrite new versions of popular tools and standards from scratch rather than work on the existing codebase. This introduces new bugs and abandons all the small fixes and tweaks that made the original version work so well. It also often introduces incompatibilities that break a sometimes huge existing userbase. Examples include IPv4 vs IPv6, Apache, Perl, Embperl, Netscape/Mozilla, HTML and Windows. "
I think it may have something to do with programmer ego and something to do with the challenge. I'm guilty of it myself. You find something you're interested in and you want to build it. It doesn't matter if someone else has done it or even done it well before you. The challenge is to do it yourself.
~ "When I'm of that age I'm just going to live up a tree."
Windows XP/Server 2003 were NOT complete rewrites of the OS. Many of the individual components within the OS may have received extensive retooling, but the OS as a whole was not a complete rewrite. New features were added. Existing features were modified. The code simply evolved from one version to another, just as with most products.
XP and 2003 are fairly minor tweaks of Windows NT, but they are missing some of the back-compatibility that was in Windows 2000 if I remember right.
... Windows 3.1 -> Windows 95 -> 98 -> ME and Windows NT 3.5 -> NT4 -> 2000 -> XP -> 2003.
Windows NT was as close to a complete rewrite (of Windows 3.1) as Microsoft has attempted for a long time. Since then there were 2 main branches that derivated
XP was in no way "from scratch".
Longhorn sounds like it will use a NT-derivative kernel, but may end up being close to a rewrite. One would hope so given the time they are going to take for it.
It is more productive to voice thoughtful opinions (reply) than to judge (moderate) others.
And the fact that somebody thought it was should give you a good clue that Microsoft's marketing machine is quite a powerhouse indeed - they want the average consumer to THINK that XP was some totally new thing. It wasn't. In fact, if you install all the latest DirectX runtimes, patches and so forth into Win 2k, you will basically conclude that the difference between a fully patched up-to-date Win 2k and Win XP is themeability and some graphics geegaws. And that product activation stuff if you are running a non-corporate version of XP.
Joel on software has covered this point in a good article: http://www.joelonsoftware.com/articles/fog00000000 69.html.
Things You Should Never Do, Part I
If you feed, say, IE 4 a complex page with CSS, it generally will render it OK (an OK implentation of the standards). Netscape 4, however, will crash and burn. No exceptions.
The fact that many organizations "standardized" on Netscape 4 just makes things worse...
Very true... One of the few "rewrites" that Microsoft has rever done is the NT codebase (which was actually more of OS/2 morphing into NT), and that wasn't a true rewrite since the "original" DOS/Win31 codebase keps livingo on with Win96/98/ME.
MS has tried some rewrites (I think they tried in Excel rewrite, I think Code Complete references that) but scraped them (also never giving up on the previous generation codebase).
That's one thing they do well (for better or worse) is not waste any money on rewrites (look at Win9x)
Rushfan
The point is that all the items you mentioned were changed, but most were not rewritten from scratch, which is what this thread is all about.
Are you sure you aren't comparing Netscape 4.x which is how old against newer versions of IE?
When Netscape 4.5 came out I remember comparing it to IE and found that Netscape worked better overall.
I agree that Netscape 4.x doesn't work nearly as well as say IE 5 but IE5 is a lot newer.
Just my two cents, I personally use Pheonix/Firebird and Opera.
I disagree.
Case in point, Windows 2000, AKA NT 5. When in its original development, it was being built on Windows NT 4.0 technology. When they realized that this "upgrade" added more problems than it solved, and subsequently was unable to keep up with newly emerging technologies and standards, they decided to scrap it and start from scratch.
Similarly, this is why Windows XP is 5.11.2600 (if I recall correctly), because it was built on NT 5.
As opposed to Win 9x which was just a modded kernel and added dll clutter.
Just because you can mod me down, doesn't mean you're right. Shoes for industry!
Compared to rewriting NT/XP into Longhorn will be, no. but compared to something like DOS 2 to DOS 3 (or was DOS 2 the rewrite?), it was a HUGE undertaking at the time. Creating a 32bit kernel from a 16bit one was pretty big news at the time.
It is more productive to voice thoughtful opinions (reply) than to judge (moderate) others.
He's definitely blowing smoke - he blames XUL for Mozilla's poor performance on his workstation. XUL is not the limiting factor as anybody who has used Firebird can attest. Firebird is much quicker than Mozilla and still uses XUL for user interface.
My username does not make me Apathetic. It's irony, get it?
I've had the fortune to be affiliated with the Icarus Verilog compiler/simulator effort over the last 3-4 years. The first version of the code had some specific design decisions that made scaling simulations beyond a thousand or so gates impossible.
The author chose to throw out his simulation engine and much of his code generation and adopt a completely new model. It took him the better part of a year to get roughtly where he was with the original code base as far as functionality is concerned. He also has a regression environment with several hundred tests he uses regularly to let him know how he is doing with respect to functionality. About 2 1/2 years into the rewrite period, Icarus is now handling behavioral code of 1 Million gates at about 80% of the performance of commercial tools!
Was the rewrite needed. YES! Did it take awhile. YES! Was it worth the wait. YES!
Have you compiled your kernel today??
Except that it has, like, O(n^2) table formatting algorithm. You don't see it when you're just doing layout kludges (and keeping it simple), but once you display lots of formatted data the crawl sticks in.
The user's are locked down now, their programs work, and every thing is centrally administered thanks to group policy and active directory. Overall it's been very nice.
.reg file for this and other settings to speed the process, since this used to be a very small business that has grown very fast and we never bothered to set up a network-wide group policy system.
Locking the users down, group policy, and active directory are as much a part of XP as 2K.
The new UI just sucks IMNSHO
I agree.
Start --> Run --> gpedit.msc --> User Config --> Admin. Templates --> Control Panel --> Display --> Desktop Themes --> Force Windows Classic
I have a
Our servers are 2K so I can't comment on 2003. I'm trying to sell the execs on using kernel 2.6 and samba 3.x for our next server. I figure something approaching 2.6.10 ought to be out by the time we are ready, so it should be stable enough.
The unofficial
How is it possible to so completely miss the point of Perl 6? The intent is not necessarily to replace Perl 5 - Perl 5 is fantastic and the Perl 6 developers above all people know this. Perl 6 is perhaps best thought of as a DIFFERENT LANGUAGE which will 'just happen' to be, in many places, very similar/identical to Perl 6.
Once you start thinking of Perl 6 in that manner, you realise what it's for. It's not to replace all of the Perl already out there. It's to provide a new tool, a new language for doing new things in, drawing on the experience gained in years of working with Perl 5 and other languages.
Ponie, of course, is part of the effort to make sure that at least some of the vast amounts of Perl 5 code is usable with Perl 6, should programmers wish it. And even that's not a total rewrite of the existing Perl codebase.
So ultimately, that article has nothing of use in it. Yes, programmers should be careful what they rewrite and when they rewrite it, but many times such things are actually worth it. GTK+ 2, anybody?
Miri it is whil Linux ilast...
I know the feeling. But it hardly ever happens anymore, and that is only because I now document every "smart" move I make. If I do something which may look weird, I write a comment about why I don't do it the other way, or that it should have been the other way, but I was too lazy to do it.
If I see something which looks like it shouldn't work, then I study it, and find out why it does, and document it. Or I study it, find out that indeed it doesn't work in some cases, document and fix it, or document that I couldn't see why it works, and that it may be buggy.
Often it will be less work to document (and thus understand) other people's work than to rewrite it. Sometimes, however, this is not possible (because the original is closed source and you're not the owner of the source) or it is clear that it's not going to help much (because the original is really really bad, for example Netscape 4). In those cases is a complete rewrite acceptable.
And of course you may want to rewrite a program which is only available as non-free software. Not because it's buggy, just because it doesn't allow others to study, change and improve it.
License.
I've rewritten a lot of code from the sepcifications to get out from under the license.
I've rewritten commercial code to get out from under the commercial license, and I've rewritten GNU code to get out from under he GPL.
Unless everyone suddenly goes to a BSD license (or public domain, which leaves them open to legal liability, for lack of a "hold harmless" clause), I expect to be happily hacking away for many, many years to come.
I have a 400 MHz PC at home. Netscape 4.7 runs acceptable fast. Mozilla is a hog. So I'm sticking with Netscape 4.7.
It's also useful to have that browser around when doing web development, to ensure that my sites look OK in the older browsers. There are still a lot of Netscape 4.7 browsers floating around out there.
That said, I use Mozilla on both my 1.8 GHz laptop and my 2.0 GHz work PC.
Like woodworking? Build your own picture frames.
Another great example not mentioned by anyone yet is the excellent Opera Internet browser. It isn't always rewritten from scratch, but overall there are enough changes in each new major version to make it almost unusable, at least to me. Every time a new version (3.0, 5.0, 6.0, 7.0) is rolled out, many little things no longer work as they did, and sometimes they are clearly and unequivocally broken.
:)
Before I knew better, I used to download the release versions (not betas or RCs), but each and every time I ended up uninstalling the new version and switching back. It usually took more than a month and about 10 updates for a new version to reach relative maturity. Witness 3.21, 6.05, 7.20, only these versions could be considered better than their predecessors in all respects. With version 7 I succumbed at about 7.1, but next time I will really know better and not even consider Opera 8, until there have been a month without updates.
On a more serious note, I think there is moment of maturity in many every product's lifetime, a moment when new features could no longer justify an upgrade (other things, such as compatibility, being equal).
Future Wiki -- If you don't think about the future, you cannot have one.
While, for example, BSD's 'ls' program can be tracked all the way to the seventies, GNU people of course rewrote it just for the license sake.
A nice example is the 'ping' tool. The story of ping tells how the program was concieved and made, and the FreeBSD's current ping.c is based on it:
That's a codebase 21 years old and still viable!-- Sig down
Using dynamic memory, always, in place of static arrays is for people incapable of doing data flow analysis.
And if they can't figure out where their data is coming from and going to, the code probably has other problems too.
(Not to say that static arrays aren't often used inappropriately, but the opposite extreme is just as bad.)
-- Alastair
Except that ME and XP Home are from completely different product lines. Apart from that, your analogy isn't too far off the mark.
There is NO OS/2 code in Windows NT
Not true. The "LanMan" SMB Networking is right out of OS/2. This was even bragged about in the early NT documentation because it meant NT could slide-in to your SMB network seamlessly. For a long time, OS/2 and NT domain controllers were interchangable.
There's also the HPFS filesystem code in NT3, and NTFS, which is admittedly based on HPFS. It's also highly doubtful there's 0 OS/2 code in the "OS/2 Subsystem".
if there was, IBM would have a claim on Windows NT
Microsoft and IBM had a "divorce" agreement - as reported in the press, this allowed them to share co-developed products -- which I think included DOS 5, Windows 3.0, and OS/2 1.3.
Business. Numbers. Money. People. Computer World.