I recently had a project that I took me 4 months to do , I hit some very significant bugs that where impossible to track down. I said this code is absolute garbage and started from scratch, drank a monster and got cracking, people tried to distract me but I persisted. I sent the code to QA and I personally tested all the 14 pages of errors we had, they where all gone, I found and implemented the silver bullet in zero time flat.
How should I explain to the team that my code was not good (garbage) and that I cost them 4 months of scrum team time for nothing. I’m sure that if I were to do this fresh and used the same pattern it wouldn’t take me only 2 days because of how much I learned along the way but does anyone have any thoughts? I also now live in fear that this code is somehow bad even though I have vetted it with unit test from the previous implementation, truth tables and other devs.