Top 10 modern and good looking websites

Written on 4 February 2012, 12:19am

Tagged with: ,

The websites below have something in common: they are all modern-looking and there is a lot of attention behind every page. Most important, they are designed for emotion.
Without any other presentation, here they are:


Update your copyright year in your blog’s footer!

Written on 2 February 2012, 11:46am

Tagged with: ,

We’re already more than one month into 2012, and I still notice websites showing 2011 in their footer copyright notice.
3 examples:

The solution is really simple – use PHP’s date("Y") function to get the current year (or any similar functions for the alternative server side languages). No need to manually update your theme’s footer every 1st of January 🙂

<!-- replace -->
&copy; 2011
<!-- with -->
&copy; <?php echo date("Y"); ?>

Today, the users are scrolling to the end of the page. So it’s more likely for them to discover such simple mistakes that look simply unprofessional. It’s time to fix that!

Cfargument: required and default attributes

Written on 11 January 2012, 03:30pm

Tagged with:

Just noting an interesting observation about the attributes of the cfargument tag.
What happens if you set the required="true" attribute, but also the default attribute?
The answer is in the documentation: if passed, the ‘default‘ attribute is used, and the ‘required‘ attribute is ignored.

required (optional, default=’no’):
Specifies whether the parameter is required to execute the component method. The parameter is not required if you specify a default attribute.

An example below:


	<cffunction name="add">
		<cfargument name="a" required="true" type="string" default="1" />
		<cfargument name="b" required="true" type="string" default="1" />
		<cfreturn a+b>


<cfinvoke component="dummy"
	returnVariable="sum" />

The example below will still output 2, even if we call the ‘add’ method without any argument. The default values are used.