.Net Dojo: Data Validation
Validating data is a very important part of any application that takes user input. Without validation, users can enter whatever they feel like. This is especially bad when needing specific data, like an e-mail address.
To make things easy for myself, I have all my common validation methods in one library. Validating user input is done using regular expressions. While I do my validation on the backend, it is a common practice to use validators do do much of your validation on the client. This saves the user from having to do a postback to the server only to get an error back. I agree that this is a good practice, but for every javascript validation I do, I also validate it on the server. The reason behind this is that a user can download your html to their computer, strip out the validation, and post to your server. This was something I tested when working on websites for a certain polling and market research company. Because of this flaw, we developed a standard practice to only use required field validators for client side validation and test all other validation on the backend.
Read more »
Nihongo: Telling Time
During class, my sensei will often ask whoever is closest to the wall “Ima nanji desu ka” which means “what time is it.” My time telling skills on the fly are rather sub-par, so I decided to write up a tutorial on telling time in Japanese to help not only myself, but anyone else who wants to learn.
To tell time, we must first begin with numbers. Counting in Japanese is a little confusing for beginners, because if you are counting people you use different (but similar) words than if you are counting objects. In the dojo we use numbers different from regular counting as well. So, I will teach using the counting system we use in class.
1. ichi 一
2. ni 二
3. san 三
4. shi (or yon) 四 shi also means death, which is why the Japanese prefer to use Yon. This is also directly related to the superstition that 4 is an unlucky number.
5. go 五
6. roku 六
7. shichi (or nana) 七
8. hachi 八
9. kyuu 九
10. juu 拾
Read more »
-
Archives
- June 2008 (3)
- May 2008 (1)
- March 2008 (1)
- February 2008 (6)
- January 2008 (6)
- November 2007 (18)
-
Categories
-
RSS
Entries RSS
Comments RSS