Rant: I finally figured out why I kept typing one extra space after every semicolon | Coding For Beginners - Freelance Forum - The Community for Independent Professionals
Rant: I finally figured out why I kept typing one extra space after every semicolon
For about 6 months I kept getting these weird little bugs in my beginner Python projects and I could not figure out why. My code would run but the output looked off, like an extra indent or a gap in a string that should not be there. Last week I was typing at my kitchen table in Boise and I finally saw it. I was hitting the space bar right after every semicolon, every time, without thinking. My fingers just did it from years of writing essays in school where you put a space after punctuation. In code, that little space is a character. It counts. It lives inside your string or breaks your indent and Python gets mad at you for a reason you cannot see. I turned on the setting in my editor that shows spaces as tiny dots and my bug count dropped by like 70 percent in two days. Does anyone else have a dumb muscle memory habit that keeps wrecking their code?