31
My friend looked at my code and said it was a 'wall of text'
I was working on a small Python script for a class project in Denver last month, and I showed my friend what I had. She told me, 'I can't read this, it's just a wall of text.' She pointed out I had zero blank lines between my functions. I went back and added a single blank line between each function, and it was instantly easier to follow. Has anyone else gotten simple feedback that made your code way clearer?
3 comments
Log in to join the discussion
Log In3 Comments
the_ray1mo ago
Blank lines are like taking a breath between thoughts. My old boss would print code and literally draw boxes around sections with a red pen. Visual grouping matters way more than we admit.
10
hill.jade12d ago
And honestly, I'm the worst offender when it comes to writing code that looks like a wall of text. My brain just goes "put it all together, it's fine" until I come back to it a week later and can't tell where one function ends and the next begins. I blame my own laziness, but @the_ray is spot on about those blank lines being a breath for your eyes. Maybe I need to start printing my own code and drawing boxes on it, though knowing me I'd just end up with a coffee ring on the page.
4
lily_gibson201mo ago
Remember my friend showing me his dense code, and I got lost in two seconds. He added some blank lines after reading a post by @the_ray, and suddenly the whole logic made sense. It really is about giving your eyes a place to rest.
1