Wednesday, April 1, 2009

Random Update


I've painstakingly gone through nearly all of my blog posts and updated the URL for the little icons and images. I canceled their previous hosting domain and rolled them into my main one.
I wish blogger had a search and replace feature that would have let me find the old URL and replace it with the new one automatically. Oh well.

As of late, I've been looking into going back to school. It seems the Ottawa region is flooded with support analysts who have been laid off and the demand doesn't meet those levels. Perhaps I can either supplement my skills, or maybe it's time to move into a new career. We shall see.

I recently pieced together a new song concept demo, which can be found on my MySpace page - it's the track labeled 'Boneyard'. Check it out.


Thursday, January 8, 2009

Insane, Nuts, Brave - The Winter Cyclist


Being car-free arouses a lot of derision, but after a while you get used to it. People assume you're poor, or an alcoholic. They've bought into the car culture they where raised with, and to see someone getting by without ever owning a car kicks a reflex.
However, with global environmental concerns getting more news coverage and fluctuating fuel prices, people are getting less freaked out about it.

That is, until winter arrives.

Most winters, I can honestly say, I've been a wimp. I put the bike away and take the bus or walk to my destination. Last winter was the first time I ever rode a bicycle in the snow to get to the store. It was surprisingly easy, but I didn't really have a bike in condition to do it on a regular basis - so I filed it away in the back of my mind.

Over the course of the summer of 2008, I collected a few bicycle frames, wheels, parts and whatever bicycle related items I could scavenge when people cleaned out their garages. I found a fairly intact department store mountain bike - I'm usually fairly picky about these because of their low-quality manufacturing and questionable design decisions. This one I saved with the intent of putting it on the heavily salted roads in Ottawa. It's a bike that I can get to the store with, but can leave covered in slush outside without concern about how badly the water and salt are corroding the parts.

Here we are, part way into January and I'm still riding it nearly every day. I even took it out twice yesterday during the massive snow fall we had, just for kicks. I've discovered not only is it a great workout, it's fun and easy! The roads are usually kept clear for the cars, so riding on those is not much different from riding in the rain. The snow, when it's powdery presents little challenge to cut through in a low gear.

I guess people just aren't used to the idea - I wasn't until recently, so I guess I can't blame them. These same people would likely go skating or skiing in the same weather however, so the name calling is a little undeserved. I think the neighbor that called me 'brave' was really only searching for a polite term because I'd shoveled her walkway that day.


Friday, November 28, 2008

Painless Web 2.0 with jQuery


Allow me introduce you to my new favorite web tool: jQuery. jQuery is a handy java script that allows you to add AJAX functionality to your website without too much fuss at all.

After placing the jquery.js (obtained from jQuery.com) file in your website's path (ex. yoursite.com/include/) you simply need to add two javascript references in your page header:

<script src='include/jquery.js'></script>
<script src='include/scripts.js'></script>


The scripts.js file is where all the custom functionality code goes. Here's an example, where links clicked in a div named #nav will load the new content into the #content div without refreshing the whole page:


$(document).ready(function() { // after page is loaded, this is called automagically
$('#nav li a').click(function() {
var query = $(this).attr('href'); // this is what appears in the href tag
$('#content').hide('slow',loadContent); // hides the div, calls loadContent()

function loadContent() {
$('#content').load(query,'',showNewContent()); // pull the request into the div
} // calls showNewContent()

function showNewContent() {
$('#content').show('fast'); // show the new page content
}
return false; // returning false indicates the event was processed
});
});

No change to the actual page markup was required to make this happen at all. A small hurdle I encountered working with jQuery was that having an event bound to content inside the div #content would cease to function once new content was brought in. The reason for this is that jQuery loads the event binding based on what is on the page at first load. The easy way to solve this is to add the Live Query plugin for jQuery. Put it in your include directory with the other two scripts, and reference the script after jQuery but before your site's script:

<script src='include/jquery.js'></script>
<script src='include/jquery.livequery.js'></script>
<script src='include/scripts.js'></script>


You will need to perform the related event binding to use Live Query slightly different from a normal jQuery binding:

$(document).ready(function() { // after page is loaded, this is called automagically
$('#content a').livequery('click', function() { // livequery auto-binds when tags change
var query = $(this).attr('href'); // this is what appears in the href tag
alert('You clicked this link: ' + query);
return false; // returning false indicates the event was processed
});
});

Yup, it's just that easy - and once again, no change was made to the page markup. There is no end to the applications of jQuery and it's related plugins. Happy coding, and welcome to Web 2.0!


Thursday, November 20, 2008

Poetry in Tragedy


There was a fly buzzing around the house. It crashed into my halogen lamp, now it's just a smell.

Ok, so it was only tragic for the fly. Burnt itself to a crisp on the bulb, and stank up the room pretty good doing so.


Saturday, October 11, 2008

Missing Safely Remove Hardware in System Tray


So, I plug my USB flash drive into my computer and load some data to take with me. I look down to the bottom right of my screen and ... where's the icon gone?

I look through the menus and control panels and cannot find an entry for it. Next step, I check to see if the drive has an 'Eject' option. It doesn't. Only two things I can do - pull the drive and hope it's all written, or shutdown the PC and pull it out then. Since I was short on time, I yanked the USB drive and everything went OK - but where did that icon go?

Rebooting did not resolve the issue. I searched Google and there wasn't too much help there at all - although I did find numerous sites with the following tip:

Create a new shortcut on your desktop - right click and slide down to "New" then click on "Shortcut".



Copy this "%windir%\system32\RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll" (excluding the quotes) and paste it in the field that comes up in the next dialog box, under where it says "Type the location of the item:", then click "Next >".

The screen that follows prompts you to give the shortcut a name and is already pre-filled with "rundll32.exe" which is not helpful at all. Name it something obvious, such as "Safely Remove Hardare" and click "Finish".

Double clicking the shortcut should launch the Safetly Remove Hardware window with your list of devices.

A nice touch is to edit the shortcut's properties and change the icon to the usual one by using the icon browser. The icon can be found in "c:\windows\system32\hotplug.dll".


Tuesday, September 16, 2008

Letterman Makes The Point


I realize these clips are old, but I only just stumbled upon them today. I've caught a few of the Late Show episodes over the years and love the top ten list, but I've not really been a follower of it.

In these clips, David Letterman makes some very good points about the USA's invasion of Iraq, and boils it down to what it's all really about. Oil. It's definately worth watching the whole thing.

Part 1: http://www.youtube.com/watch?v=wWOGMKQ1aHo
Part 2: http://www.youtube.com/watch?v=l_LO-BuhxW0