Saturday, 3 March 2018

Good Days, Bad Days

In web development, you have good days, and you have bad days.

You know the good days - everything seems to fall into place beautifully. Your code works, your solutions run like a dream, everything happens exactly as you planned. Sometimes better.  Even the bugs that come up are easy to solve. You achieve a lot in just a few short hours.

And the bad days? The opposite happens. Nothing you try seems to gain any ground. You make elementary mistakes, some of which keep you tearing your hair out for the better part of the day. Very little gets done, and whatever you do manage to get done, you eventually have to undo.

What I'm about to say may seem controversial, but here it is: the bad days are just as important as the good days. In fact, I'm going to go even further: without bad days, there are no good days. In fact, sometimes the bad days are more important than the good days.

Why do I say that? Well, it certainly isn't just due to comparison. Obviously, if every day was "good", it would seem less good if there were no bad days to contrast them with.


Web dev is like a maze.

You see, during those days when nothing seems to work, you're actually achieving something really important. You are slowly but surely eliminating all the ways that don't work, through painstaking experience. Think of development as a maze. There are tons of possible pathways to your final goal, but along the way, there are also many, many dead ends. By sussing out all those dead ends via process of elimination, you ensure that the next time you come across a similar situation, you remember not to try that again. By making mistakes and learning from them, you ensure that you don't make those mistakes again, ever.

Therefore, when a "good" day arrives, it is actually a culmination of all your bad days. It is the natural consequence of you having already determined that there are a thousand ways that don't work, and finally hitting on one way that does work.

The thing about mistakes...

Making mistakes is valuable. It gives you experience.

System work funny because you forgot to add break statements to your switch cases? No problem, don't do it again.

Get stuck in an infinite While loops because you forgot to include an exit clause? Been there, done that.

Layout go haywire because you didn't include that doctype declaration? Live and learn, pal.

That, of course, assumes that you learn from mistakes. I know people who need to learn the same lesson multiple times before it sticks. This is why I wrote the Spot The Bug series. I find that documenting these things down not only cements the experience, it helps me to avoid repeating them.

My bad week

Recently, I had a really bad week. As weeks went, it was terrible.  At school, I did badly at my live presentation. At work, I was tearing my hair out over a bug I couldn't reproduce accurately. Things were breaking all over the place. The Manager was choosing this moment to talk to us like we were children. My confidence was at an all-time low.

Know what I did when the weekend arrived? No, I didn't put in extra hours in the office. I didn't even sit around feeling miserable. Instead, I swam laps. Over and over. Got as much sleep as I could. Did things I enjoyed.

On Monday, when I got back to work, it was like a miracle happened. Suddenly, all the cryptic error messages were making sense. When bugs surfaced, I knew where they came from and how to squash them. I closed ticket after ticket. Damn, I was on a roll.

What happened? Nothing. The code was exactly at the state in which I'd left it. The break merely forced me to take my mind off how much I sucked, and the next time I needed to code, it was with fresh eyes.

All in all

All I'm saying is, when you have a bad day, don't get discouraged. It is one of the many building blocks to having a truly awesome coding day.

Have a good (or bad) day!
T___T

No comments:

Post a Comment