Microsoft Virtual PC for IE6 Testing

Windows Vista Logo

Just in case you didn't know already, testing websites in Internet Explorer is annoying, especially given that you can't have IE6 and IE7 installed simultaneously. Enter a free tool from Microsoft: Microsoft Virtual PC. This program is a decent VMWare like setup, but it gets better because Microsoft has actually released images for you to use with them. You can find images with IE6, IE7, and even IE8 beta all on their download page.

I know, a free tool from Microsoft that makes your life a little easier. It's weird!

 

Web Design for ROI

I've been working on tons of little projects the last couple of weeks, but unfortunately, they have all been generated by Web Design for ROI by Lance Loveday and Sandra Neihaus. This book is awesome. Its got me looking at all kinds of sites and thinking, "How can I maximize conversion on this?"

If you do anything remotely like front or user interface design, this book is for you.

 

Utility Function: IfElse()

I don't know about you, but I hate having to write out simple if-else code bits in CF. Until they come out with a good operator like JS has (something?something:something), CF needs a simplification.

<cffunction name="IfElse" access="public" output="false" returntype="Any">
    <cfargument name="test" type="boolean" required="true" />
    <cfargument name="whenTrue" type="any" required="true" />
    <cfargument name="whenFalse" type="any" required="true" />
    
    <cfif ARGUMENTS.test>
        <cfreturn ARGUMENTS.whenTrue />
    <cfelse>
        <cfreturn ARGUMENTS.whenFalse />
    </cfif>    
</cffunction>

Seems pointless, but which would you rather read?

<!--- Classic, 5 lines --->
<cfif true>
    <cfset x = "dog" />
<cfelse>
    <cfset x = "cat" />
</cfif>

<!--- Version 2, 4 lines --->
<cfset x = "cat" />
<cfif true>
    <cfset x = "dog" />
</cfif>

<!--- My Way, 1 line --->
<cfset x = IfElse(true, "dog", "cat") />

 

Shortcut to My Hosts File

I don't know how often you need to edit your hosts file, but it seems like something I have to do on a daily basis, and its a pain. First the file is buried in Windows subdirectories, so you have to find the thing, and then when you do, it doesn't have an extension, so you constantly have to tell Windows what to open it with. Today, I finally managed to make a shortcut to launch it in Notepad.

  1. Create a new shortcut.
  2. Paste the following into the location:
    %windir%\notepad.exe %windir%\system32\drivers\etc\hosts
  3. Use the wizard to name it, and be happy.

That should work for almost everyone, unless your host file is located somewhere else.

 

Vote!

Go out and vote. I don't care who you vote for, I just want you to vote.

 

CSS Sprites for Hover Effects Tutorial

While I'm a web developer, I often delve into the world of a web designer as well, specially when it comes to optimizing performance and user experience. That, and my love of techniques used in 8-bit games, is why I love CSS sprites, and why I put together a tutorial on how to create and use a CSS sprites for menu backgrounds, like in this demo. Click on the "More" link below to view the tutorial.

 

More Entries

Jon Hartmann, July 2011

I'm Jon Hartmann and I'm a Javascript fanatic, UX/UI evangelist and former ColdFusion master. I blog about mysterious error messages, user interface design questions, and all things baffling and irksome about programming for the web.

Learn more about me on LinkedIn.