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

    The code is not the goal

    Telling engineers that what code their does is more important than what it looks like is a lot like saying dark mode is cancer. I feel it in my gut to be true, but expressing it just right eludes me forever.

    5vJxcTt

    ๐Ÿ‘† me when I say either of those things

    Dark mode is like pointing a bright spotlight at your face, thinking "Oh gosh that's too bright", and putting sunglasses on it. You know, instead of using the damn brightness setting.

    Ok that was easy ๐Ÿ˜›

    Explaining why it's most important for your code to achieve business objectives is harder. I've had many conversations with friends and internet strangers over the past 3 days.

    Here's a recap

    Maybe engineers fundamentally don't want to realize that what their code looks like isn't nearly as important as whether it gets the job done.

    The usual argument goes something like, and I quote straight from a reply to my email,

    I don't want to maintain any code that was reasoned to win few races, while the one reasoning was still interested about the project before moving on to some other "race". Stupid analogy that'll appeal to the lazy-minded, and is way too often used as an excuse for subpar Architecture. Don't win a race, win a marathon!

    Dude's right. Maintaining bad code sucks.

    But I think something a lot of folks fail to realize is that it is a luxury to have a product with a codebase so bad it makes you pull your hair out.

    The product survived!

    Yes itโ€™s a big hairy mess now, but it lives

    You now have the ability to fix it. You know where the design went wrong, you know where the traps are, you know what you want

    that is wonderful

    Most terrible architectures, in my experience, arenโ€™t terrible because the code is bad or the engineers sucked.

    Theyโ€™re terrible because the whole product was still trying to figure out what it even wants to be and do.

    Itโ€™s easy to look back and say "that is bad"

    It is impossible to look forward and say "that will be bad".

    Here's an old programming maxim

    Make it work, make it right, make it fast

    Your code has a job to do. It needs to work first. Then if it works well enough, you might get time to make it beautiful and fast. Iff that is important to the business.

    Sometimes it isn't and that's okay.

    Another analogy we came up with in a Slack group is that of a commercial kitchen. High pressure environment with tight deadlines where everything has to go just right to produce that perfect meal.

    A lot like an engineering org.

    First thing Gordon Ramsey does when saving a failing restaurant ๐Ÿ‘‰ make the kitchen run smooth. If your kitchen is dirty, disorganized, and a huge mess, your restaurant will fail.

    If your engineering is dirty, disorganized, and a huge mess, your company will fail. No doubt.

    But your code is not your engineering org. Your code is the product.

    An engineer worrying too much about perfect code is like a chef placing peas one by one on a plate of bangers and mash to make sure it looks perfect.

    That's not a chef, that's a food photographer. Takes them 5 hours to make a burger for 1 photo shoot.

    Would you wait 5 hours for the perfect burger at your local pub?

    Of course not. That's ridiculous.

    My main point is this ๐Ÿ‘‰ the code is not the goal. Solving the problem is the goal.

    Peace โœŒ๏ธ
    ~Swizec

    Published on July 31st, 2019 in Opinions

    Did you enjoy this article?

    Continue reading about The code is not the goal

    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 โค๏ธ