Swizec Teller - a geek with a hatswizec.com

Senior Mindset Book

Get promoted, earn a bigger salary, work for top companies

Senior Engineer Mindset cover
Learn more

    What to do when bugs are whack-a-mole

    What do you do when every bug you fix creates 5 new bugs?

    You could make a meme, patch the bug, and move on. The memes are funny and everyone can relate. We've all been there.

    99 little bugs in the code ...
    99 little bugs in the code ...

    Or you could own the outcome and figure out what the heck is going on. Why does every bug lead to more bugs? Something's wrong.

    We talked about this on the Senior Mindset Mastermind group coaching call this week. Everyone had a fun story to share. Some were scary.

    Like a single PHP file that runs a whole website and leads to 45 second page loads 😱

    Every story had a few things in common:

    • inexperience
    • spaghetti code
    • lack of leadership
    • poor abstractions
    • missing guardrails
    • not understanding the problem

    This happens fractally at every level. From a single function that grows edge cases and exceptions like weeds, to the team level where you have teams sliced by technologies instead of features and OKRs.

    How to fix the situation

    The best thing you can do as a senior engineer in this case is to say "Yo hold up! Something's fucky". Then organize a meeting. Get everyone together. Involve the stakeholders/customers if you can!

    Make sure you understand the desired outcome. Then align the team on a vision of how to get there. Swarm sessions (topic from an earlier call) are a great tool for that.

    You may need to tweak things with your PM. Sometimes they misunderstand the user or envision a feature that won't work because they don't know what you know. Be a good partner, not a tool :)

    Quote about questions asked wrong
    Quote about questions asked wrong

    How to prevent the situation

    Lead.

    Focus on solving the problem, not the details of how the code is written. Design abstractions first, code second. Align on the contracts between functions/modules/services, worry less about the implementation.

    Rethink and redesign as requirements change. You can't just glom onto the existing pile of mud.

    Or you'll end up like this AI that learned to walk on its own 😆

    Cheers,
    ~Swizec

    PS: If you want to improve your senior level thinking, consider joining the Senior Mindset Mastermind. You get access to the full archive and we meet every 2 weeks

    Published on January 6th, 2022 in Senior Mindset, Lessons

    Did you enjoy this article?

    Continue reading about What to do when bugs are whack-a-mole

    Semantically similar articles hand-picked by GPT-4

    Senior Mindset Book

    Get promoted, earn a bigger salary, work for top companies

    Learn more

    Have a burning question that you think I can answer? Hit me up on twitter and I'll do my best.

    Who am I and who do I help? I'm Swizec Teller and I turn coders into engineers with "Raw and honest from the heart!" writing. No bullshit. Real insights into the career and skills of a modern software engineer.

    Want to become a true senior engineer? Take ownership, have autonomy, and be a force multiplier on your team. The Senior Engineer Mindset ebook can help 👉 swizec.com/senior-mindset. These are the shifts in mindset that unlocked my career.

    Curious about Serverless and the modern backend? Check out Serverless Handbook, for frontend engineers 👉 ServerlessHandbook.dev

    Want to Stop copy pasting D3 examples and create data visualizations of your own? Learn how to build scalable dataviz React components your whole team can understand with React for Data Visualization

    Want to get my best emails on JavaScript, React, Serverless, Fullstack Web, or Indie Hacking? Check out swizec.com/collections

    Did someone amazing share this letter with you? Wonderful! You can sign up for my weekly letters for software engineers on their path to greatness, here: swizec.com/blog

    Want to brush up on your modern JavaScript syntax? Check out my interactive cheatsheet: es6cheatsheet.com

    By the way, just in case no one has told you it yet today: I love and appreciate you for who you are ❤️

    Created by Swizec with ❤️