3
Heard a guy at the library say he gave up on coding because his code was 'too messy'
I was grabbing a coffee near the library computers last week and overheard a guy telling his friend he quit his Python course. He said, "My scripts just work, but they look like a toddler typed them." It made me think about how I started. I spent my first three months just making things run, and never learned to format or comment. Now I force myself to write one clear comment for every five lines of code, even on small practice scripts. Has anyone else found a simple rule that helped clean up their code early on?
2 comments
Log in to join the discussion
Log In2 Comments
olivias884d ago
My roommate had that same problem last year. He'd write these huge blocks of code with no spaces, and I couldn't read any of it. I finally told him to just hit enter twice after every function, like a hard rule. It sounds stupid, but it forced him to see where one idea ended and the next began. His stuff is way easier to follow now.
2
seana144d ago
Honestly, that "one clear comment for every five lines" rule is smart. Tbh I went the other way and forced myself to name variables so clearly that comments felt redundant. Like, instead of 'x' I'd use 'failed_login_attempt_count'. It makes the code read like plain English and cuts the clutter.
0