Re: Dear Coders - Rules You Learned in Kindergarten
Sadly, what you basically describe is 'Defensive Programming'. This should be taught but it is just not cool, sexy and all that crap.
It takes time to learn but when you get it, using it for ecerything you code really takes up no more time than all that sloppy coding that seems so prevalent these days.
Thankfully, the current dev environment I work in makes this easy. OTheres are a PITA until you develop your own set of functions and procedures.
Finally, I've lost count of all thise XML Schema's I've seen that have eveything as xs:string even if the valuesare dates, numbers and booleans. If you properly crafted the XSD you could quickly validate against content AND Value. But no, this is all too hard and un sexy/un cool.