Re:Throw away your first draft of your code
by ideamotor on Saturday August 05, 2023 @01:42AM
(#37009327)
Of the reasons he says engineers want to rewrite the code, he says: badly organized code, slow processing time, and ugly code.
Maybe I’m not an engineer, because I bet perfectly pretty fast code is an indicator you should reorganize it to make it easier to adapt, add more capabilities even if it runs slow, and put some ugly fixes in there so it’s useful for the end user.
Agreed that wanting to over-engineer and perfect something that should be constantly evolving is not a good reason to rewrite it. That sounds like back office bubble pretend-work.
https://www.joelonsoftware.com/2000/04/06/things-you-should-...
Granted Joel is taking about a wholesale rewrite of proven / established code. Code and has had had the advantage of time.
Personally, I end up rewriting parts of my code often. It usually takes a mile for me to find exactly the right way it should be based on how are people use it.
You absolutely should rewrite prototypes, and re-factor important chunks of code. I rewrote something 3 times today, it was better each time.
At the same time you should be wary…