[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 Mastery] What Pythonistas can learn from bestselling authors

Sunday, October 2, 2022

Hey there, I just finished reading Stephen King's "On Writing." It's a great little book where he shares some of the writing advice and stories he's picked up over the course of

[Python Dependency Pitfalls] The Iceberg

Saturday, October 1, 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

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

Saturday, October 1, 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 Mastery] The hidden costs of "copy-paste" Python programming

Saturday, October 1, 2022

Hey there, Here's a development story that plays out thousands of times each day: Avid Pythonista Max is working on a function to find the 10 oldest files in a nested directory hierarchy. He needs

[Sublime + Python Setup] why Atom can’t replace Sublime

Friday, September 30, 2022

Hey there, "In a nutshell, Atom is a Sublime Text editor that just got better." When I read this quote I got so worked up I nearly fell off my chair. Because every time I've tried Atom or

You Might Also Like

Data Science Weekly - Issue 540

Friday, March 29, 2024

Curated news, articles and jobs related to Data Science, AI, & Machine Learning ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

This Week in Rust #540

Friday, March 29, 2024

Email isn't displaying correctly? Read this e-mail on the Web This Week in Rust issue 540 — 27 MAR 2024 Hello and welcome to another issue of This Week in Rust! Rust is a programming language

The Value Of A Promise 🤞

Friday, March 29, 2024

How much is a promise from a tech company really worth, anyway? Here's a version for your browser. Hunting for the end of the long tail • March 28, 2024 The Value Of A Promise When you hear a

New Elastic Security for SIEM Training Course

Friday, March 29, 2024

Detect and respond to evolving threats ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ elastic | Search. Observe. Protect Detect anomalies and malicious behavior March

SBF gets 25 years 

Thursday, March 28, 2024

Sam Bankman-Fried is sentenced View this email online in your browser By Christine Hall Thursday, March 28, 2024 Welcome back to TechCrunch PM! The editorial team spent a chunk of the day discussing

💎 Issue 410 - Being laid off in 2023-2024 as an early-career developer

Thursday, March 28, 2024

This week's Awesome Ruby Newsletter Read this email on the Web The Awesome Ruby Newsletter Issue » 410 Release Date Mar 28, 2024 Your weekly report of the most popular Ruby news, articles and

💻 Issue 403 - Microsoft defends .NET 9 features competing with open source ecosystem

Thursday, March 28, 2024

This week's Awesome .NET Weekly Read this email on the Web The Awesome .NET Weekly Issue » 403 Release Date Mar 28, 2024 Your weekly report of the most popular .NET news, articles and projects

💻 Issue 410 - Node.js TSC Confirms: No Intention to Remove npm from Distribution

Thursday, March 28, 2024

This week's Awesome Node.js Weekly Read this email on the Web The Awesome Node.js Weekly Issue » 410 Release Date Mar 28, 2024 Your weekly report of the most popular Node.js news, articles and

💻 Issue 410 - JSDoc as an alternative TypeScript syntax

Thursday, March 28, 2024

This week's Awesome JavaScript Weekly Read this email on the Web The Awesome JavaScript Weekly Issue » 410 Release Date Mar 28, 2024 Your weekly report of the most popular JavaScript news, articles

📱 Issue 404 - Dependency Injection for Modern Swift Applications Part II

Thursday, March 28, 2024

This week's Awesome iOS Weekly Read this email on the Web The Awesome iOS Weekly Issue » 404 Release Date Mar 28, 2024 Your weekly report of the most popular iOS news, articles and projects Popular