20
My friend told me my Python code looked like a 'word salad' and now I'm obsessed with spacing.
After she pointed out how my jammed-together print statements and if conditions were impossible to read, I spent last weekend rewriting my first project with consistent indentation and line breaks, and suddenly debugging got way easier, so what's one small formatting habit that made a big difference for you?
3 comments
Log in to join the discussion
Log In3 Comments
fiona_carr2611d ago
Why do comments feel like clutter to you?
7
tessaperry11d ago
I used to hate adding comments to my code, but leaving little notes for my future self saves so much time. It's like leaving breadcrumbs for when I come back to a project months later.
4
Totally. I started adding "why" comments for tricky logic and it's saved my butt more than once.
7