Justify wasteful things you've done and suggest them to others. Less cheekily -- it's true that sometimes the best way to research a topic is by writing code that you might appropriately throw away later. And it is extremely important to be able to recognize when something is not worth keeping. But also, often, the most efficient strategy is to think about the problem off-screen enough that you don't subsequently was…
Throw away your first draft of your code
11–20 of 230 posts
Re: Throw away your first draft of your code
#12Especially when in comes to business logic and domain modelling, some bad decisions at the begining can cost a LOT, to undo in an iterative matter.
(To clarify I'm talking about the timeline the author proposes of "a couple of days" build the throw away prototype)
Re: Throw away your first draft of your code
#13Re: Throw away your first draft of your code
#14Re: Throw away your first draft of your code
#15The temptation to throw away all of your code - be it a prototype or a "grown" code base - arises often. Often it is a bad idea. I get it, though, there is an inherent attractiveness in the idea of starting fresh from a clean slate. Except, more likely than not, you'll soon find yourself in a similar situation to the one you started from. The fundamental problem is that it is easy to underestimate the edge cases. Sur…
Re: Throw away your first draft of your code
#16Re: Throw away your first draft of your code
#17That's the advantage of software over other work. You have 0 material sunk costs. Unlike building a bridge, which you can't just tear down and iterate, with software you can develop a workflow where you break things and iterate quickly.
Re: Throw away your first draft of your code
#18The idea of prototyping to uncover 'unknown unknowns' resonates with me, it's like a reconnaissance mission before the actual project. This could indeed save a lot of time and effort in the long run...
Just never let management see the prototype or they'll consider it done and tell you to move on to something else.
Re: Throw away your first draft of your code
#19But a decision like that would be superhuman by itself, a transcendent experience, giving the creators a perspective that seems impossible. Unlike what is happening instead, both publicly and behind closed doors... A great pity!
Re: Throw away your first draft of your code
#20I think I do use the throwaway approach with simple prototyping of smaller portions of code that I will then port into an existing system, but the overall system remains stable.