Worrying about “Never write the same code twice” is nonsense! Like everything else, mindlessly applying a rule doesn’t always work.
I usually used copy, paste & modify. I wrote functions, subroutines and objects as needed. I never had a project fail over 45+ years.
I did not practice YagNi. I designed everything to specs, and then asked the question, “What unforeseen problems can I solve with 5% more effort?” That requires full understanding of the user’s environment.
I wasn’t always successful, only about 1/3 of the time, but a couple paid for the project and my entire department for the year. My estimates were usually within 5% of actual costs.
My boss said that I was the laziest person he ever saw — when it came to avoiding typing. He also said that I was the most prolific developer that he had ever seen.
I always practiced my presentations on the cat. A rubber duck might work, but I got good feedback from the cat.
The important thing is to complete a project that works.
If you worry too much about perfection, then “Perfection” becomes the primary goal, which is the basis for Don’t YOU be the Cause of an IT Project Failure.