Swizec Teller - a geek with a hatswizec.com

    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

    Did you enjoy this article?

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

    Want to become a true senior engineer?

    Getting that senior title is easy. Just stick around. Being a true senior takes a new way of thinking. Do you have it?

    Leave your email and get the Senior Mindset series - a series of curated essays on the mindset of a senior software engineer. What it takes to get there, what should you do when you're there, how to change the way you think.

    The Senior Mindset series

    Get a series of curated essays on the mindset of a senior software engineer. What it takes to get there, what should you do when you're there, how to change the way you think.

    it describes my days in a way I have not read before.

    This was a very enlightening article about being a senior engineer.

    Join over 14,000 engineers just like you already improving their careers with my letters, workshops, courses, and talks. ✌️

    Have a burning question that you think I can answer? I don't have all of the answers, but I have some! Hit me up on twitter or book a 30min ama for in-depth help.

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

    Curious about Serverless and the modern backend? Check out Serverless Handbook, modern backend for the frontend engineer.

    Ready to learn how it all fits together and build a modern webapp from scratch? Learn how to launch a webapp and make your first 💰 on the side with ServerlessReact.Dev

    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 ❤️