Decisions in Day 3

The straight line, a respectable optical illusion which ruins many a man.” ― Victor Hugo, Les Misérables

To accelerate or brake? To add more salt or not? To tell a new joke or continue the current one? These are decisions car drivers, chefs and comedians respectively make in the line of their professions, so I wasn’t surprised when I woke up this morning and had to make my own decisions. Each profession has it’s own streamlined decision loops, a set of decisions you make so often it becomes almost a daily ritual to you, and software development is no exception.

In software development one of such decision is “To start a new code snippet or to refactor the existing one”, there are a myriad of ways one can find him or herself in this loop, but how you got there, is absolutely irrelevant compared to how you are going to get out. In my case, turns out an implementation i thought was rock-solid, turned out to be flooded with For loops. I had a decision to make and i chose the latter.

Refactoring the code to achieve my desired result felt so easy to me, in-fact i’d already refactored the code in my head the night before, just wake-up tomorrow, spend 20 minutes on it, and you are done. Boy was i wrong, after 4 hours of endless refactoring I gave up, this approach is screwed. I knew there was only 1 way forward, start again from scratch with a new approach, and that i did. Turns out when you’ve spent the last hours doing something, doing it again isn't that hard. Thankfully i was able to come up with a better solution and my goal was achieved.

Today starts the final days of week 1 and we had 3 task to complete as usual,

  1. Implement binary search.
  2. Find the missing elements in two different arrays.
  3. make a simple website clone.

Today’s task were easier compared to the previous tasks, and I chose to make a clone of google search page for my task 3. Thanks to the internet I was able to grab a boilerplate code and spent the day tweaking and adding new features to it. Going back to the topic of decisions, it turns out wrong decisions are necessary for growth, because you learn from them, the hours I spent trying to refactor my code made me understand arrays and the algorithm better, in the end I’m glad I made that wrong decision. I’ll leave you with the following epilogue. Think on it.

Sir, What is the secret of your success? a reporter asked a bank president.
Two words.
And, sir, what are they?
Good decisions.
And how do you make good decisions?
One word.
And sir, what is that?
Experience.
And how do you get Experience?
Two words.
And, sir, what are they?
Bad decisions.
- Unknown author