Archive for October, 2012
Burn your controller a la Erez Rabih
Don’t Solve The Problem, Prevent It.
When you deal with input in programming, it is always a good practice to make sure you can’t get from the user what you wouldn’t want to get. I know it sounds strange at the beginning, but let me further explain with the simplest example:
Let’s say you want to get a date as an input from the user. A date can have many different formats and dealing with every possible format could become very frustrating. Now if you let the user enter the date in a simple text box you leave the power in the hands of the user. He decides how the input gets to your server, and you find yourself wasting a lot of code lines on the parsing of the date.
That is exactly the reason why graphical date picker components were created. A date picker lets the user choose…
View original post 494 more words