Live data from Hacker News

Throwing away 18 months of code and starting over

tompiagg.io

11–20 of 89 posts

Re: Throwing away 18 months of code and starting over

#11
It's not really hinted at in the article, which doesn't actually mention whether the rewrite was a net gain - I presume it was or they wouldn't have written the article, and the lead-in picture paints a rosy picture, but the tone at the end suggests he's not happy with how things turned out.

But one thing that used to be a common design anti-pattern was the "version 2 problem". I think I first heard about it when Netscape were talking about how NN2 was a disaster, and they were finally happy with NN3 or NN4.

Often version 1 is a hastily thrown together mess of stuff, but it works and people like it. But there's lots of bad design decisions and you reach a limit with how far you can continue pushing that bad design before it gets too brittle to change. So you start on version 2, a complete rewrite to fix all the problems and you end up with something that's "technically perfect" but so overengineered, it's slow and everybody hates it, plus there are probably lots of workflow hoops to jump through to get things approved that you end up not making any progress, and possibly version 2 kills the product and/or the company.

The idea is that the "version 3" is a pragmatic compromise - the worse design problems from version 1 are gone, but you forego all the unnecessary stuff that you added in version 2, and finally have a product that customers like again (assuming you can convince them to come back and try v3 out) and you can build into future versions.

To a large degree I think this "version 2 problem" was a by product of waterfall design, it's certainly been less common since agile development became popular in the early 2000s and tooling made large scale refactoring easier, but even so I remember working somewhere with a v1 that the customers were using and a v2 that was a 3-year rewrite going on in parallel. None of the developers wanted to work on v1 even though that's what brought in the revenue, and v2 didn't have any of the benefit of the bug fixes accumulated over the years to fix very specific issues that were never captured in any of the scope documents.

Re: Throwing away 18 months of code and starting over

#13
post #2

Having a culture of not ever writing tests and actively disallowing them is so insane I can't even imagine why there's anything else in this post

[flagged]

Did I say that my way was the right way? No: what I said was actively disallowing tests in every situation was the wrong way.

There is no ability here for the cost benefit analysis to change over time. There is only no tests

Re: Throwing away 18 months of code and starting over

#14

Pearls. > I would NOT allow people to write tests > now [...] we started with tests from the ground up

Two different stages of the project, not necessarily contradictory. I'm not saying this is great, but tests make a whole lot more sense when you know what you're building.

Re: Throwing away 18 months of code and starting over

#15
post #2

Having a culture of not ever writing tests and actively disallowing them is so insane I can't even imagine why there's anything else in this post

[flagged]

The truth is in the middle somewhere, regarding tests at least (yes, your microservices story is insane).

I think the author could have been happier with the no-test decision if they had treated the initial work as a prototype with the idea of throwing it away.

At the same time, writing some tests, should not be seen as a waste of time since if you're even at all experienced with it, it's going to be faster than constantly reloading your browser or pressing up-up-up-up-up in a REPL to check progress (if you're doing the latter you are essentially doing a form of sorta reverse TDD).

So I dunno... I may be more in line with the idea that's a bit insane to prevent people from writing tests BUT so many people are so bad at writing tests that ya, for a go-gettem start up it could be the right call.

I certainly agree with your whole cost-benefit analysis paragraph.

Re: Throwing away 18 months of code and starting over

#17

It's not really hinted at in the article, which doesn't actually mention whether the rewrite was a net gain - I presume it was or they wouldn't have written the article, and the lead-in picture paints a rosy picture, but the tone at the end suggests he's not happy with how things turned out. But one thing that used to be a common design anti-pattern was the "version 2 problem". I think I first heard about it when Net…

"The general tendency is to over-design the second system, using all the ideas and frills that were cautiously sidetracked on the first one. The result, as Ovid says, is a "big pile."

- Fred Brooks, 'The Mythical Man Month' (1975)

Re: Throwing away 18 months of code and starting over

#18
post #9
post #4

Next is such a dumpster fire. So much wasted effort due to the Node ecosystem never developing a universal batteries included framework like Rails or Django.

Which in turn were only invented because millennials would not be caught dead writing Java and JSP. We had all this shit figured out by the late nineties and 90% of what is accomplished on the web today was entirely possible and well integrated in Java app servers. This whole business is a fashion industry. I'm for one grateful for LLMs because for the first time in around 30 years there is actually genuine novelty t…

Mongodb is webscale.

Re: Throwing away 18 months of code and starting over

#19
post #14

Pearls. > I would NOT allow people to write tests > now [...] we started with tests from the ground up

Two different stages of the project, not necessarily contradictory. I'm not saying this is great, but tests make a whole lot more sense when you know what you're building.

Yes. TFA author could have gone into it with this mindset and treated the initial work as a prototype with the idea of throwing it away and would have been happier about it.

> but tests make a whole lot more sense when you know what you're building.

It's very true. This is a "gotcha" a lot of anti-TDDers always bring up, and yet some talk about "prototyping == good" without ever making the connection that you can do both.

Re: Throwing away 18 months of code and starting over

#20
post #2

Having a culture of not ever writing tests and actively disallowing them is so insane I can't even imagine why there's anything else in this post

[flagged]

Not having ANY tests means tons of manual testing is needed every time you modify code, which will rapidly consume more time than writing the tests would.
Post reply on HN