[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

Max Q - How about I knock off $2 billion?

Monday, July 26, 2021

TechCrunch Newsletter TechCrunch logo Max Q logo Monday, July 26, 2021 • By Darrell Etherington The space industry is still abuzz with the aftermath of Jeff Bezos' brief jaunt, and the

Mapped | Visualizing GDP per Capita Worldwide in 2021 💰

Monday, July 26, 2021

GDP per capita is one of the best measures of a country's standard of living. This map showcases the GDP per capita in every country globally. FEATURED STORY Mapped: GDP per Capita Worldwide in

3-2-1: The State of Developer Ecosystem 2021, Future of Web, Hidden Door to Build Personal Brand, How to Run Good Meetings, Guidelines to Write High Quality CSS and Bonus

Monday, July 26, 2021

Hello my friends! Here are 3 hand-picked articles from the tech world, 2 web development guides, and 1 best Tweet of the week. 🔥 Picks from the tech world 1. The State of Developer Ecosystem 2021​ This

Playing Games to Earn a Living in the Metaverse

Monday, July 26, 2021

“As a player, you actually earn 2-3x more than an entry-level job” - Gabby Dizon, co-founder of Yield Guild Games ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

You’re Invited: Getting Maximum Value from Cloud-Native Master Data Management

Monday, July 26, 2021

Webinar on August 10, 9am PT Hi there, Investing in high-quality, curated customer data fuels business results, from revenue growth to analytics adoption and productivity gains. However, quantifying

Just Launched: Startups of the Year 🚀

Monday, July 26, 2021

4.5k+ Cities; 37k+ Startups: Who'll Achieve Startup of the Year Status in Your City? Vote for 2021's Startups of the Year with Hacker Noon! How's it hanging, Hacker? 👋 Hacker Noon just

The best SaaS products with a free plan

Monday, July 26, 2021

This past week on Twitter, I asked people what their favorite SaaS products with a free plan were. The list is full of gems. Hiten's Pick The Highest Forms of Wealth What does it mean to be wealthy

Daily Coding Problem: Problem #476 [Medium]

Monday, July 26, 2021

Daily Coding Problem Good morning! Here's a solution to yesterday's problem. This is your coding interview problem for today. This problem was asked by Google. You are given an array of length

What ransomware victims saved thanks to free decryption tools

Monday, July 26, 2021

The best cheap VPNs; Beyond Raspberry Pi ZDNet Facebook Twitter LinkedIn ZDNet Tech Today July 26, 2021 placeholder Ransomware: Here's how much victims have saved in ransom payments by using these

Nasty macOS Malware XCSSET Now Targets Google Chrome, Telegram Software

Monday, July 26, 2021

The Hacker News Daily Updates Newsletter cover Risky Business: The CISO's Guide to Better Reporting to the Board Briefing the board on your organization's security posture is not an easy job.