[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

[PythonistaCafe] What makes PythonistaCafe different

Saturday, July 10, 2021

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

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

Saturday, July 10, 2021

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

[Sublime + Python Setup] Sublime Text is just a blank canvas…

Saturday, July 10, 2021

Hey there, When I became serious about optimizing Sublime Text with plugins, it was hard for me to separate the wheat from the chaff. Without a real guideline or roadmap I resorted to installing *any*

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

Saturday, July 10, 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] Why PythonistaCafe exists

Saturday, July 10, 2021

Hey there, In one of my last emails I talked about how some online communities in the tech space devolve over time and turn into cesspools of negativity. This relates directly to how and why I started

You Might Also Like

Logitech's AI Prompt Builder is surprisingly handy

Friday, April 19, 2024

Torvalds on evil devs and AI hype; Quest 2's price drops; Virtual cards explained -- ZDNET ZDNET Tech Today - US April 19, 2024 placeholder Logitech's free AI Prompt Builder is surprisingly

Tesla recalls nearly 4,000 Cybertrucks 

Friday, April 19, 2024

After reports of malfunctioning accelerator pedals, Tesla is recalling Cybertrucks View this email online in your browser By Alex Wilhelm Friday, April 19, 2024 Welcome to TechCrunch AM! Today's

SWLW #595: My role as a founder CTO, AI Product Management, and more.

Friday, April 19, 2024

Weekly articles & videos about people, culture and leadership: everything you need to design the org that makes the product. A weekly newsletter by Oren Ellenbogen with the best content I found

The bill to ban TikTok is barreling ahead

Friday, April 19, 2024

The Morning After It's Friday, April 19, 2024. The bill that could ban TikTok in the United States inches closer to becoming law. The legislation passed the House of Representatives last month,

Digest #134: TDD with Serverless, Terraform AI Conversions, K8s Cost Metrics & OpenTofu Response

Friday, April 19, 2024

Learn to convert Terraform templates, deploy SSR on AWS Amplify, and apply TDD to Serverless. Gain insights on PostgreSQL, microfrontends, and secure APIs. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Akira Ransomware Gang Extorts $42 Million; Now Targets Linux Servers

Friday, April 19, 2024

THN Daily Updates Newsletter cover Webinar -- The Future of Threat Hunting Is Powered by Generative AI From Data to Defense: Step Into the Next Era of Cybersecurity with CensysGPT Download Now

ASP.NET Core News - 04/19/2024

Friday, April 19, 2024

View this email in your browser Get ready for this weeks best blog posts about ASP.NET Core! This newsletter is sponsored by elmah.io - the most advanced, yet so simple to set up, error logging and

Post from Syncfusion Blogs on 04/19/2024

Friday, April 19, 2024

New blogs from Syncfusion Syncfusion Prepares for MS Build 2024 with Cloud-Ready Solutions on Azure Marketplace By gingerr Syncfusion offers cloud-ready solutions in Azure Marketplace for MS Build 2024

Hacker Newsletter #696

Friday, April 19, 2024

The greatest value of a picture is when it forces us to notice what we never expected to see. //John W. Tukey hackernewsletter Issue #696 // 2024-04-19 // View in your browser #Favorites Unlock your

Google's massive reorg 🧑‍🤝‍🧑, Meta's Llama 3 launch 🤖, China bans WhatsApp 💬

Friday, April 19, 2024

Google has reorganized its Android, Chrome, and Google hardware divisions Sign Up |Advertise|View Online TLDR TLDR 2024-04-19 📱 Big Tech & Startups Meta's battle with ChatGPT begins now (5