Thursday, August 12, 2004

Another look at exceptions and lazy coding

Why is this such a popular topic? Cause everybody makes exceptions. It's a polite way of saying you made a mistake, you didn't plan for something. It could be as basic as not validating data entry. It could be you never figured somebody would score 50million on your game... Whatever the case, here is another clear breakdown of exceptions and what they mean. I like it cause it mentions System.SystemException, which I hadn't looked into too much.

Check out Eli Robillard's site here.

Also from Eli's site, I saw this interesting post. It talks about the nefarious SQL Injection fear, mentioning 'Use Parameters' as well as Regex (Regular Expression) techniques to clense your code.

I haven't used Regex yet, but after this article, I think I will. I also liked how he made a simple class to parse illegal characters from strings that may be entered manually. A link on his site also mentioned Request Validation, a feature in ASP.Net 1.1 that has been safeguarding my site and I didn't even realize it.

And my new favorite quote: "If you have a difficult task, give it to a lazy person - they will find an easier way to do it." -Hlade's Law

No comments: