32

Getting over a fear of breaking code - How to do it?

Profile picture
Entry-Level Software Engineer [SDE 1] at Amazona year ago

I have just joined a new team, and have my first coding task. I am currently terrified about taking the first step and writing some code and testing it.

I have spent a lot of time researching solutions, but have found myself bit in the past because of a lack of testing and research, and also am just terrified of breaking things.

What are some suggestions for getting over this fear, and how can I be more confident that the testing and implementation cover all edge cases and won't have bugs?

840
1

Discussion

(1 comment)
  • 24
    Profile picture
    Tech Lead @ Robinhood, Meta, Course Hero
    a year ago

    I think the first step (much easier said than done of course) is to flip the mentality: Breaking things is actually good.

    Making mistakes is when you learn the most! They make the team come together to extract improvement in a structured way and it motivates your brain to really absorb all that. I talk more about this here:

    Tactically, I just want to say that you work at Amazon. It's one of the greatest tech companies in the world, and I guarantee you that it's fortified to the teeth with prevention mechanisms so SDE 1s like yourself don't break prod in half. Here's just some of them:

    • Several thousand automated tests that run on every commit before it gets pushed and an ultra-robust CI/CD pipeline in general
    • Tons of brilliant engineers around you to catch mistakes in the planning and code review phase
    • Phased rollout mechanisms and detailed analytics/alerting to let you catch issues before they reach 100% of prod

    This is why making mistakes is actually quite safe at Big Tech companies. They have spent literal years building these safety nets for engineers to try stuff, break stuff, and then learn.

    What are some suggestions for getting over this fear, and how can I be more confident that the testing and implementation cover all edge cases and won't have bugs?

    Honestly, you're 100% ready to just start going! Mentality is really all you need. As long as you have that responsible part of your brain telling you to do things right, you just need to put yourself out there as aggressively as possible. You can only optimize code in isolation so much as a junior engineer - The rest of the learning comes from putting out the commit and seeing what happens from the feedback across code review, CI/CD, and finally production users.

    Tactically, I highly recommend going through these 2 masterclasses:

    If your code does end up breaking, check this out: [Masterclass] How To Become A Debugging Master And Fix Issues Faster