Live data from Hacker News

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

blog.nowjs.com

1–10 of 66 posts

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

#5
Rewrites are always fun and I applaud any man brave enough to undertake such an effort.

I've often been faced with a situation warranting a rewrite, but I never mustered the courage to actually go with a full rewrite I don't think. Gradual rewrites are much more my thing.

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

#6
post #2

I've never used NowJS nor looked at the source for it, so I can't comment about their justification for a rewrite. But most programmers I know don't need any encouragement to rewrite stuff, myself included!

That's the attitude I am trying to avoid these days. When I look at something that I want to rewrite I now ask the following questions,

1. Do I have sufficient tests and testing to do this without breaking things?

2. Do I want to want to rewrite because I cant be bothered understanding it?

3. Is there going to be any gain now or in the near future by rewriting it?

4. Will I be able to rewrite it sometime in the future as part of another piece of work which actually delivers value?

Unless I come up with Yes, No, Yes, No I tend to leave it alone. There are other things of value I can do with my time.

EDIT - Formatting...

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

#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 kinda stupid to write an article entitled, "Why We Tore Down Our Building (And Why You Should Too)"

Neither is universally right. The right thing to do in a given situation is a difficult and complicated question to answer, and it depends on the building in question: how big it is, how well it was designed, how well it's been maintained, etc.

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

#8
post #5

Rewrites are always fun and I applaud any man brave enough to undertake such an effort. I've often been faced with a situation warranting a rewrite, but I never mustered the courage to actually go with a full rewrite I don't think. Gradual rewrites are much more my thing.

I've been really really tempted to do one, but sadly the pressures of the job take precedence and so it usually ends up being the case that you stick with the code you've got and try and hack extra things in, knowing full well you really don't want to and aren't at all happy with it.

So my 'rewrites' sometimes come in the form of superficial organisation. Looks moderately nicer, doesn't work any better.

I guess it is courage though. You don't really know that your rewrite will be an actual improvement, or if you'll even pull it off. Brave move indeed.

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

#10
post #6
post #2

I've never used NowJS nor looked at the source for it, so I can't comment about their justification for a rewrite. But most programmers I know don't need any encouragement to rewrite stuff, myself included!

That's the attitude I am trying to avoid these days. When I look at something that I want to rewrite I now ask the following questions, 1. Do I have sufficient tests and testing to do this without breaking things? 2. Do I want to want to rewrite because I cant be bothered understanding it? 3. Is there going to be any gain now or in the near future by rewriting it? 4. Will I be able to rewrite it sometime in the futur…

Thank you, these criteria just saved me from tearing down a building.
Post reply on HN