Spaghetti programming = writing code without any structure or thought and ending up with a mess that you can't yourself debug or maintain after a few months.<p>Good program is something that is elegant, easy to maintain, easy to read and understand, etc.<p>Is there any book that you read in your journey as a programmer (professional or otherwise) that just warped your thinking model and made you a better programmer overall?<p>Or maybe a side project that you did that created this paradigm shift?
I don't recall a book per se, although I read a number of them in the 90's (Code Complete, Pragmatic Programmer, ...). In my case, practice and the necessity of maintaining code led/forced/encouraged me to get better at writing code that was clear and (eventually) more robust. They might write about this, but until you're standing in that swamp watching the alligators approach that you are properly incentivized to get better.<p>But remember from The Soul of a New Machine, "Not everything worth doing is worth doing well. Everything not worth doing is not worth doing well..."
Somewhere in the 80s, probably an article in BYTE, showed how spaghetti code was structured in that program flow crossed other flow lines, while structured code had closed modules with flow that didn't cross other flow lines, but were more 'onion-shell' like in their modularity.<p>After that, my increasing use of a structured language like C rather than continuing in my spaghetti-code BASIC programming helped a lot too.
I have been searching for something similar. It seems like in the 90s up to the 2010s-ish there were some great books on the subject (code complete, pragmatic programmer, clean code, etc.). But I have yet to find a book of similar caliber that is a modern version of those books. Would love to see what others are reading along these line, books or other wise.
For me it was How to Design Programs (HtDP) by Felleisen et al.<p>Before that I wrote code that I know hate from my core. It really taught me how to write code properly using functions. More than that it taught me how to break down a problem into parts and solve each part correctly.<p>Very few books teach problem solving and programming together is such a fantastic way.