There are many things that programming has taught me. One of them is this: Knowing the problem is half the solution. Most of the time what you see as the problem is not the actual problem. The actual problem most of the time, hides behind it's effects.

What the heck am I talking about? Let me give you an example. In programming, there is a term called “logical error”. It basically means that wrong logic is used in the program. A program with a logical error will run fine, without any problems. However it will not produce the intended result. For example, I write a program to do addition. When I enter 2 + 2 it answers 4. But when I enter 3 + 2, it answers 6. So in fact, I have created a program for multiplication when I intended to create a program for addition. It is a logical error on my part.

According to the program, answer of 3 + 2 is 6. The answer is certainly wrong, but it is not the problem. It is the effect of the problem. The cause of that effect is the real problem. In this case, the cause lies in the formula of addition that I have used. So knowing that the problem lies in the formula is half the solution. If I do not know the problem, what I would do is, add an if condition. If the input is 3 + 2 give answer 5. But then what about 3 + 3? According to the program it is 9. Do I go and add another condition? What about 3 + 4 or 6 + 4? More conditions? If I do that, I might fix some of the answers but I can not solve the real problem without really knowing what the real problem is. I may successfully fix the effect(the wrong result), but the cause(the real problem) remains to be dealt with.

That's why I say, knowing the problem is half the solution. And this principal isn't limited to programming. It also applies in our daily lives. A lot of times in our lives, we go on trying to solve the ill effects of the problem without knowing that the actual problem is not the one you are trying to solve. The real problem may be something entirely different. So we should always try to dig deeper and understand what the real problem is.

So Johnny boy, next time you come across any problem, step back and think if what you see is the problem or is it just the effect of the problem and the actual problem is something else!