The lost opportunities of data validation

Conventional programming wisdom says you should always check any data input from the user and exclude anything that your code cannot cope with. [“User” … a strangely demeaning term for a person whom you are trying help. We need a new more respectful word for the people who are left struggling with the results of our coding. ]

Anyway, the normal practice with data validation is to only pass on whatever gets through the filters for further processing. All well and good. But what about the input you reject?

99% of the time when input is rejected the only action taken is to present the “user” with an suitably arrogant message.

"ERROR: We can only accept your information if you kneel with your knees exactly 10cm apart in front the great computer and bow deeply".

But what we as programmers routinely throw away contains vital nuggets of information – the cases we did not properly consider. Take my address for example. I live in a village where there are no road names or house numbers. What happens when I try to order something online?

I come up against the preconceptions of the programmer who designed the address form. House number and street name are required fields into which I’m  forced to enter rubbish just in order to get my order accepted.

The fact that the program is expecting a house number and street name in each case is a design flaw.  That information should be captured and fed back to the programmer.

the penny dropped!

Blogs are the new confessional, a place to cleanse the soul by publicly admitting  failures. My question to the powers that run the universe is:

“why has this taken me so long to think of ?”.

Problem: connectCAD likes objects to be on the grid

Solution: laboriously click on each object and drag it back onto the grid


About time too. How come I didn’t write this simple and useful command all these years? Still kicking myself.

Thanks to Edward Kitchingman for finally jogging my mind.