Friday, September 4, 2009

Applying Programming to Life

I never knew I would be doing so much programming professionally. I grew up wanting to be an artist. Drawing was my thing; I drew a lot and loved doing it. I loved Disney cartoons and comic book superheroes. I didn't care about the great European painters. My parents would always say that artists didn't make any money and that I'd starve to death as an artist. I was way too young to care much about money so that didn't mean anything to me.

Life progressed and I basically fell into programming. I only learned how to code to make games--I also only drew because I wanted to make comic books and cartoons. I don't really do much programming outside of work these days and drawing has fell completely off the radar. I'm mostly engaged in politics, economics, money, and business now. But, I have been programming for a good many years professionally and on my own and there are a few incredible parallels to life that I've discovered.

You Don't Need to Know How

This is the single most important idea from programming that applies to life. You don't need to know how you'll get something done, you just need to believe you can do it. Very often when I am making a game, I have no idea how I am going to implement a feature. Either because I've never done it before or I've never heard of or seen anyone else do it. The latter is highly unlikely as I don't really do cutting edge stuff. The former is quite common. I consider this part of my job rather exciting--some people would have heart attacks. I'm not a veteran at making games and I never went to school for games or programming--my degree is in Marketing but, I can code.

In all the programming I've done, be it for a game or an application, there has been no feature that I've not been able to implement. It has very little to do with how good I am--I don't think I'm that good. Once you believe you can, your mind has this incredible power to find the means to get it done. I strongly believe that this is also true in life. Don't worry about how you'll reach a goal and absolutely don't think that you cannot. Just believe you can and as if by magic, you'll find a way to do it. There are a multitude of things in life that I've managed to accomplish without knowing how. I mean, I'm making games for a living. It had been a dream of mine to do that and like most dreams, it seemed far-off and almost impossible. I didn't know how I was going to do it and I didn't question it--after all, I was just a kid. I set the objective, believed it would come to be, and set forth towards it.

I know that this blind faith is ludicrous to some people. There isn't any other way for me to explain it. I know it works since I use it all the time. Of course, it doesn't mean things will all happen smoothly with no bumps along the way. To compare it to programming again, I'm often stuck for hours or days trying to figure out how to do something. It gets frustrating and almost impossible but, I keep at it trying different ways and thinking differently and then I find the answer. Always.

The problem lies more in the fact that we are more likely to give up on our own life objectives than on finding a solution at work. Think about it, I'm sure you have managed to solve a seemingly impossible problem at work by simply believing you can or because there was no other alternative; your boss wanted it done. We don't have a boss to make sure we reach our life objectives and so it is easy to put it on hold or just give up on it. So remember: you don't need to know how, you just need to know you can.

It Can't All Be Perfect

There are times when I spend way too much time trying to write super efficient code when the brute force method works just as good and takes much less time to write. Granted, computer programs today seem to be written more and more poorly. My web browsers--FireFox and Internet Explorer-- are always crashing! New applications run slower on newer computers than their old counterparts on older computers. There is a nice middle ground between writing super lightweight efficient code and slow resource-hogging code. The key is to know where the middle ground is.

I have no magical formula to find it. A lot of it has to do with experience and intuition. In life, we don't always need perfection but, at the same time, we can't always have everything half-assed. Just from being alive, we have learned what is and isn't important in our lives. For those things that we care about, we should try to be as perfect as we can. They are important and so they deserve the extra attention. Just as we only have so much computing power to use, there is only so much time in a day. Pick and choose what is important and focus on those or we'll never get anything done.

Think By Not Thinking

Every so often, there are bugs--defects in a program--that are impossibly stubborn. I'll look over the code as carefully as I can several times and everything looks fine. I test and debug to try and locate the source of the problem and I can't find it. These problems will drive you insane, especially when you finally solve it later and find out that it was something ridiculously silly. How do these problems usually get solved? I do it by not thinking about them. As illogical as that sounds, it is probably the best way to find the answer. You just forget about it, go do something else, and all of sudden the solution will come to you. I assume my subconscious mind goes to work on it once I stop consciously thinking about it. The subconscious has the incredible ability to see details we miss.

If it is one thing we have too much of in life, it's problems. Problems from A to Z and it never seems to end. Sometimes they are small and sometimes they are not so small. Some people take small problems and make them big problems. The size of the problem is in the eye of the beholder. I take all problems and make them small problems. That way, I don't worry about them. Often, I have a problem that I don't have a good solution for so I put it aside for a while. I don't spend every waking moment focused on it. I'm aware it is there and I let my subconscious take care of it. These are generally non-urgent problems but, even the urgent ones might be best solved by making them small problems and letting your subconscious find the answer--it can work pretty fast too.

So how do we make problems seem small? Actually, we are just putting them into perspective. I read this in Whatever You Think Think The Opposite, by Paul Arden, and in one part it describes a son telling his father that he had a problem so his father asks if someone was trying to kill him. He says "no" and his father says, "Then, you don't have a problem." That is how I look at it. If no one is trying to kill me and no one is going to die, the problem isn't that big of a deal. Don't spend all your energy trying to find a solution to all your problems, you'll just go crazy from over-worrying. Relax, give it to your subconscious, and you'll be fine.

To wrap it up: you don't need to know how, you just need to know you can do accomplish things, everything can't be perfect so we should choose the important things to focus on, and our subconscious can handle a lot of our problems better than we can. Who knew such universal ideas could be found in programming?

Tommy Leung
http://www.supertommy.com

No comments: