What is a senior dev?

It's often hard to measure your own progress, but I had an experience recently which gave an insight I feel is worth noting down and sharing.

For the last six months I've been contracted onto a small dev team running a subset of pages for a massive retail brand. It's a huge business, known globally, and although our part is small, our team has end to end responsibility - we have our own Google Cloud projects, instances, databases and so on which we manage, as well as the frontend code.

The project has been running for around two years, with one lead developer in place since the outset. Naturally, we turn to him for any project specific knowledge. A month or so ago, he went on holiday, and we had an unprecedented production failure within 48 hours.

The details of the outage are irrelevant, though I will highlight that it wasn't caused by our team. What matters is how we - the two very-much-not-on-holiday developers - handled it.

Although I've been dabbling with code for personal sites and curiosity for twenty years, I've only actually been working full time, officially, as a dev for about three. That's a lot longer than the other dev with me to face the crisis.

The explanation was not obvious from looking at the errors or logs, and my colleague essentially broke down: (paraphrasing, as this was all in Spanish)

"omg omg what are we going to do? it's down everywhere? what's happened? why did this have to happen now? omg omg omg"

I didn't panic. I looked at the error. Began at the entry point of the app, and stepped through the logical flow of mounting the app, fetching the data, etc, until I encountered the source of the problem. The cms team had changed the structure of the data being sent through, and our app was too brittle in design (there's a lesson) to either fail gracefully or even provide useful feedback.

A year earlier, my reaction would have more closely resembled that of my colleague. Beyond syntax or data structures, a large part of coding is the mental game - not despairing when you can't see the way forward. Many wannabe coders struggle with a problem, feel stupid, and assume programming isn't for them; failing to realise that this is a daily experience for many (most?) developers. If I ever stop having it, it'll mean I'm coasting rather than taking on challenging work.

There is always a reason the code is doing what it's doing. Things can be figured out, if you're methodical and pay close attention to what's there (rather than what's in your mental model of what's there). My faith in this truth, and in my ability to eventually find the source of the trouble, and thereby a solution, prevented me from panicking.

Pushing the patch to production, I realised that this was the closest to a milestone moment of initiation I was likely to get. I wouldn't describe myself as a senior dev, but this ability to remain calm and think a problem through is crucial to anyone who wishes to be one. I'm getting closer.