Wamz - Before you install the Amazon MP3 Downloader...

Recently, I've been downloading a lot of music from Amazon. One of the things that disappointed me about the purchasing process was the need to install Amazon's proprietary downloader in order to get the music. If you find yourself annoyed with the situation, try out a little application I put together called Wamz.

Wamz watches a directory for Amazon MP3 .amz files and then executes the application associated with the .amz files. This allows the Amazon MP3 downloader (or other associated app) to open up and begin downloading the purchased music files.

When Wamz is run on a home server, you can set it up to watch a directory that is shared over your home network. Then when anyone on the network downloads music from Amazon, they can just drop the .amz file in the shared directory and Wamz will launch the associated downloader to download the music.

It's a pretty straightforward operation, but if you need more information or help installing and setting up Wamz you can visit the wiki.

When Yesterday Isn't Yesterday

The typical toddler can adequately describe the concept of yesterday, but in software development it's not always as easy as "the day before today." First of all, today is relative. No matter where you are in the world, someone is either lagging behind in yesterday or plowing ahead in tomorrow. Since an internet user can be located anywhere, web software needs to be either flexible enough to adapt to the location of each user or it shouldn't use relative terms like "today" and "tomorrow."

A perfect example of getting this wrong is Stack Overflow. First of all, I'm a huge fan of the site. I think it's genius and I'm jealous I didn't create it first. That being written, it gets the "today" and "yesterday" thing wrong. Until 24 hours have passed since the time a question was asked, the website will show that the question was asked today. While I doubt it's the type of bug that would keep astronauts from the moon, it's weird. I even brought it up a while back on the UserVoice suggestions list and was shot down by Jeff Atwood himself. The reason? Evidently it's that way "by design."

I'm not someone who likes to criticize without providing either sympathy or preferably a possible solution so below you'll find the JavaScript necessary to convert yesterday's date into the string "yesterday." In order for the script to function, you need to output the date into an HTML element in a format that JavaScript can parse into a Date object. Then, just mark the containing element with the CSS class "ReplaceDate" and the date will be replaced if applicable. Since the conversion happens on the client side, the yesterday problem should take care of itself naturally (provided that the user has their date set properly). Lastly, the script should degrade gracefully such that the original dates sent to the client are displayed to the user.

Warning: This was whipped up in Notepad and tested briefly in IE8. There are no guarantees that this code will work properly. In fact, the code is probably ugly enough to make babies cry.

