Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Rewrites Considered Harmful?

CmdrTaco posted more than 10 years ago | from the but-sometimes-it's-just-plain-fun dept.

Programming 670

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. "

cancel ×

670 comments

Sorry! There are no comments related to the filter you selected.

fp (-1, Troll)

Anonymous Coward | more than 10 years ago | (#7988830)

batty!

OG da world

speaking of IPv6 vs IPv4 (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7988835)

Will IPv6 ever take off?

Not first post (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#7988841)

This is not the first post so you may continue reading.

and this is new? (1)

grendel_x86 (659437) | more than 10 years ago | (#7988843)

Maybe im just not getting the point of this. This is generally understood concept when planning a rewrite....

Windows XP was a complete rewrite? (4, Interesting)

halo1982 (679554) | more than 10 years ago | (#7988847)

I wasn't aware of this....ehh...I thought XP was just modified Win2k code (and I remember my early XP alphas/betas looked exactly like Win2k...same with Server 2003...)

Was it a "good idea" for Microsoft to rewrite Windows as XP and Server 2003? I don't know, it's their code, they can do whatever they like with it. But I do know that they had a fairly solid, reasonable system with Windows 2000 - quite reliable, combining the better aspects of Windows NT with the multimedia capabilities of Windows 98. Maybe it wasn't perfect, and there were a lot of bugs and vulnerabilities - but was it really a good idea to start from scratch? They billed this as if it was a good thing. It wasn't. It simply introduced a whole slew of new bugs and vulnerabilities, not to mention the instability. It's just another example of where a total rewrite didn't really do anyone any good. I don't think anyone is using Windows for anything so different now than they were when Windows 2000 was around, and yet we're looking at a 100% different codebase. Windows Server 2003 won't even run some older software, which must be fun for those users...

Re:Windows XP was a complete rewrite? (4, Informative)

nakhla (68363) | more than 10 years ago | (#7988902)

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.

Re:Windows XP was a complete rewrite? (2, Informative)

Jahf (21968) | more than 10 years ago | (#7988911)

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 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 ... Windows 3.1 -> Windows 95 -> 98 -> ME and Windows NT 3.5 -> NT4 -> 2000 -> XP -> 2003.

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.

Re:Windows XP was a complete rewrite? (3, Informative)

Fnkmaster (89084) | more than 10 years ago | (#7988915)

It was not a rewrite, and thus is a terrible example. In fact, if you poke around it's referred to in several places internal to the OS as "Windows NT 5.1" to Win 2k's "Windows NT 5.0". That should give you a pretty good clue that it's not a rewrite.


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.

Re:Windows XP was a complete rewrite? (1, Interesting)

Kenja (541830) | more than 10 years ago | (#7988971)

New network stack, kernel, driver model, GDI, interface, hardware layer. If thats what you think of as a small change I'd hate to see what you think is a major one.

Re:Windows XP was a complete rewrite? (1, Insightful)

grendel_x86 (659437) | more than 10 years ago | (#7988918)

XP is not a total rewrite, there is still some code in there from win 3.1 and nt 3.51

Longhorn is a rewrite.

You must consider the source when reading articles. This is not a credible source, just some person's site. Im sure they have pondered this, but they supply no sources for their information.

Re:Windows XP was a complete rewrite? (1)

halo1982 (679554) | more than 10 years ago | (#7988987)

I should have pointed out that I was trying to show how bad this article is. I know XP isn't a total rewrite (even longhorn isn't a TOTAL rewrite) but this um well educated person apparently doesn't!

Re:Windows XP was a complete rewrite? (0)

Anonymous Coward | more than 10 years ago | (#7989004)

The article is wrong then. Notice how when there is a security hole in XP, it almost always in 2000, and vice versa. Also 99% of things that are designed for 2000 will run without complaining on XP, likewise XP drivers will work fine on 2000. Not definitive proof I agree, but surely if this was a complete rewrite they would't completely match each other patch by patch for so many things? Why bother to rewrite when you basically come out with exactly the same as you had before? Maybe they just Copy Pasted it all :-)

Re:Windows XP was a complete rewrite? (1)

no soup for you (607826) | more than 10 years ago | (#7989074)

I wasn't aware of this....ehh...I thought XP was just modified Win2k code (and I remember my early XP alphas/betas looked exactly like Win2k...same with Server 2003...)

I saw this also, but I think what the author meant was Windows 95 -> 98 -> 98SE -> ME ... Then Windows XP was the merging of the 2000 and 98 product lines.

never.. (0)

Anonymous Coward | more than 10 years ago | (#7988851)

the obvious answer is; "it's never enough". So, next article.. ;)

Windows XP SP2 ought to be dangerous.. (3, Insightful)

[TWD]insomnia (125505) | more than 10 years ago | (#7988854)

.. as they are rewriting the security layer!

Design desitions (5, Interesting)

FedeTXF (456407) | more than 10 years ago | (#7988856)

As a coder I can assure you that working on somebody else's code is frustrating because you allways say: "I would have done this differently". Most rewrites I think come from there, having the idea of a better implementation.

Re:Design desitions (0)

Anonymous Coward | more than 10 years ago | (#7988932)

if you end up at the same point what's the difference? He's talking about tools not entire programs.

I thought OOP was the answer to everyone's problems?

as a programmer's skills increase (5, Interesting)

polished look 2 (662705) | more than 10 years ago | (#7988968)

As I recall, Torvalds made mention that some of his original code in the Linux base was not very good and he would have written it much differently today. Indeed, most anyone that habitually programs naturally becomes more skilled and if the underlying premisis/framework/model of an application or tool is not as good as could be - or is lacking a certain methodology that time has proven to be beneficial and only rewriting it will solve this - what is wrong with rewriting the code from the ground-up?

Re:Design desitions (3, Insightful)

Old Wolf (56093) | more than 10 years ago | (#7988972)

A lot of time wasting comes from that too. Even if you can think of a better implementation, if it isn't better by it's not worth the development time + debugging time to do it that way.

Re. the original post, I think a lot of the problem is caused by bad code commenting. When you make a "little tweak", or fix some minor bug, or fix a subtle logic bug, you should clearly comment in the code what you have done, so that it can serve as a warning when somebody else looks at the code and does not realise the subtlety involved.

Re:Design desitions (5, Insightful)

selderrr (523988) | more than 10 years ago | (#7988976)

I diesagree. Most rewrites come from the experience learned during long periods of adaptations. The roots of this rewriting problem go back to the source of all coding evil : specs.

In 15 years of coding, i have NEVER worked on a project that had specs which could foresee future futher away than say 4-6 years. After that, either the managers start pushing up new features that simply do not fit the original concepts, or you bump into uses of your software you did not foresee simply because the scale of applications has grown beyond the site of your own usage.

The last 4 years I've been writing an app for authoring psychology priming experiments (somewhat like e-prime, but with far more randomisation capabilities). In the original concept, no-one in our team expected someone to make randomisations wit a tree wider than 6 stages. So I went for 15 in my code. By now, 4 years later, I have seen projects with twice that depth. I could expand the code by changing some #defines to provide for larger arrays, but that ignores the fact that such complex randomisations demand a whole other interface. So after a few weeks of puzzling, we decided.. you guessed it : a rewrite.

Other People's Code Is Crap (0, Offtopic)

FatHogByTheAss (257292) | more than 10 years ago | (#7988862)

While mine is fine like wine.

Question (1, Funny)

Anonymous Coward | more than 10 years ago | (#7988891)

Did you eat lots of paint chips as a kid?

But.. But... (3, Funny)

devphaeton (695736) | more than 10 years ago | (#7988867)

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.

Microsoft has created an entire, successful, multibillion-dollar-a-year-profiting business model off of this!!

Sheesh.

Slashdot (2, Funny)

JM Apocalypse (630055) | more than 10 years ago | (#7988870)

In light of the preceding article, I propose that we completely rewrite slashdot! In BASIC! This will provide unsurpassed slowness and crashing, making the world better for all!

Re:Slashdot (3, Funny)

[TWD]insomnia (125505) | more than 10 years ago | (#7988910)

I propose we redesign Slashdot in brainf*ck instead.

Re:Slashdot (1, Funny)

Anonymous Coward | more than 10 years ago | (#7988930)

I propose we rewrite Slashdot in LOGO

RW (0)

Anonymous Coward | more than 10 years ago | (#7988876)

Did anyone else read this and wonder if your cd/dvd RW's were at risk?

Rewrite can be good, if done properly. (3, Interesting)

Metallic Matty (579124) | more than 10 years ago | (#7988877)

The trick is to include all the tweaks and fixes that were implemented in the old code. Obviously, if you rewrite and then leave open all the gaps and problems from the earlier version, there's no point in rewriting. However, you could rewrite with those fixes in mind, and come out with a completely new (and problem-free) edition.

Ego? (4, Informative)

Undaar (210056) | more than 10 years ago | (#7988883)

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.

Re:Ego? (2, Interesting)

CommieLib (468883) | more than 10 years ago | (#7988953)

There may be some of that, I suppose, but speaking as someone who is strongly advocating a rewrite for a new version, it's also a matter of just seeing vastly better ways of doing things now that you've had the benefit of the experience of v1.0.

Furthermore, all of the features that creep into v1.1, .2, .3, etc. that were not envisioned at all in v1.0 become code barnacles, stuck on to the coherent codebase and clinging for dear life. Better to create a new codebase that incorporates them as part of it.

I bet (0)

Anonymous Coward | more than 10 years ago | (#7988884)

...the next article will postulate that new versions of software can introduce new bugs. Egads. This is news! Glad I'm not a subscriber.

Here's a rewrite, so to speak (-1, Troll)

CmdrStallman (578747) | more than 10 years ago | (#7988886)

here [tgpfriendly.com]

Longhorn (1)

NeoGeo64 (672698) | more than 10 years ago | (#7988888)

In Windows Longhorn's case, I think an entire rewrite (or close to it) is a good thing.

There are so many unfixable flaws in the way Windows is built, and there are some other flaws that could be fixed -- but it'd require doing some major patchwork.

We won't know just how secure Longhorn is going to be until 2006, but if the past is any indication... well... yeah.

Re:Longhorn (1)

Junks Jerzey (54586) | more than 10 years ago | (#7988941)

In Windows Longhorn's case, I think an entire rewrite (or close to it) is a good thing.

And if there was ever a time to switch to someting besides Windows, this is it.

Re:Longhorn (1)

NeoGeo64 (672698) | more than 10 years ago | (#7988981)

As soon as I have enough cash for an Mac, I'm going to purchase one.

Windows ? (0, Redundant)

HawkingMattress (588824) | more than 10 years ago | (#7988893)

I didn't RTFA, but Windows, seems a pretty bad example of an useless rewrite, if we're talking about the rewrite from 9x to NT5

Re:Windows ? (1)

RadioheadKid (461411) | more than 10 years ago | (#7989089)

That wasn't a rewrite. The 9x/ME code base was separate from NT.

Damed if you do, damed if you dont. (5, Funny)

Kenja (541830) | more than 10 years ago | (#7988896)

Slashdoter: Why wont Microsoft just drop the Windows code base and start over? There are too many problems to fix.

Microsoft: Ok, Windows XP and 2003 have a full rewrite of the TCP/IP stack and security system.

Slashdoter: Why did Microsoft rewrite the core OS? They just introduced more bugs and lost the stability and security fixes from older versions of the OS?

"DAMNED" has an N in it (-1)

Proctal Relapse (467579) | more than 10 years ago | (#7988958)

but i'm not going to tell you where

Re:"DAMNED" has an N in it (1, Funny)

Kenja (541830) | more than 10 years ago | (#7989006)

"DAMNED has an N in itbut i'm not going to tell you where"

I do't kow what you're talkig about. I spelled damed correctly.

CONGRATULATIONS ON RECEIVING THE "DIPSHIT AWARD" (0)

Anonymous Coward | more than 10 years ago | (#7989073)

The correct word is "damn" as in the interjective vulgar.

YOUR spelling of "damed" would possible mean one of two things:

Either as an adjective (-ed) form of "dam" which is what holds back water.

Or as an adjective form of "dame" which is a slang term for a female.

Often times people will spell "damn-it" (correctly spelling) as "dammit" (incorrect but accepted spelling).

HTH HAND

Re:Damed if you do, damed if you dont. (1)

[TWD]insomnia (125505) | more than 10 years ago | (#7988970)

That means Windows cannot be written and rewritten properly, ever.

better than (1)

cmdr_forge (588346) | more than 10 years ago | (#7988899)

As projects get older, and developers get more experience in the programming area they often look back and find better ways of doing things...take a look at Enlightenment 17 development. They are constantly going back and making it better than what was initial scoped out. I would not be suprised if the next version is lightening fast than 16

Netscape 4.x fast? (4, Funny)

Anonymous Coward | more than 10 years ago | (#7988906)

Ok, this dude uses netscape 4.x and thinks its fast. next article please.

Tweaks only go so far... (5, Insightful)

Viral Fly-by (662186) | more than 10 years ago | (#7988909)

The minor tweaks, fixes, and changes that made the old version work so well can only go so far. Such is often the nature of code. Tiny fixes and patches are (sometimes haphazardly) hacked on to the code.

Perhaps if true extensive software engineering and documentation techniques were followed, a full rewrite may not be necessary. However, as long as quick fixes continue to pollute the code and make it more and more difficult to work with, an eventual total rewrite will always be necessary.

Accomodating fixes (1)

Erratio (570164) | more than 10 years ago | (#7988917)

I think rewrites are good, as long as they're done correctly. When fixes or compatibility issues are added to the initial version, they should be well commented and documented so that they are accounted for in any rewrite, and tested if the logic of the program has been rearranged (perhaps to better fix bugs in the first place). Ideally a rewrite makes it easier for bugs to be fixed. At the same time a program shouldn't need to be totally rewritten more than a couple times. After one time the code should have enough modularity so that pieces can be rewritten with small impact at a time.

Gah (0)

Anonymous Coward | more than 10 years ago | (#7988922)

I wish someone would rewrite 'ls'. It really needs to be optimized.

Re:Gah (0)

Anonymous Coward | more than 10 years ago | (#7988982)

OMG D00D YUO SHOULD USE TEH GENTOO LUNIX BECASUE IT LETS YOU OPTOMIZE TEH /bin/ls WITH -O3 AND -FOMIT FLAGS! YUO CAN GOES TEH REELY FAST!!!

Fucking Gentoo fanboys and fucking lameness filters piss me off to no end. Everyone needs to die painfully.

Interesting idea... no data (5, Insightful)

JohnGrahamCumming (684871) | more than 10 years ago | (#7988925)

I'm sympathetic to the idea behind this article, but does it deserve a place on /.? There's absolutely no empirical data, or even a reasonable example given in the document. The author is talking about IPv6 and Perl6 both of which are unknown quantities at this point.

He's right that just throwing away old code means yo u lose a lot of valuable bug fixes, on the other hand if you look at some code and realize there is a better way then the solution is to rewrite it.

Of course you can have it both ways. What you do is write an automated test case for every bug that you fix in your code. When you write the new version it has to pass the old test suite, then you've got new code and all the experience from the old code.

John.

The need to rewrite (1)

strredwolf (532) | more than 10 years ago | (#7988929)

I can see one good need to rewrite -- when old techniques no longer do a sufficent job. Take Perl 4 for instance. It's simple, yes, but not extendable. You had to write your own libraries of Perl code to do more complex tasks (sirc, anyone?). Then Perl 5 comes out... and introduces package spaces and Modules, plus alot of cleaner code!

A few of my perl scripts were just hacks. Patchy hacks that were dirty and buggy. I rewrote one, Anything, to be cleaner. Oh so much better.

Unix vs GNU/Linux (2, Funny)

kps (43692) | more than 10 years ago | (#7988933)

Ouch! There goes my karma!

Something is weak here (0)

Anonymous Coward | more than 10 years ago | (#7988935)

"if we just stayed in the same place, using the same versions of tools without improvement, then things would deteriorate"

I don't see why things wouldn't simply "stay the same". You should probably rewrite the whole article.

poo poo (-1, Troll)

Anonymous Coward | more than 10 years ago | (#7988942)

moo moo

Untrue (2, Insightful)

Shazow (263582) | more than 10 years ago | (#7988946)

Although I have an unhealthy habit of wanting to start things from scratch, I believe it can be a good thing more often than not.

When you've developed a piece of software, fixed its bugs, and tweaked it, more times than not, those fixes and tweaks are nothing more than workarounds for your currently flawed structure. Usually, you don't realize these flaws until AFTER you've created it.

By starting it from scratch, you can keep your mistakes in mind, and make better and more efficient software.

Sure, there are chances of running into new bugs, but isn't that what the whole learning process is about? The more you learn, the better the software will keep making. You can only go so far, if you need to turn a paper bag full of feces into an operating system. But if you start from scratch, you can create your own digitized significant other. You know, relatively speaking.

- shazow

Wow (5, Funny)

Boing (111813) | more than 10 years ago | (#7988947)

That article had about the highest flamebait-to-content ratio I've ever seen on Slashdot (and that's SAYING something).

This oughtta be good. (puts on asbestos-lined pants)

Rewrites are driven by maintainability (4, Insightful)

shaka999 (335100) | more than 10 years ago | (#7988949)

Your point is well taken about ego often driving rewrites but in my experience the driving force for rewrites is often maintainability.

As a program ages and drifts from the original intent ugly hacks are often placed on top of the original code to add unforseen functionality. There is also the opposite effect where old code is sitting around that no longer has any function. I remember one drastic case of this when rewriting a program where only about 1/2 the code was even beeing utilized.

By rewriting the code you clean things up and make it easier for future programers to understand what the code is doing.

Re:Rewrites are driven by maintainability (1)

jstave (734089) | more than 10 years ago | (#7989035)

I was going to make the same comment but you beat me to it. I would also add that as the code ages and becomes more spagetti-like , it gets harder and harder to extend without breaking. A point is reached where any additions or changes cause unexpected side-effects, *especially* once the original coders have left the project, or company.

Don't Forget To Include Winamp! (4, Interesting)

mikewren420 (264173) | more than 10 years ago | (#7988951)

For Windows users, Winamp is probably the best example I can think of. Take a stable, usable, simple and elegant audio player (Winamp2) and fuck it up by writing it from scratch (Winamp3), then ultimately abandon that clusterfuck rewrite in favor of yet another rewrite (Winamp5) that fixes what they fucked up with Winamp3.

I'm mighty happy sticking with Winamp2, thank you very much.

ReFactor! (3, Insightful)

gbr (31010) | more than 10 years ago | (#7988952)

Don't rewrite. Refactoring code is the way to go. Refactoring in small pieces allows the app to maintain compatibility as the process progresses.

DejaVu (1)

The Bungi (221687) | more than 10 years ago | (#7988957)

Was it a "good idea" for Microsoft to rewrite Windows as XP and Server 2003? I don't know, it's their code, they can do whatever they like with it. But I do know that they had a fairly solid, reasonable system with Windows 2000 - quite reliable, combining the better aspects of Windows NT with the multimedia capabilities of Windows 98. Maybe it wasn't perfect, and there were a lot of bugs and vulnerabilities - but was it really a good idea to start from scratch? They billed this as if it was a good thing. It wasn't. It simply introduced a whole slew of new bugs and vulnerabilities, not to mention the instability. It's just another example of where a total rewrite didn't really do anyone any good. I don't think anyone is using Windows for anything so different now than they were when Windows 2000 was around, and yet we're looking at a 100% different codebase. Windows Server 2003 won't even run some older software, which must be fun for those users...

2003: HAHAHA, M$ IS TEH SUX, thye shuld reWritee tehir WINDOZE from sctratch!!! HAHAHA!!!

2004: HAHAHA, M$ IS TEH SUX, thye reWriteed tehir WINDOZE from sctratch!!! HAHAHA!!!

Legendary Troll Site Unplugged!! (-1, Troll)

TrollBridge (550878) | more than 10 years ago | (#7988961)

A certain not-to-be-named troll website has been taken down [yahoo.com] !!

Even if you've never posted a hidden redirect, you can't discount the site's contributions to the Slashcode.

Maintainability (5, Interesting)

PhxBlue (562201) | more than 10 years ago | (#7988962)

The other side of the rewrite issue is, how long can you continue to maintain code from a legacy system? I worked on a project a couple years ago that had been migrated from assembler to COBOL and is now being rewritten (as opposed to being redesigned) for Oracle. Nevermind for a moment the fact that the customers wanted to turn the Oracle RDBMS into just another flat-file system--which included designing a database that had no enabled foreign key constraints and that was completely emptied each day so that the next day's data could be loaded. . .

Some of the fields that are now in the Oracle database are bitmapped fields. This is done because there's no documentation for what those fields originally represented in the assembler code and because the designers are afraid of what they might break if they try to drop the fields or attempt to map the fields out into what they might represent. I had the good fortune to get out of the project last August. . . last I checked, they had settled for implementing a Java UI over the COBOL mainframe UI.

Anyway, my point is this: at some point, you have to decide whether the system you're updating is worth further updates. Can you fix everything that's wrong with the code, or are there some things you'll have to jerry-rig or just shrug your shoulders and give up on? Under circumstances like what I mentioned above, I truly think you're better off taking your licks and designing from scratch, because at least that way you can take advantage of the new features that more recent database software and programming languages have to offer.

Rewrites aren't bad (0)

Anonymous Coward | more than 10 years ago | (#7988964)

First of all, there is such a thing as good enough. Take a look at a lot of the gnu utilities. Some sit at version numbers like 0.17.0, because they're good enough.

However, big projects are obviously more complicated, and a lot harder to get right. There is a lot more to a program than just the source code. It is entirely possible for the source code to be totally bug free, and yet for the product to be fatally flawed. The problem is the design of the program. In all of the cases mentioned (that I have any knowledge of to begin with) the design of the original was flawed. Rewrites may toss out well tested bug-free code, but they do so in order to create well tested bug-free designs. I will gladly take a good design and buggy code over good code and a bad design any day.

Can someone mod the whole article Flamebait? (0)

Anonymous Coward | more than 10 years ago | (#7988966)

Yo, moderators...

Yeah, really. Mod the whole stinkin' article flamebait.

-A

IPv4 vs IPv6? (1)

john_smith_45678 (607592) | more than 10 years ago | (#7988975)

So we should stick with IPv4?

Full of shit. (4, Insightful)

iantri (687643) | more than 10 years ago | (#7988977)

This guy is full of shit and has no idea of what he is talking about.

Some of the better parts:

- He claims that The mozilla project and everything Netscape >4 is pointless and that Netscape 4 "just works". We all know that Netscape 4 is an awful, crashy, buggy, standards-breaking piece of crap that set the Internet back years.

- He claims that Windows XP was a complete rewrite. Windows XP is NT 5.1 -- (check with ver if you want) Windows 2000 with the PlaySkool OS look.

I don't get it. (1)

User 956 (568564) | more than 10 years ago | (#7988980)

When is "good enough" enough? ... 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 don't get it. Windows 95 was a piece of crap. Are you saying they should have extended that codebase, instead of developing Windows NT onward, into WinXP? Basically, you're *complaining* that Microsoft acknowledged the crappy, unstable nature of Win95, and tried to create a better product?

What kind of fucked-up bizarro-world logic is that?

Fluff Article (4, Insightful)

SandSpider (60727) | more than 10 years ago | (#7988983)

Okay, so most of the article consists of, "Here's software X. They re-wrote it, and now it's not as good or as accepted. Why'd they do that? They suck."

Software is re-written for many reasons. Sometimes it's ego, sometimes it's for fun, but usually it's because you take a look at the existing codebase and what you want to do with it in the future, and you decide that it's going to cost a lot less to implement the future features by re-writing and fixing the new bugs than to work around the existing architecture.

I've had to make the re-write or extend decision more than once, and it's rarely a simple decision.

What I would have preferred from this article is some interviews with the people responsible for the decision to re-write, and what their thinking was, as well as whether they still agree with that decision or would have done something differently now.

=Brian

Structural bugs (2, Interesting)

GrouchoMarx (153170) | more than 10 years ago | (#7988988)

Sometimes, rewriting from scratch is necessary to remove bugs. Not all bugs are just failure to check a buffer overflow, which can be fixed without a complete rewrite. Sometimes your basic communications architecture in the program is fundamentally flawed and insecure. At that point, by the time you've fixed that bug in the existing codebase it would have been easier to start from scratch and make everything else work "natively" on the new internal standard.

Take for example, Windows. ;-) There are fundamental security issues with all GUI windows operating in the same user space. If one is compromised, they're all 0wnz3d. That's a reasonably major flaw, but to fix it would require essentially rewriting the entire GUI portion of Windows, because it's so integral to the system. To try and fix that without a rewrite would be harder and more complicated than chucking it and starting from scratch, and probably introduce a dozen other bugs in the process.

Sometimes you really do need to throw out the baby with the bath water, if the baby is that dirty. Besides, making a new one can be fun! :-)

Joel on software article (5, Informative)

mitchner (524884) | more than 10 years ago | (#7988992)

Joel on software has covered this point in a good article: http://www.joelonsoftware.com/articles/fog00000000 69.html [joelonsoftware.com] .

Re:Joel on software article (1)

Lester67 (218549) | more than 10 years ago | (#7989087)

That article was also previously covered on /.

Coming up next: YESTERDAY'S WEATHER! Stay tuned. :-)

Who is this tool? (1)

jsimon12 (207119) | more than 10 years ago | (#7988994)

Who is this guy? Rewrites done properly and for the correct reasons are great. One would think after seeing everything Microsoft spews out that people would realize heaping code on top of code isn't good. For starters it is unlikely that you have the same programmers working on a codebase after more then a year or two and most code isn't exactly well documented. So you see dupplications. As for getting read of tweaks? Huh? Where does he get this stuff?!?!? Then again if you read the artcile he still uses Netscape 4.08, WTF? it has known bugs out the yingyang.

So back to my first question, who the hell is this guy?

Re:Who is this tool? (1)

gregarican (694358) | more than 10 years ago | (#7989063)

Checking some of his other websites I found a nice picture of him [crazyguyonabike.com] from one of his long bike trips. He looks like a real sharp one whose viewpoints are to be seriously considered. Truly a Renaissance Man of our time to be reckoned with.

Good Enough? Never! (1)

zangdesign (462534) | more than 10 years ago | (#7988996)

There is only "good enough for now". Rewriting software is good from several standpoints:

1. It may be possible optimize slower areas of the code
2. It may be possible to take umpteen patches and merge them into the regular code flow
3. It may be possible to move modules outside the main code base
4. etc., ad infinitum
X. it may be billable as a new product (for commercial software only)

Anyone who sits back and says a given codebase is "good enough for now" needs to be consigned to the scrapheap of history and quickly. You should always keep an eye out fot a better way.

I didn't read the article (4, Funny)

billnapier (33763) | more than 10 years ago | (#7988997)

It was too messy and unmaintainable. I'll wait until the rewrite comes out to fix all the grammer and spelling bugs.

Mozilla vs. Firebird (0)

Anonymous Coward | more than 10 years ago | (#7988998)

Hmmm.. rewrite good or bad?

Try Mozilla classic.
then
Try Firebird and Thunderbird.

Firebird and THunderbird taking over...

Highly selective. (0)

Anonymous Coward | more than 10 years ago | (#7988999)

I notice the author brings up Perl 5 versus Perl 6.

What he doesn't do is bring up Perl 4 versus Perl 5. Or Perl 3 versus Perl 5. Or Perl 1 and Perl 2.

Perhaps it's because he's happy to admit that, unlike his predictions, old versions really do die out because their successors are so much better.

rewrite, but do it correctly (2, Interesting)

tvykruta (738855) | more than 10 years ago | (#7989001)

As a video game developer, I've been involved in many "code upgrades", as well as rewrites. As long as the rewrite is being done by people who wrote the original code, and they invest time in some preproduction carefully thinking through what they did right and wrong, the rewritten product will always be faster, more stable, easier to maintain, etc. etc. In the end it's always been a clear winner.

I think the department says it all (1)

gerardlt (529702) | more than 10 years ago | (#7989002)

I know I always get a real buzz when I start with a fresh clean slate.

However, I know that often that biggest gain will arise from the difficult mental process of working with what I already have. It is hard because it forces me to question myself.

This guy knows nada about IPv6 (1)

^BR (37824) | more than 10 years ago | (#7989003)

Not even that the new addresses are 128 bits long and not 64 like he states repeatedly...

And prefering Netscape 4 to Mozilla, I want some of the stuff he takes...

IPv6 address size cut in half? (1)

GT_Alias (551463) | more than 10 years ago | (#7989005)

From the article:
Apparently IPv6 will solve all these problems, with a brand new standard that uses 64 bits.
...
Many, many applications work with IPv4 and assume that addresses will be 32 bit, not 64 bit (as IPv6 specifies).

That's a pretty glaring error, if we're talking about the same IPv6 spec [isi.edu] .

Joel Spolsky (4, Informative)

Boing (111813) | more than 10 years ago | (#7989010)

Joel of Joel on Software [joelonsoftware.com] has written a much more insightful and useful (IMO) analysis of the motivations and fallacies behind code rewrites.

Things You Should Never Do, Part I [joelonsoftware.com]

Rewriting isn't ALL bad (0)

Anonymous Coward | more than 10 years ago | (#7989016)

From my experience anyway. I digress, this is in the context of university assignments, where a rewrite takes a matter of a few hours, but I've had code that refused to work even though I could trace it logically and there didn't seem to be any problems. After getting fed up, I toasted it and started from scratch, with the fresh idea in my mind of how it was supposed to work, and it came out perfectly.

What !? (1)

iantri (687643) | more than 10 years ago | (#7989024)

What does a web browser do today that is so different to what was being done by Netscape 4.x? Nothing much, as far as I can see. Rendering HTML is something that Gecko can do quite well, but not all that much faster (as far as I can tell) than 4.x. In most cases, 4.x is perfectly "good enough" for me.

This is a joke, right?

Please tell me it is a joke.

Refactor to reduce the risk (1)

Coot (87864) | more than 10 years ago | (#7989032)

There is often a good reason for the rewrite, or the fork, and there is no reason why fear of introducing bugs should stop a rewrite.

The key is to use refactoring methods to do the work, rather than rewriting from scratch. Implement a unit test framework for the software you want to rewrite, and then do the rewrite through a process of incremental change, running the test suite after each change. This method reduces the risks that would otherwise make the effort seem foolhardy and not worth the effort.

Incorrect Facts, Conclusions Questionable (1)

ion (18545) | more than 10 years ago | (#7989040)

I had to force myself to keep reading the article after the first case study. The simple fact that he cannot even get his facts straight (IPv6 has a 128 bit address space) does not help his argument.

For a much more coherent argument against re-writes see Joel on Software [joelonsoftware.com] , where he argues throwing everything out and starting fresh is a bad idea. He argues for evolutionary refactoring away old code.

eh, -1 flamebait for the whole article... (3, Insightful)

SerialHistorian (565638) | more than 10 years ago | (#7989041)

Rewrites are 'bad' from a management point of view (at least, a manager that isn't familiar with software development), which looks at return on investment (ROI).

However, from a developer's point of view, a partial or complete rewrite is sometimes the only way to FIX certain bugs. While it may introduce new, small ones, usually developers are smart enough to read the old code and learn from it's mistakes before the do a rewrite.

A partial or complete rewrite is ALSO sometimes the only way to fix 'spaghetti code' -- code that's become so tangled from patch upon patch being applied to it that it's now impossible to trace and fix a bug. If spaghetti code isn't pursued and rewritten on a regular basis (this is 'constant improvement' -- a management buzzword from the past few years that actually works), new bugs can be inadvertantly introduced -- and it can sometimes take weeks to hunt down an intermittant bug by tracing spaghetti code. Ladies and gents, WEEKS of programmer time is expensive compared to one programmer spending 8-10 hours per week tracking down bad code in the codebase and rewriting it.

Really, there's a case for doing rewrites on a constant basis. The author should have instead addressed adequate testing in software development environments...

Times they are a changin (1)

the_rev_matt (239420) | more than 10 years ago | (#7989042)

Perhaps it has something to do with the fact that as technology changes, and the ways technology is used changes, the original design fails to efficiently and effectively meet the needs of the users. New features and functionality that weren't considered in the original architecture add stability and security issues. You reach a point where it makes more sense to take all of that knowledge gained from the current codebase and build a brand new one that takes into account all of the tacked on features and enhancements. And you will have to do it again once the "new and improved" version has been revised a few dozen times.

Apple OS X Aqua (1, Interesting)

WolF-g (539252) | more than 10 years ago | (#7989043)

The Aqua interface for OS X was completely rewritten for 10.2 Jaguar last year, and it was amazing. Things got alot faster and more intuitive.

Regression testing... (1)

kfractal (107548) | more than 10 years ago | (#7989047)

without it rewrites are dangerous. Well, just about any coding is :)

Just Pissed (1)

RadioheadKid (461411) | more than 10 years ago | (#7989048)

This guy is just pissed he has to learn new stuff.

When is good enough "good enough" (1)

StupaflyD (729788) | more than 10 years ago | (#7989055)

Damn skippy - what's wrong w. vi hmm?

While we're at it... Things that are "good enough"
-Rogue -- screw that quake shit
-BBSes -- you and your damn internet
-USurper -- true way to game
-Pong -- better than CS any day.
-Hell, even Tecmo Bowl -- umm... yea.
-XT/AT/386/etc. -- hack the Gibson w. your 1337 h4rdw4re
-pron. -- yea... cuz 70's dick w. sideburns was good enough.

Second-system effect (1)

Chunky Kibbles (530549) | more than 10 years ago | (#7989056)

Woohoo! he's discovered the second-system effect. Can I recommend people read some of JWZ's netscape ramblings, and "The Mythical Man Month" by Fred Brooks, Jr.

Gary (-;

Rewrites are Good (2, Insightful)

RichiP (18379) | more than 10 years ago | (#7989058)

As a software designer, developer, programmer and user, I have to saw that rewrites done right are A Good Thing(TM). When I do a rewrite, it is with the intention that it is to be better than the old one. I only do rewrites when a limitation of the old code base has been reached or can be foreseen to be reached.

When a rewrite is to be made, it goes without saying that anything learned from previous development should also be applied to the newer project. If you can't learn from the mistakes of the past, don't do a rewrite.

It is not rewriting, per se, that is the problem. It is choosing WHEN to do a rewrite. Unless there is sufficient reason to do one (ie. old code hard to maintain, scalability problems, old code reaching its maximum potential, etc.), of course one should stick to improving on existing one. If, however, the reason is that so "we could have something new", or so that "we could say we did a rewrite" or "I'm the new architect around here. Scrap the old code and write my design", then of course rewrites might be more trouble than they're worth.

All common sense.

What a stupid article (1)

tstoneman (589372) | more than 10 years ago | (#7989060)

How can you say rewrites are bad? That is simply ridiculous. Without rewrites, there would be no progress. Sure, people get inconvenienced, but it's a minor inconvenience relative

There are some rewrites that are simply horrible and make no sense. But every single one of the examples that the author gives is an example of a GOOD rewrite!

Apache 2.0? Mozilla? Perl? This is ridiculous. I love Apache 2 and Mozilla (I don't use Perl) and find Mozilla much smoother to use than Netscape. These are platforms that people will be using going forward. If going forward is impeded by the current architecture of the software, YOU NEED A REWRITE.

A bad rewrite is when it completely breaks everything and no one migrates to the new version because there is no gain for anyone involved.

And Windows 2K -> XP -> 2K3 were not rewrites. They are evolutionary changes... now the author doesn't think that software should be improved or changed to add functionality???

Software sucks (0)

pudchuck (321767) | more than 10 years ago | (#7989062)

If an application was designed correctly then it could have a much longer life. Just look at the physical world, good buildings, beautiful structures are around forever. Bad ones are burned for insurance claims. I think bad design is rampant in our profession, and I'm as guilty as anyone.

Humbug (1)

Jahf (21968) | more than 10 years ago | (#7989068)

When you rewrite a project, it is obvious it is going to cause new issues. If you are paying attention, you make use of experience and/or at least view the patches and changelogs of the product you're replacing so that you don't incorporate too many of the old problems along the way.

What I've read seems like most who worked on Netscape 2.x through Netscape 4.x would agree it was time for new architecture. It was probably time for new architecture in the Netscape 3.x timeframe but corporate pressures were high to produce quantity instead of quality. The codebase was just too rigid, especially in the rendering engine, to keep up with emerging standards.

The point is that -not- rewriting may be safer in the short term, but often guarrantees your product is going to have feature lock and eventually obsolescence. ...

A bit of a push off-topic, but I think this is a lesson I think TiVo may be about to learn the hard way as most of their new versions are only new feature releases, not updates to improve the core of how the products work, which has begun to limit the efficiency of their product (ie, as the drives in the product get larger, the inefficiency of how the TiVo handles it's database becomes more apparent) and what types of features that they can add. I'm not saying they need to scrap everything, but rewriting some of the underlying system is going to have to happen at some point.

Sometimes ya just have to re-write (4, Insightful)

hcg50a (690062) | more than 10 years ago | (#7989069)

From the Perl 6 development [perl.org] webpage:

"The internals of the version 5 interpreter are so tangled that they hinder maintenance, thwart some new feature efforts, and scare off potential internals hackers. The language as of version 5 has some misfeatures that are a hassle to ongoing maintenance of the interpreter and of programs written in Perl."

For me, this is a necessary and sufficient condition for rewriting something.

Another one is: When changing the original will take longer than rewriting from scratch.

Heard it before (1)

squiggleslash (241428) | more than 10 years ago | (#7989070)

A "rewrite" is often harmful, but not always so. Unfortunately the automatic presumption that one is tends to prejudice people against the concept when it's absolutely necessary.

I've rewritten entire projects because they had entirely the wrong design, difficult to maintain, unreliable and would never have been capable of performing what they sought to do. (If you bring in consultants to start a project, you are often guaranteed to end up with code like this.) That's not to say that I haven't looked for ways to keep existing code where it could fit in the new structure, but it's often just absolutely necessary, and often the hardest thing to explain to whoever it is who's paying the bills.

Sometimes legacy designs do cripple a potentially good system. I also think that Mozilla is an example of good to come out of the "We ought to rewrite this" camp - it took an age to appear, but once it did, it was excellent, far better than anything else (and still is.) Some people took exception to Mozilla's relatively slow user interface and rewrote those entire chunks (Chimera/Camino, Galleon, Phoenix, and others), and these, again, proved to be worthwhile rewrites.

The critical thing when rewriting a project is not to get carried away. Frequently 90% of what's needed is restructuring, not rewriting per-se. Old code can often be recycled and restructured to fit into the new framework. But sometimes it's absolutely necessary to call a halt, realise a lemon is a lemon, and create something fresh.

I can only say one thing: (2, Funny)

Enahs (1606) | more than 10 years ago | (#7989081)

Enlightenment DR17.
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>