Live data from Hacker News

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

blog.nowjs.com

41–50 of 66 posts

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

#41
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…

How often do you build a prototype building? Or a building as a side project? Your analogy fails, sir. It's easier and more common to write dirty code that functions as it should than build a building with poor foundation but that looks and functions as it should.

> How often do you build a prototype building? Or a building as a side project?

This is one of the most amazing things about rapidly growing cities in most of the world. Neighborhoods that start out as informal shanty-towns full of lean-tos with leaky roofs become, over the course of years, first neighborhoods with modest but permanent cement block buildings and tin roofs, and sprout all the typical urban amenities like power lines and sewers (often at first pirated ad-hoc from other nearby neighborhoods), have their roads paved, etc., and a few decades later look like normal neighborhoods, sometimes even surprisingly gentrified ones.

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

#42
post #37

Earlier quoted context omitted.

How often do you build a prototype building? Or a building as a side project? Your analogy fails, sir. It's easier and more common to write dirty code that functions as it should than build a building with poor foundation but that looks and functions as it should.

People build temporary structures all the time -- event tents, for example. And plenty of people finish a room, redo a bathroom, build a treehouse or a shed, etc, as a side project. And believe me, it takes a high level of expertise to inspect a building. Many of the most important kinds of flaw are only evident to the eye of an expert.

Yup, but a tent is not a building. And going from a tent to a building requires you to take apart the tent in almost all cases, no?

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

#43

Earlier quoted context omitted.

How often do you build a prototype building? Or a building as a side project? Your analogy fails, sir. It's easier and more common to write dirty code that functions as it should than build a building with poor foundation but that looks and functions as it should.

> How often do you build a prototype building? Or a building as a side project? This is one of the most amazing things about rapidly growing cities in most of the world. Neighborhoods that start out as informal shanty-towns full of lean-tos with leaky roofs become, over the course of years, first neighborhoods with modest but permanent cement block buildings and tin roofs, and sprout all the typical urban amenities l…

Absolutely, as someone who grew up in a city like Mumbai, I know much about shanty towns and from my knowledge of them, they are far from ideal. ie. They are not know for a strong foundation, cleanliness, longevity etc. They are constantly hacked and patched by its residents to ensure basics like protection from rain, electricity and basics like a toilet.

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

#44
post #30

Please bear in mind the counter article everyone is citing ( http://www.joelonsoftware.com/articles/fog0000000069.html ) was written 11 years ago. I'm not saying that it's wrong because it's from 11 years ago, but you really want to consider its central example. Netscape 6.0 was a complete rewrite. The article claims that this was a mistake. Now, if you would recall, one of the reasons Netscape 6.0 was completely rew…

Throwing away Netscape 4 and rewriting it from scratch wasn't a bad decision because nothing good ever came of it; it was a bad decision because it killed the company . The shattered remnant of Netscape that hobbled across the finish line to release "Netscape 6" wasn't even Netscape anymore, it was a rapidly fading division of AOL, IIRC, that just stamped its name on a Mozilla product it had little to do with produci…

To be pedantic, there is at least one fate worse than the Total Death we observed: Total Death + no Gecko.

Even though ths external case is stronger, this holds true even from the company's perspective. AOL continued to release Gecko-derived browsers through 2007. They got something from that (even if it was just AIM installs and propping up the fading Netscape brand for other purposes).

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

#45
post #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. Evolvi…

Without Netscape 6, we wouldn't have had Phoenix/Firebird/Firefox, and probably wouldn't have IE7, IE8, IE9 and KHTML/Webkit would have come about very differently and all these would have had much less competition.

Netscape 6, or at least the mere fact that it existed and worked well enough and the fact that it was the first browser ever that did standards well and focused on not much else other than standards, made it the most important browser ever created.

Netscape 6 was the most revolutionary browser project ever created and had the development effort behind Netscape 6 not been done, we would possibly have had a much worse very IE-only web today.

Never mind that beyond all that, Netscape 4 was terrible and deserved to be thrown out.

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

#46

Earlier quoted context omitted.

> How often do you build a prototype building? Or a building as a side project? This is one of the most amazing things about rapidly growing cities in most of the world. Neighborhoods that start out as informal shanty-towns full of lean-tos with leaky roofs become, over the course of years, first neighborhoods with modest but permanent cement block buildings and tin roofs, and sprout all the typical urban amenities l…

Absolutely, as someone who grew up in a city like Mumbai, I know much about shanty towns and from my knowledge of them, they are far from ideal. ie. They are not know for a strong foundation, cleanliness, longevity etc. They are constantly hacked and patched by its residents to ensure basics like protection from rain, electricity and basics like a toilet.

And that's how New York and Rome and Shanghai grew into world cities. They didn't pave them over and start from scratch. They grew out of shantytowns.

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

#47
post #23
post #15

3. Sunk costs and egos get in the way of good software Egos are what drive people to throw away their entire codebase and start over.

Depends on the angle. The person that wrote the codebase is usually the one holding onto the old codebase due to ego. On the other hand, new people that come in and don't like things can be full of ego in the sense of, "I could program this better without any limbs!"

Egotistical engineers always think this time things will be different, because they're smart enough to do it right. The reality is that every rewrite brings a new and different set of problems that need to be addressed. You don't escape problems by scrapping it all and starting over and this is one of the most valuable lessons to learn as an engineer.

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

#48

A few people have pointed out that it’s easy to throw out your code when you (a) have tests for it, and (b) only have three months invested in it. I agree with both of those points, but want to tip my hat to a team that rewrites their code after three months. The reason some code bases can’t be rewritten after a few years is because when the code was only three months old, the team passed on the chance to rewrite it…

Very much agree. An extra layer on the danger cake (for web apps) is if your user base grows slowly while keeping the business profitable. Suddenly (sic) you hit real capacity limits after n years, and have no idea how the "organically grown" code in question works.

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

#50
post #30

Please bear in mind the counter article everyone is citing ( http://www.joelonsoftware.com/articles/fog0000000069.html ) was written 11 years ago. I'm not saying that it's wrong because it's from 11 years ago, but you really want to consider its central example. Netscape 6.0 was a complete rewrite. The article claims that this was a mistake. Now, if you would recall, one of the reasons Netscape 6.0 was completely rew…

Throwing away Netscape 4 and rewriting it from scratch wasn't a bad decision because nothing good ever came of it; it was a bad decision because it killed the company . The shattered remnant of Netscape that hobbled across the finish line to release "Netscape 6" wasn't even Netscape anymore, it was a rapidly fading division of AOL, IIRC, that just stamped its name on a Mozilla product it had little to do with produci…

In support of your comment, I think some are forgetting how horrible Netscape 6 actually was to use. (Or am I just getting old? It wasn't that long ago!)

Compared to earlier versions it was incredibly slow—even by the standards of the time—and crashed a bit more frequently. It took much longer to load or perform some common tasks. Sure, the rendering engine was better for many pages, but browser sniffers were still common, and (like now) weren't updated often enough, so bad versions of sites got served occasionally too.

There were a host of reasons why Netscape 6 was bad from a user's perspective. Spolsky has it right when he says Netscape 6 was a piece of junk. Let's not allow time passing to permit us to remember it more fondly.

Sure, future versions got better, but that was due to he creation of a new "corporate" memory. It took a while to get over having discarded so much learning.

Post reply on HN