4
My first project went from 500 lines of spaghetti to 100 lines of clean code in a week.
I built a simple weather app last month. The first version worked, but it was a mess. Every function did three things at once. I had variables named 'stuff' and 'thing'. Then I watched a 20 minute video on YouTube about 'single responsibility principle'. It clicked. I spent the next week rewriting. Broke everything into tiny functions with clear names. Used comments to explain the 'why', not the 'what'. The app does the exact same thing, but now I can actually read it. Feels like a different program. Has anyone else had a moment where a simple concept just cleaned up their entire approach?
2 comments
Log in to join the discussion
Log In2 Comments
lee.diana2mo ago
My early code was just a bunch of "temp" variables.
4
miller.jason2mo ago
Used to do the same thing, thought it was fine. Then I had to fix a bug in my own code six months later and spent an hour just figuring out what "temp7" was supposed to hold. Now I write names so clear my future self won't hate me. It's a game changer for actually understanding your own logic.
2