My take is that code is disposable, and often needs to be written to figure out what is really needed, then disposed off.
Learning this is worth writing the otherwise useless code.
Learning this is worth writing the otherwise useless code.
That's why these days I just start writing code, get it to 'it works!' level. To then throw it all away and start again. Takes a little more effort, but the payoff is far less problematic code and tech debt.
¹: Write Everything Twice
Now ? I just dump the problem into an LLM and it spits up a script that solves it, and then I throw away the script because it horribly bugged for any other case then my particular problem, but hey, I just solved my problem