[Sublime + Python Setup] Grumpy old greybeard with a whitespace problem

One fateful day, the Agile Gods that be decided to “add some firepower” to my little team…

And so, developer Paul joined (name changed to protect the guilty).

Before I dive into this story, let me ask you this: Have you ever been on a development team that simply clicked?

My team was like that. We we’re tearing through user stories every day, constructing the backend for a new performance analytics system.

Life was good. We were in sync, had agreed on a code style, were doing continuous integration, code reviews, and continuous deployment.

The whole best practices enchilada. It felt amazing.

Enter Paul:

Based on some previous interactions he seemed to be the “grumpy old man” type —

Undeniably skilled, but also with penchant for doing things his own way, and a slightly short-fused temper.

Some personal hygiene issues aside, he seemed like a nice enough bloke.

Paul’s first code review comes up two days later and I cheerfully open up the pull-request. (Paul “doesn’t really do branches in Git” but eventually we nudged him into compliance.)

GitHub’s website churns for a while as Paul’s code changes load up…

“This feels like it’s loading little slower than usual”, I’m thinking.

And then I get that sinking feeling in my stomach:

The guy is productive… prolific even. But apparently he really enjoys writing 900-line functions, with 7 different levels of nesting, and some loooooong if/else-chains sprinkled on top.

Umm.

Did I mention he was also a fan of inconsistent spacing?

Stuff like sometimes putting zero, or 1, or… 3 blank lines between functions and statements.

Or, sneaking in extra whitespace around parentheses, and then sometimes leaving it out completely.

There was no discernible rhyme or reason to this code “style”, just a cluttered, random-looking pattern.

Ugly, yes—and a distraction from the real architectural issues in the changeset that needed discussion.

How was I going to share my feedback on Paul’s code?

I was in my late twenties and I’d recently been promoted to a leadership position on the team. Paul was easily twice my age (and it didn’t help that I basically still looked like I was 15).

From past encounters I knew he reacted badly to even the slightest criticism.

So I didn’t want to be the young ankle biter starting a quarrel with the wise greybeard—and yet this code was clearly not up to our team’s standards…

In fact, it was a maintenance liability.

Heck, simply viewing the code diff almost took down GitHub… But let’s not go there again.

Code style is a hot topic for developers. Many of us can nearly come to blows over code style disagreements, something I really wanted to avoid (also the guy was quite a bit taller than me—just kidding).

I’ve been in situations like this before and trying to get the “odd potato” on the team to fall in line when it comes to code style usually doesn’t work. And it’s not worth starting a war about it either.

To get real work done, what counts is that developers enjoy working with each other, code reviews are 99% conflict-free, and people don’t break out into angry shouting matches five times a week…

Like a true engineer, I decided to automate myself out of that conflict.

I put an automated code style checker into place on our continuous integration server.

That way Paul, myself, and the other developers on the team were getting instantaneous code style feedback every time we pushed our changes to the central Git repository.

The important detail here is that with an automated tool the feedback didn’t come from a human being —

It was just a heartless little program that called people out on their formatting inconsistencies and other quirks.

The result: No more hard feelings!

I learned that automated tools can stop a lot of these uncomfortable situations dead in their tracks, before people get emotionally attached to their style decisions.

Instantaneous and automated code style feedback is truly an amazing timesaver.

These days I make sure I never work without it.

Don’t be “that guy” (or gal) for your team and see step by step how to get instantaneous code style feedback right inside Sublime Text:

>> Click here and write more beautiful code in 10 minutes

— Dan Bader

Older messages

[Python Dependency Pitfalls] The Iceberg

Monday, July 11, 2022

Hey there, The other day I read this quote from a Python developer that made me stop and think: "As a noob with a little programming knowledge already, I've found setting up and installing

[PythonistaCafe] What makes PythonistaCafe different

Sunday, July 10, 2022

Hey there, Mastering Python is *not* just about getting the books and courses to study—to be successful you also need a way to stay motivated and to grow your abilities in the long run. Many

[Sublime + Python Setup] Don’t build “nag screen muscle memory”

Sunday, July 10, 2022

Hey there, Once I worked with a developer who refused to buy a registered copy of Sublime for months on end, even though he *loved* Sublime. He used it as his main code editor every day and was very

[Python Dependency Pitfalls] "Re-inventing the wheel" disease

Sunday, July 10, 2022

Hey there, PyPI, the Python packaging repository, now contains more than 100000 third-party packages in total. That's an *overwhelming* number of packages to choose from... And this feeling of

[Python Dependency Pitfalls] Artisanal "from-scratch" development

Saturday, July 9, 2022

Hey there, The other day I got this question from Newsletter member Newvick in my email inbox: ~~~ I'm trying to get past the beginner's stage in Python and one problem I have is: When do you

You Might Also Like

What Investors Want From AI Startups in 2025

Monday, November 25, 2024

Top Tech Content sent at Noon! How the world collects web data Read this email in your browser How are you, @newsletterest1? 🪐 What's happening in tech today, November 25, 2024? The HackerNoon

GCP Newsletter #426

Monday, November 25, 2024

Welcome to issue #426 November 25th, 2024 News LLM Official Blog Vertex AI Announcing Mistral AI's Large-Instruct-2411 on Vertex AI - Google Cloud has announced the availability of Mistral AI's

⏳ 36 Hours Left: Help Get "The Art of Data" Across the Finish Line 🏁

Monday, November 25, 2024

Visual Capitalist plans to unveal its secrets behind data storytelling, but only if the book hits its minimum funding goal. View Online | Subscribe | Download Our App We Need Your Help Only 36 Hours

DeveloPassion's Newsletter #180 - Black Friday Week

Monday, November 25, 2024

Edition 180 of my newsletter, discussing Knowledge Management, Knowledge Work, Zen Productivity, Personal Organization, and more! Sébastien Dubois DeveloPassion's Newsletter DeveloPassion's

Meet HackerNoon's Latest Features: Boost Stories with Translations, Speech-to-Text & More

Monday, November 25, 2024

Hey, Hacker! HackerNoon's monthly product update is here! Get ready for a new version of the mobile app, more translation developments, a new AI Gallery, backend moves, and more! 🚀 This product

The ultimate holiday gadget gift

Monday, November 25, 2024

AI isn't hitting a wall; $70 off Apple Watch; 60+ Amazon deals -- ZDNET ZDNET Tech Today - US November 25, 2024 Meta Quest 3S Why the Meta Quest 3S is the ultimate 2024 holiday present This $299

Deduplication in Distributed Systems: Myths, Realities, and Practical Solutions

Monday, November 25, 2024

This week, we'll discuss the deduplication strategies. We'll see whether they're useful and consider scenarios where you may need them. We'll also do a reality check with the promises

How to know if your data has been exposed

Monday, November 25, 2024

How do you know if your personal data has been leaked? Imagine getting an instant notification if your SSN, credit card, or password has been exposed on the dark web — so you can take action

⚙️ Amazon and Anthropic

Monday, November 25, 2024

Plus: The hidden market of body-centric data ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

⚡ THN Recap: Top Cybersecurity Threats, Tools & Tips (Nov 18-24)

Monday, November 25, 2024

Don't miss the vital updates you need to stay secure. Read the full recap now. The Hacker News THN Recap: Top Cybersecurity Threats, Tools, and Practices (Nov 18 - Nov 24) We hear terms like “state