[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

Key phrases

Older messages

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

Thursday, September 30, 2021

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

[Sublime + Python Setup] The Ctrl+s "Heisenbug"

Tuesday, September 28, 2021

"What the **** is going on?!" I heard Keith yell. Returning from my lunch break and in a helpful mood I grabbed my coffee mug and shuffled over to my coworker's desk. "What's

[PythonistaCafe] Q&A

Monday, September 27, 2021

Hey there, At this point you should have a pretty good idea of what PythonistaCafe is about and what makes it special. In this email I want to answer some common questions that I get asked about the

[Sublime + Python Setup] How to become a happier & more productive Python dev

Sunday, September 26, 2021

Hey there, I really struggled with setting up an effective development environment as a new Python developer. It was difficult to build the right habits and to find a set of tools I enjoyed to use.

[PythonistaCafe] What's in PythonistaCafe for you?

Sunday, September 26, 2021

Hey there, A couple of years ago I'd become quite interested in martial arts. Hours upon hours of watching "The Karate Kid" growing up must've taken their toll on me... And so, I

You Might Also Like

From Request to Response: How APIs Work – Beginners Guide

Thursday, March 28, 2024

In the vast expanse of the digital ecosystem, APIs (Application Programming Interfaces) act as critical conduits, facilitating seamless conversations between different software platforms. From clicking

Elastic 8.13 is here: Amazon Bedrock in the AI Assistant for Observability

Thursday, March 28, 2024

Learn about Amazon Bedrock support within the Elastic AI Assistant for Observability ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ elastic | Search. Observe. Protect

A Creative Market Reset 🎨

Thursday, March 28, 2024

Adobe needed some real competition. Now it has some. Here's a version for your browser. Hunting for the end of the long tail • March 27, 2024 A Creative Market Reset Canva's purchase of

Fisker lost millions … then it got them back

Wednesday, March 27, 2024

More Fisker woes View this email online in your browser By Christine Hall Wednesday, March 27, 2024 Welcome back to TechCrunch PM! This afternoon, learn about some new Google features, a startup that

▶️ How to Get Better YouTube Video Recommendations — What to Know About Alexa Skills

Wednesday, March 27, 2024

Also: The Best Samsung Phones of 2024, and More! How-To Geek Logo March 27, 2024 📩 Get expert reviews, the hottest deals, how-to's, breaking news, and more delivered directly to your inbox by

JSK Daily for Mar 27, 2024

Wednesday, March 27, 2024

JSK Daily for Mar 27, 2024 View this email in your browser A community curated daily e-mail of JavaScript news Bad Abstractions Could Be Ruining Your Code The code is easy to read and it runs fine -

Ranked | The World's Biggest Oil Producers in 2023 🛢️

Wednesday, March 27, 2024

The word's three biggest oil producers accounted for 40% of production in 2023. View this graphic to learn more. View Online | Subscribe Presented by FEATURED STORY The World's Biggest Oil

Daily Coding Problem: Problem #1394 [Easy]

Wednesday, March 27, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Google. Given the head of a singly linked list, reverse it in-place. Upgrade to premium

Free Event: Watch 10 entrepreneurs launch their AI ideas

Wednesday, March 27, 2024

They built this in 2 months 👀 ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Digging into Marissa Mayer’s newest app

Wednesday, March 27, 2024

Plus a snake robot on Saturn's moon View this email online in your browser By Alex Wilhelm Wednesday, March 27, 2024 Welcome to TechCrunch AM! Today we have notes on Marissa Mayer's new app,