V
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 In
3 Comments
fiona_carr26
Why do comments feel like clutter to you?
7
tessaperry
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
henryt18
henryt1810d agoTop Commenter
Totally. I started adding "why" comments for tricky logic and it's saved my butt more than once.
7