$(document).ready(function() {
    var yesterday = new Date();

    $('.ReplaceDate').each(function() {
        var elementDate = new Date($(this).text());

        if (elementDate.getDate() === yesterday.getDate() && 
            elementDate.getMonth() === yesterday.getMonth() && 
            elementDate.getFullYear() === yesterday.getFullYear()) {


Continuing Education

The longer I spend developing software, the more I realize there are vast areas of programming where I am helplessly clueless. Even within C# development, the domain where I am supposed to have most of my knowledge, it's not hard to stumble upon something I don't understand as well as I thought.

For example, let's take indexed properties. Most people are familiar with some variation of the following indexed property example:

public class MyClass
    char[] content;

    internal MyClass(char[] values)
      content = values;

    // This is an indexed property
    public char this[int index] 
        get { return content[index]; }
        set { content[index] = value; 

One thing I never realized is that indexed properties can have multiple parameters:

public class MyClass
    char[][] content;

    internal MyClass(char[][] values)
        content = values;

    // This is an indexed property with multiple parameters
    public char this[int index1, int index2]
        get { return content[index1][index2]; }
        set { content[index1][index2] = value; }

Although Microsoft recommends against multiple parameters in their indexed property design recommendations, it's still a very basic aspect of the language that I was fully unaware of until recently.

In the case that you don't commonly find yourself wearing the hat of novice developer, feel free to browse the current set of unanswered C# questions over at Stack Overflow and share the wealth of your knowledge.

Don't Be Late

After missing a few right-after-lunch meetings over the course of my development career, trying to go out for lunch now involves checking my email and calendar a half dozen times before being absolutely sure I'm not going to be late or miss anything. Besides being annoying, that ritual is full of holes. For example, what happens if a meeting with little lead-time is scheduled after I've left for lunch? Not being a BlackBerry or any other wirelessly syncing device user, I needed something that would forward Outlook reminders to my phone via SMS.

Luckily, with a little research I found a couple Outlook add-in examples that provided most of the desired functionality. All I needed to do was weave them together into a working solution.

After a little hacking (and I do mean hacking, the code isn't pretty), I present to you Don't Be Late. The premise is simple, when an Outlook reminder pops up an email gets sent to the configured address. That's it. To get the emails to my phone, I used the instructions at wikiHow.

A few things I need to point out are that I've only used this with Outlook 2007 on a single machine. If it doesn't work for you in other versions of Outlook or on your machine feel free to email me or submit a patch. Also, Outlook has to be running in order for the emails to be sent out.

Finally, I'd like to thank the following sites that provided the example functionality needed to put Don't Be Late together:

  • http://blogs.msdn.com/coding4fun/archive/2006/10/31/908472.aspx
  • http://blogs.msdn.com/dancre/archive/2004/03/21/93712.aspx
  • http://support.microsoft.com/kb/310263
  • http://msdn.microsoft.com/en-us/library/ms268747(VS.80).aspx

Feel free to download the Don't Be Late source or binaries from GitHub.

Websites and Branches

If you've ever worked with websites in source control, you've probably encountered the following message after opening a solution from different branches:

This solution contains a web site at ‘http://localhost/Website’. There is already a web site at this location on this computer. Do you wish to use this existing location for your web site (existing files will be overwritten)?

In my experience, clicking yes and reusing the existing location can result in unexpected behavior seemingly due to the fact that files are not removed from the IIS or .NET temporary files relating to the existing virtual directory.

For that reason, I've trained myself to always click 'no' which causes the website to have a location something like 'http://localhost/Website_1'. Not ideal, but it works.

What I've never figured out is how to either bring back up the dialog asking about location reuse or fix the errors that occur after reusing the existing location. The best solution I could come up with was to delete the solution user options (.suo) file and reopen the solution. Keep in mind the .suo file is hidden so you may have to enable “show hidden files and folders” in order to remove it.

I imagine there's a better way to resolve this issue, so I'd be more than happy to receive other suggestions.

A Tale of Two Courses

With one week left in my final semester at UNF, I thought I'd point out a few things I realized this semester. For better or worse, UNF is a Java school and both courses I took this semester (COP3503 and COP4610) use Java to execute concepts covered in class. While some people seem to have negative opinions about using Java heavily in a CS curriculum, I've never really understood why. As I found out this semester, there are some very good reasons to be wary of courses that utilize Java.

On the first day of my Operating Systems (COP4610) course, the professor dusted off the overhead projector and pulled out his collection of yellowed paper notes. It was at that point I knew the course was going to be enjoyable. Instead of focusing on teaching with technology (PowerPoint, Eclipse, etc.), the class focused on the core concepts behind operating systems. Java was an afterthought, only used in homework assignments to show understanding. To me, this is exactly the way every course should be taught. The language used in the course should be irrelevant.

Completely opposite of COP4610, my Computer Science II (COP3503) class was horrific. When I first walked into class, the professor was speaking in absolutes. I'm fully aware that this is a personal pet peeve, but I despise the use of absolutes, especially when teaching. When students hear things like "you should always write a toString method for your objects" and "checked exceptions are wonderful" coming from a professor, they tend to believe it. While the professors understanding of Java seemed strong, he commonly stumbled over the material and failed to elaborate where necessary. A student once asked if it was possible to do something like the following in Java:

public static <T implements myInterface> void testMethod();

When the professor said that it was not, he failed to explain that when using generics in Java you can specify an interface where you would normally specific a class. For example:

public class test {
    public static void main(String[] args) {

    public static <T extends myInterface> void testMethod() {

interface myInterface {

I attribute the failure of this course to its reliance on the Java programming language. It was more like Learn Java in 21 Days and less like the intended OOP concepts and fundamentals.

EDIT: Removed professor names as they were irrelevant. The point of the story was to compare the effectiveness of two different approaches taken by professors teaching courses that relied on Java.

The professor who focused on the course material could've used any language to teach his course and it would've been just as effective.

The professor who focused on the Java language itself opened himself up to making silly syntax errors and other similar mistakes, not to mention some of the stuff he was teaching could be obsoleted in the next release of the language. If he would've focused more on the course material, he could've saved himself a lot of grief and reduced his chance of making mistakes.


My contract with OLM ran out for dedicated hosting, so the site has been down for the last few months. While OLM was great, I figured I'd go ahead and host the site myself in order to get some recent infrastructure style experience. At some point I'll migrate the couple of posts from the old site over to this blog, but for now it's a clean slate. Luckily, getting the hardware setup has been straightforward and right now I don't have any regrets.

On the other hand, creating the new website has opened my eyes to how convoluted website development can get. Easily stated, what I wanted was the simplest blog possible. That includes code, interaction, layout, etc. While I'm pretty happy with the results relating to interaction and layout, the code leaves something to be desired.

I don't know if this is one of those situations where you get to choose two and have no control over the third, but in order to achieve the interaction and layout I wanted I had to use the following components:

It could be argued that a website doesn't get much simpler than a mashup of existing components, but one thing unmistakably missing from that list is a blog engine. For the life of me, I couldn't find a single blog engine that allowed me to interact with a backing store without going through some half-baked user interface. For that reason, I rolled my own blogging engine and am fairly happy with the results.