Blah Blah Woof Woof

Archived content 2005-2007

To my lazy blogging friends

Posted by Tim Riley Thu, 04 Oct 2007 11:41:07 GMT

Write something! It is up to you to stop Planet Botfu turning into Planet Safari_Al.

Layer Tennis has begun again

Posted by Tim Riley Sat, 29 Sep 2007 00:23:48 GMT

Hey sports fans, forget the football this weekend, make sure you go check out the opening round of the new Layer Tennis season: an engaging match between Shaun Inman and Kevin Cornell, with entertaining commentary by John Gruber.

Posted in Geek, Tumble


Posted by Tim Riley Mon, 24 Sep 2007 06:02:00 GMT

I am sitting in Adelaide airport waiting for my flight back to Canberra. It has been delayed, so I thought I would make use of the extra time to write something here. However, all of my notes (including a list of topics on which I would like to write) are at home on VoodooPads, and not on the laptop I have borrowed.

At times like these, I wish I used online services a little more to keep track of lists and ideas. However, the more clicks that it takes to achieve something, the less likely it is that I do it regularly. So go and check out Jottit, an extremely simple and easy to use website/wiki creation tool.

While it lacks some of the refinement of Backpack, its simplicity (it is built around little more than a single text area for editing pages) makes it look like a quick and easy system to use.

Posted in Geek

Back on the ranch

Posted by Tim Riley Tue, 18 Sep 2007 14:46:19 GMT

I'll be back in Adelaide from Friday to Monday this coming weekend. I'll be coaching during the days on Friday through to Sunday, but Saturday and Sunday nights are free. If anyone is free and would like to catch up for a drink, drop me a line!

Posted in Life

Ready to Rumble

Posted by Tim Riley Fri, 07 Sep 2007 08:36:00 GMT

This weekend, Hugh and I will spend 48 hours building a new web app as part of the Rails Rumble. We're going to build something that I have personally wanted to use for a long time. It should be a lot of fun!

We may be looking for some beta testers, so feel free to register your interest here. Anyway, watch this space, I will keep you all posted throughout the event!

Posted in Life, Geek | 6 comments

CSS selectors in Prototype are a godsend

Posted by Tim Riley Fri, 07 Sep 2007 07:51:00 GMT

This week I have been working in some parts of an app that were written a long time ago and have not been touched since.

I've had to resist the temptation to clean up all the code, but a couple of things I could not just let be.

Behold the ugly, ugly, JS code used to select checkboxes within a particular div:

/* Iterates through all users within the TBODY and checks their checkboxes */ 
function markCheckboxesForDiv(tbody, value) { 
  for (i = 0; i < tbody.childNodes.length; i++) { 
    if (tbody.childNodes[i].tagName == 'DIV') { 
      for (j = 0; j < tbody.childNodes[i].childNodes.length; j++) { 

        if (tbody.childNodes[i].childNodes[j].tagName == 'DIV') { 
          for (k = 0; k < tbody.childNodes[i].childNodes[j].childNodes.length; k++) { 

            if (tbody.childNodes[i].childNodes[j].childNodes[k].tagName == 'SPAN') { 
              for (l = 0; l < tbody.childNodes[i].childNodes[j].childNodes[k].childNodes.length; l++) { 

                if (tbody.childNodes[i].childNodes[j].childNodes[k].childNodes[l].tagName == 'INPUT') { 
                  tbody.childNodes[i].childNodes[j].childNodes[k].childNodes[l].checked = value; 

Apart from the obvious problems with the depply nested if statements, this code is strongly dependent on the structure of the page markup. I actually broke it while making some unrelated changes.

Here is the new version:

function markCheckboxesForDiv(divname, value) {
  $$('#' + divname + ' input[type=checkbox]').each(function(f) {
    f.checked = value;

Much simpler, more robust and more loosely coupled thanks to the wonders of the CSS selector utility function from Prototype, dollar dollar.

Posted in Geek | no comments

"iPhone" applications, or The Mobile Web

Posted by Tim Riley Thu, 06 Sep 2007 08:02:00 GMT

Gruber wrote after the announcement of the iPhone, that:

Perhaps it’s playing well in the mainstream press, but here at WWDC, Apple’s “you can write great apps for the iPhone: they’re called ‘web sites’” — message went over like a lead balloon.

Now that the iPod Touch has been announced with the inclusion of MobileSafari, this position that web apps are iPhone apps begins to make a lot more sense.

The only Internet-enabled components from the iPhone that have found their way into the iPod Touch are the Safari and YouTube apps. Mail, maps, and widgets - the prime examples of rich native applications that put web apps to shame - remain only on the iPhone. Given that the iPod Touch is much more narrowly focused than the iPhone, this smaller selection of Internet-enabled apps may likely remain a key distinction between the two products.

The release of this cheaper, more accessible, Wi-Fi enabled Apple device will no doubt bring a large influx of new MobileSafari users to the world. Designing web apps for MobileSafari will ensure these applications are available to largest possible market - both iPhone and iPod Touch users.

Posted in Geek | 73 comments | 213 trackbacks

Restoring a deleted directory or branch in subversion

Posted by Tim Riley Mon, 03 Sep 2007 00:48:00 GMT

To restore a deleted directory or branch in a subversion repository, use the svn copy command. Copy it from the last revision before it was removed:

svn copy -r 1234 http://svnserver/path/to/branch http://svnserver/path/to/branch

Posted in Geek | 1 comment

Getting my new mac keyboard to work with a PC

Posted by Tim Riley Sun, 19 Aug 2007 23:37:00 GMT

Dear Internet,

I’ve been having some troubles getting my PC to boot while connected to one of the new Apple USB keyboards.

I have it connected with a USB extension cable in order for the keyboard to reach my desk. However, in this state, the BIOS will print a “No keyboard present” error and fail to boot.

When I remove the extension cable and connect the keyboard directly, this error oes not appear and the system boots fine! When I plug it back in through the extension cable after this point, everything is fine also. The problem seems to occur only when the BIOS is loading.

Now ideally I need the extension cable because typing under my desk is just not comfortable. Does anyone have any ideas about how to fix or work around this issue? The USB keyboard support in my BIOS is turned on, for what it’s worth.

You are my only hope!



Posted in Geek | 3 comments

Navigating between tabs in OS X

Posted by Tim Riley Tue, 14 Aug 2007 13:34:00 GMT

To use the keyboard to move to the next tab on the right, for selected apps on OS X:

Safari⌘ + shift + ]
Firefox⌘ + ⌥ + →
Adium⌘ + ]
VoodooPad⌘ + ⌥ + shift + ]

In my time using OS X, I've found it generally to be quite a polished OS, and the application authors on the whole adhere to a consistent or obvious set of behaviours. Keyboard navigation of tabs, however, is one thing that continues to trip me up.

As far as I know, this is something where the Linux desktops are much further ahead, where "Control + Page Down" does the job in the majority of apps I use.

Posted in Geek | 3 comments

Older posts: 1 2 3 ... 10