We often hear people say that the code/program/software is not correct.

What I don't understand is how can the code be wrong by itself?

Code will always do what the coder told it to do. It does not think, it does not change itself and it most definitely does not give a wrong answer. If you write a piece of code that will multiple 2 integers like a=b+c it will always give you the correct answer for addition. It is your expectation and logic that is wrong.

Like in the example above, if you want your code to multiply 2 integers, you should have checked that you have written the write logic. Sometimes it may also happen that a person misunderstands the purpose of the code/program/software and ends up thinking that it is wrong. So it is always our expectations, logic, understanding, not testing and decisions that may be wrong, but never the code. Because it is us who can think and hence make the require changes to get the right output from the code.


Share you thoughts

To share your thoughts, you can simply fill in the form below and send me an email with your favorite email client/app.


Comments