Live data from Hacker News

Why We Threw out All Our Code (And Why You Should Too)

blog.nowjs.com

11–20 of 66 posts

Re: Why We Threw out All Our Code (And Why You Should Too)

#11
post #4

They threw out 3 months of work... That's not a rewrite, that's a prototype. People do this all the time.

+100 - the biggest questions (to me) were HOW MUCH code did they throw out, and how old was it? Throwing out a few months of code you just finished writing (and which you're still intimately familliar with) is vastly different to throwing out a code-base that would be entering middle-school if it was a person.

Re: Why We Threw out All Our Code (And Why You Should Too)

#14
post #7

Throwing out all your code and rewriting it from scratch is like demolishing your building and constructing a replacement from scratch. It's usually not the right thing to do, it occasionally and rarely is the right thing to do, and it's always the tempting thing to do. It's stupid to argue, "You should never tear down a building" (like http://www.joelonsoftware.com/articles/fog0000000069.html implies) and it's also…

Right.

In this case it was 3 months worth of code. I think the analogy is closer to "we tore down this clay hut we built". Easy to build, easy to tear down.

If this were a mature code base, I would be a little more shocked.

Re: Why We Threw out All Our Code (And Why You Should Too)

#18
Netscape 6 is (or was) the oft quoted example of why not to do this. All that old code may seem old and boring, but it has a huge amount of knowledge, wisdoms, learnings, fixed mistakes, performance improvements, great ideas, deleted bad ideas and security fixes built into it.

When you throw out your code you're throwing out all that knowledge on the assumption that you can build it all back with improvements.

Evolving an application from a known good state to a known better state is usually the best approach unless your codebase is small or your app has no traction.

Rewriting your app from the ground up is like getting divorced and dating a new girlfriend. The first few months are a lot of fun until you figure out how much you lost.

Re: Why We Threw out All Our Code (And Why You Should Too)

#19
post #4

They threw out 3 months of work... That's not a rewrite, that's a prototype. People do this all the time.

+100 - the biggest questions (to me) were HOW MUCH code did they throw out, and how old was it? Throwing out a few months of code you just finished writing (and which you're still intimately familliar with) is vastly different to throwing out a code-base that would be entering middle-school if it was a person.

I don't know what the old codebase is like, but the current one is just 2145 LOC, not counting tests. 62K total.

I know that startups do way more that just write code, so I'm not criticizing them at all. And it seems they're not afflicted with the typical engineer modesty when it comes to their own codebase, which is a good thing. On the other hand it's not exactly a superhuman hacking achievement to rewrite this from scratch.

Re: Why We Threw out All Our Code (And Why You Should Too)

#20
Once you start making revenues from your code, a complete rewriting is probably the worst thing you can do for your company. Sometimes it might be warranted, but customers care about solving problems, not about technology.

Chances are if you wrote properly modularized code, you can rewrite modules one by one, which is perfectly legit. But just dropping everything and trying to rewrite a product from scratch is a mistake that a company usually only makes once (before they die).

Post reply on HN