General

Posts that cover general aspects of programming.

Using Simple Input Detailed Ouput Principles With Web Forms

Tuesday, November 11, 2008 - 10:23

If you have a web site then the chances are that there will be a form of some kind on there somewhere. This might be a search box, or a contact form or even a tool. There is one thing that should be followed no matter what sort of form you create and this is the rule of Simple Input Detailed Output, or SIDO for short.

Category: 

Writing Function Code To Be More Readable

Wednesday, October 1, 2008 - 09:30

Last month I started writing functions in a particular way, which has made my life as a programmer much easier on more than one occasion. No matter how many comments or verbose parameter names you put in you can end up writing code that you will get lost in. The reason is simple. Lets say you had a function that took in a couple of parameters.

Category: 

The Google Chrome User Agent

Wednesday, September 3, 2008 - 09:41

As the new Google web browser was released last night (I'm writing this post using the new browser) I thought it would be good to update our readers on the user agent string that this web browser has.

The user agent of any browser can be found out by using the userAgent property of the navigator object. This is available in most modern browsers and is thankfully also present in Google Chrome.

navigator.userAgent

As an example the user agent for FireFox 3 on a Windows XP machine looks like this.

Category: 

Some Common Timestamp Intervals

Friday, May 2, 2008 - 09:45

Using timestamps is quite a common practice, but converting them into "real life" times can be a little hard. So here are some common time intervals that you might need.

Category: