Image Image Image Image Image
Scroll to Top

To Top

User Experience

CSS Formatted Table

On 28, Feb 2007 | No Comments | In User Experience | By Ryan Feeley

Much like my previous post about CSS buttons, here is some ultra-lean code for making tables look nice with CSS. And as with the previous post, much smarter code ideas can probably be found at the Yahoo! UI Library.


CSS Formatted Table

Some simple XHTML/CSS for tables. CSS Formatted Table (HTML)

The number you are dialling is annoying

Since the great 416/647 split of 2001 most of us living in Southern Ontario have become accustomed to dialling 10 digits to make local calls. I haven’t.

While I rarely forget to dial the area code (416, 647 or 905), I often mistakenly dial 1 first as if I were dialling long distance. In either instance, I am informed of my mistake by a robot and forced to hang up and dial again.

Dear POTS head executives:

  • In the instance of a superfluous 1, why not connect me anyway? (warning optional)
  • In the instance where I neglect to include the area code, why not assume I mean my area code and proceed with the call? (warning optional)

OS X’s Spotlight: The modern Whack-A-Mole

On 22, Feb 2007 | 9 Comments | In Apple, User Experience | By Ryan Feeley

SpotlightI love how Spotlight in OS X can find information I need inside files I had long forgotten about. All I need to do is type in a few letters of what I’m looking for and then prepare for the unpleasant experience of modern Whack-A-Mole. Spotlight returns files immediately in its pulldown menu, but also begins sorting, reordering and removing them before the loading is complete. Much bobbing and weaving required. What’s worse, if I have the patience to wait for the results to fully load, I am unable to reveal a selected file with the typical ⌘-R shortcut. I don’t always want to open files I’m looking for, and if i do, I don’t always want them opened in their default applications. I need to bring up a separate window, then perform ⌘-R. Why can’t I just have my right-click? And can’t the sorting and grouping be optional?

Apple, how did you ship Spotlight like this?

Code of the Year

On 22, Feb 2007 | 3 Comments | In User Experience | By Ryan Feeley

Like most people, I have difficulty writing my first cheque of the new year. I always write the wrong year. Apparently, I am also like most web sites.

Many big, respectable and seemingly well-maintained sites show a previous year in their copyright footer. Some are painfully out of date.

If this was something that must be done manually, I could understand. But the content on a web page is not written with a Bic Grip Roller. It’s generated by a computer that knows the current year.

Here’s some code you can use to keep your copyright current. Examples for Perl, Python, etc. are appreciated!

In Javascript:

<script language="javascript" type="text/javascript">
var mydate = new Date();
var year= mydate.getYear();
if (year<2000){year+=1900};
if (year>2100){year-=1800};
var time = ( year );


<?php echo date("Y");?>

In parsed HTML (aka SHTML, must be enabled in Apache):

<!--#config timefmt=" %Y" -->
<!--#echo var="DATE_LOCAL" -->

In Java (JSP, thanks to Tim!):

<%= (new SimpleDateFormat("yyyy")).format( new Date() ) %>

In Smalltalk (thanks to Tim!):

^Date today year asString

In Ruby (thanks to Scott Boms):

add the following to a helper (eg. application_helper)

def copyright_year t = t.year end

then in the view file, just put <%= copyright_year %>