First failure

This is the story of my first failure in academics. I have always been an above average student, never really in the contention for top 3. I once even missed out on the third rank by one mark. Neither did my parents ever pressure me to get a rank, nor did I bother. However, I never thought I would fail an exam, but fail I did.

It was during the first java programming assessment during my internship. I had studied Java and was (over) confident that I would do well. A simple question to create a parent class, a few child classes, some conditional statements, and an hour to finish the program. I did it in 15 minutes, ran the test cases, everything looked fine. I submitted the program and went on with my life. A week later, the results showed that I had failed, scoring just 12 marks. Apparently, every other test case but the default ones had failed. Think of it like run code vs submit on geeksforgeeks. I checked with a friend who had scored 100%, compared her program to mine, didn’t see an issue. I mailed everyone I could, attaching my code, telling them to have a look at it, in case their program had a bug, because mine didn’t. No one responded.

I left early from that day, no one wanted to talk to me, no one asked why. I called up home, crying that I had failed my family, that I was not meant to be a software developer, that I don’t know what I did wrong. I watched The Conjuring that day, for what could be scarier than failing an exam. Of all the friends I had doing the internship at the same place, just one guy came to check up on me. No one else bothered talking to a failure.

After what felt like an eternity, I recollected myself, went back to office to check my code, and there it was, a stupid bug that could have been found had I stopped to review my own code, or had I bothered unit testing my code prior to submission. It was an error of a conditional operator in an else case. Something like this:

Mock code block of how I messed up

Failures are hard, even now, after being through many of them. It is still hard to cope. In retrospect, failing an exam might seem like a small problem, but for me, at the time, this was a mistake I thought I could never come back from. My rating was gone, I would earn less as compared to my batchmates who had passed. I would not get my desired project. And once these thoughts start, you don’t know when it reaches to I should stop doing this and go to the mountains.

However, I believe this failure was necessary, I became more cautious, started paying more attention to not just the outcome but also to what I was doing. In the next assessment for RDBMS, out of all the interns that took the test, I was one of the 10% that passed. The only reason for 90% of them failing, they didn’t have this setback yet that made them re-read what they were doing. I also ended up getting a 90ish score on the re-test for Java a few months later and got a successfully completed the internship.

At the time, it was the biggest problem I had faced in my life, and I wanted to give up. I don’t know why, but I didn’t. It got better. After a decade of setbacks, I firmly believe, no matter how big the problem seems today, it will seem smaller looking back. If there is anything that we, as humans, have learnt from evolution, it is perseverance.

Oh and also, always unit test your code. Aim for unit test coverage to tend to 100%. Don’t make the same mistake I did; perhaps find your own mistake and your own failure.



Anonymous blog to share dev stories.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store