Stephen on Software aka SOS

July 30, 2009

The code does not lie !

Filed under: Programming — Tags: — sljm @ 10:04 pm

Today I was trying to figure some programming issue which has somethings to do with the architecture of the system (or more commonly know as “How do you do this (correctly)” or “How does this actually work” kind of question) today, you know the kind at work where you asked how this thing worked its suppose to work and then it’s gets all confusing because every time you asked someone, they sort of give you a slightly different answer.

On and off over the past few months (yes yes I did procrastinate a bit in this regard), I asked different people and it’s all getting confusing as to who is correct. Guess I should be asking the person who wrote the library from the start, but then I don’t know who did it just the general group that did it. I am going to go somewhat straight to the horses mouth tomorrow i guess to resolve this once and for all.

But meanwhile in order to start understanding, I decompiled the code (yes it is in one of those decompilable languages, so I am lucky!). Why would I want to do that? Because ……

THE CODE DOES NOT LIE !!!

Yeap the CODE DOES NOT LIE, guess no matter what people say, the code will be  the absolute truth. And in programming it is the best way of learning how to do something. But often we just cut and paste blindly, I suggest that we behave just like in school when we forgot to do a math assignment cause we play too much Final Fantasy or MGS, we always say we “copy with understanding” from our classmates when our teachers catch us for having very similar answers.

Some people are very sensitive about other people seeing their own code, I have no idea why? If people can give comments on how to improve wouldn’t that be great. Especially in a project, no code is own by an individual, all the code is up for others to edit and improve and add functionality. Just remember that if you break it you fix it. If someone found a bug in my code, I will be glad to accept it cause it probably saved me a few debugging hours later on. Some are afraid that others will see them take shortcuts, use bad naming conventions and so on. Then don’t do it in the first place, let’s all join the C.L.U.B.

I guess this is why Open Sourced Projects (at least the ones with lots of people in it) are doing great in terms of code quality. They have many people reviewing and writing code to make it better.

I think this is the longest rant i got so far in my blog i should stop here gotta get some sleep. Till the next time.

Blog at WordPress.com.