My Life Lessons From Coding
Ever since my parents bought a computer- of sorts- in the early 90s, I have been fascinated by the art of programming them. I say a computer of sorts because it had no resemblance to what we are now familiar with as to what a computer looks like.
A Relic From The Past
To describe it in not so many words, it was a computer build into a keyboard. You connected this machine to a TV and it used to run programs from audio cassette tapes. I know, right? My parents had picked this computer gadget from an expatriate couple that was living Malawi at the time.
Not to say that this was the state of technology at the time- I am not that old. By then the floppy disk was the rad storage medium that was all the rage but this couple had this machine from an earlier time.
And so the Sinclair ZX Spectrum +2 became my introduction to computers. At 3.5MHz processing speed and 128Kb or RAM, it was a relic even at that time but I didn't know better and so it was the best thing to ever happen to me.
I recall the machine came with four games on audio cassette. Total Recall, Robocop, Trivial Pursuit and Scrabble. I still vividly remember the sounds it used to make as you loaded the game in memory before you could play. It was a screeching sound similar to what Internet modems used to make when making a connection and about 10 minutes later you could play the game. Great times!
Apart from the games, the machine came with something else- An instruction manual to program in BASIC. I would spend hours looking at this code and was totally fascinated and used to write out the programs in the book, the most complex I can remember was programming an analogue clock.
A Lot Like Life
I have grown in leaps and bounds since my days of waiting 10 minutes for a program to load in memory and now I even have Internet access! Coming from those days when I could not comprehend the idea of interconnected computers to the present day of even interconnected social lives, I am filled with wonder on how far things have come.
My interest in coding aside, there is something remarkably akin to life when you are coding- when you really get into it. Coding is essentially a metaphor for problem solving and I believe as well a metaphor for life.
When you code you are trying to find a solution to a burning problem or need. Maybe you want to save people time or you would like to connect people or make the world a better place. Whatever pain you are trying to solve, within the process of doing that, you encounter smaller problems within the context of programing.
It is common for a coder to try and find the most efficient way to solve real-life problems within the confines of a set of strict programming rules. Life is the same way, you have life, then you have the smaller problems with the rules like how to stay healthy and strong where illness and inevitable death are part of the rules of living.
When solving problems, in life as it is in coding, you encounter bottlenecks- situations that make it hard to move forward. In life they are called problems or challenges but when you are programming they are bugs.
I have encountered my fair share of bugs when coding but in hindsight the resemblance to real-life is very striking and I am compelled to draw parallels with life situation and those similarities lead me to the following insights.
The Kind Of Questions You Ask Matter
I believe solving any problem, whether in life or when coding rests on your ability to ask the right kind of questions. There is a popular phrase in computing called “Garbage In Garbage Out, GIGO”. This phrase refers to the fact that as “smart” as computers are, they will only give you responses as is appropriate to the input you provide.
Solving any problem is always in response to the right question. In life, if you are in an unfulfilling relationship for example, unless you ask yourself the right questions about the nature and status of that relationship, you are not in a position to make your way out of it or change the circumstances.
If you are coding and you encounter a super-bug, it makes a whole world of difference whether you ask yourself the question, “Where am I going wrong” when contrasted to asking the alternative question, “Am I taking the right approach?”. The first question draws you deeper into your current way of thinking whilst the second question has the potential of making you pivot into a whole new direction.
And so the level and quality of questions you ask is critical when facing life or coding. It is therefore important to always reevaluate the questions we ask ourselves.
Do Not Be Quick To Apportion Blame
It is easy to blame someone or something else for the things that go wrong in our lives. Some people blame family, others blame friends or their boss or even the environment. The tendency to shift blame also creeps up when coding.
I often have to bring myself back from taking the path of the blame game. If I encounter a bug, it almost comes naturally to think that it’s the framework’s or the platform’s fault and not my code that is to blame. In almost all cases, it ends up being my fault. Often it will be a small mistake but it is notable that I was quick to look at anybody but myself as the first instinct for blame.
If a coder is part of a team, this can be a real issue. Understandably, especially in life, there are many instances in which things that happen to us are not our fault. However apportioning blame does not help the situation, perhaps part of the solution to the problem of the rush to apportion blame is to take our share of the responsibility even if the situation was not entirely our fault.
Sometimes It Is Necessary To Step Back And Let Go
At times when you are coding, you become too focused on what you are doing that you fail to notice problems and solutions that are right in front of you. What is happening in that moment is that you are too close to the situation to see it objectively.
When we are too involved with what we are doing, our own biases and inner deep perceptions can sometimes get in the way of finding optimal solutions to problems. It is the same in life, you can get caught up in your own negative patterns of thinking and the best way out when this happens is to step back and let go, if only for a while.
It's The Little Things
Coding requires a lot of patience because sometimes you hit a bug and it will be days on end before you find a solution. What can be irritating at times is that in thousands of lines of code, the issues was just one character, such as a comma that you left out.
This is also the case in life. It's the little things that can end up tripping us up. It might be a simple thing such as not getting enough sleep or gossiping about other people that might have great impact in our lives on a grander scale.
Paying attention to the little details can save you a lot of headaches when coding and so is it in life. Once you take care of the little details, the bigger picture takes care of itself.
You Are Never Alone
I remember a time when I was fighting the biggest monster of a bug I have ever encountered on a software project I was working on. I was a solo developer on this project but once I hit a brick wall, I reached out to online communities and the response was overwhelmingly remarkable.
In developer online communities and as you will find in most communities online, there are always people willing to help. It is a wonderful phenomenon that strangers will pitch in to help you with your situation, whatever it is without expecting anything in return.
My belief is that this is not only a feature of online communities but an aspect of what it means to be human. You will always find people willing to help you out, whether online or off , and all you have to do is ask. Furthermore, bringing in people is an opportunity for a fresh perspective to any given situation.
Never Give Up, There Is Always A Way
In my experience of coding, there has never been an issue that did not get sorted out eventually. As daunting as it may seem at the time you encounter a speed bump, there is no doubt in my mind that there is always a break-through on the horizon sooner or later.
Coding teaches me that as in life, there is always a way and all we have to do is trust that things will come right in the end. Isn’t that what faith is all about? Another interesting lesson from coding is that the code that had given me the most problems turns out to be the best code because it is always more refined. It therefore follows that obstacles make what we produce better and this has also brought me to the realization that great things take time.
I’ve had personal challenges in my life where at times it seems like things are taking forever to materialize and clarify but when I look at my experiences with coding and how I can draw many parallels to life, it gives me courage to soldier on and trust that it will work out in the end, as long as I condition myself to believe there is always a way. I invite you to have the same kind of faith in your life and your activities.