Chorn Sokun's Weblog

Conquer inner fear, push it to the limit!

Posts Tagged ‘human error

read between the line

with 2 comments

It was last Friday when I tried to implement a UI for contractor register. Let see the code shall we?

if (!contractorTypeSelected)
    Flash["error"] = "Please select a contractor type";

Without knowing much detail it read like this “If the contractor’s type is not selected, flash an error and go back to step one otherwise take me to the next step“. It sounds pretty trivial right? well easy enough except it always take me to the next step no matter how bad the contractor’s type condition was ????!!!!!!

Now tell me what have I done wrong?

Written by Chorn Sokun

August 28, 2008 at 11:13 pm