Hacker News new | ask | show | jobs
by ooOOoo 4252 days ago
On the opposite side, there is http://www.joelonsoftware.com/articles/fog0000000069.html "the single worst strategic mistake that any software company can make: They decided to rewrite the code from scratch."
2 comments

Rewriting from scratch when the old code is completely thrown away is a very expensive process. Joel is advocating a safer approach where you take the long route and refactor the system gradually. This is actually pretty close to what Martin is saying too where you gradually transform your legacy system into something new by refactoring the old architecture and, if/when necessary, splitting bits from the old monolith system into microservices (for example).
I've re-written a couple of systems. I think sometimes a refactor is a lot more expensive. e.g old system was written in actionscript/flash. The old devs left and lots of little bugs. Best to just rewrite in HTML/JS that works on mobile and you have full control.

Another example. This dude had a giant wordpress site with a bazillion plugins. It worked but when something went wrong he couldn't figure jack shit and couldn't add more. Re-wrote it with a CMS, he got a 100x boost on how fast he could get things done.

Sometimes the old just needs to be replaced with the new.

Are you sure you rewrote a "system"? Or a program?

Fred Brooks makes a distinction between a program, a product, a system, and a "programming system product" (what I believe Joel was thinking about when he was talking about Netscape)

"A product (more useful than a program):

can be run, tested, repaired by anyone

- usable in many environments on many sets of data.

- must be tested

- documentation

Brooks estimates a 3x cost increase for this.

To be a component in a programming system (collection of interacting programs like an OS):

- input and output must conform in syntax, semantics to defined interfaces

- must operate within resource budget

- must be tested with other components to check integration (very expensive since interactions grows exponentially in n).

Brooks estimates that this too costs 3x.

A combined programming system product is 9x more costly than a program.

http://www.cs.usfca.edu/~parrt/course/601/lectures/man.month...

http://books.cat-v.org/computer-science/mythical-man-month/t...

Greatly misunderstood essay. What joel says is:

"Once you have gained traction, never ever allow yourself to be caught without ship-able product"

Also old code indeed rusts. Framework, API, binaries, libraries change, sometimes in very subtle ways, so a perfect piece of code that was written for php 3.2, apache 1.1 and MySQL 3 and left untouched for a decade just refuses to work when php ticks from 5.3 to 5.4