Archive for the ‘Lessons Learned’ Category


My main machine at home has been completely owned by spyware. I feel like such a moron for letting it happen, but what’s done is done. After fighting it on every front imaginable (yes, I tried that; and that too… yeah yeah, and all of those!) and calling in my paternal IT support; all to no avail, I backed up what little data was on my Apps drive (seperate HDDs for data and apps is a Good Thing!) and whiped it clean.

Now the fun part — installing Ubuntu, the plethora of applications I need and XPpro under VMWare server. Hopefully VMWare server will give enough juice to XP to run Photoshop, as that’s the only reason I need Windows these days. It’s at this point that I’m oh-so-happy I chose Internode as my ISP; their Ubuntu mirror server allows me to apt-get install everything I need at lightning pace without affecting my bandwidth quota.

Windows will never again have access to my master boot record. Move on Windows, you’re no longer welcome here.


Find Duplicate Rows in Database Table

This little chunk of SQL saved my ass today after I found out that most of the 223 students who had been automatically enrolled in an Activity Management system I just deployed were actually enrolled twice because the student list provided by another system was corrupt:

SELECT * FROM table_name WHERE field_name NOT IN (SELECT DISTINCT(field_name) FROM table_name)

Ideally the field in question would be UNIQUE, but in this scenario that is not the case because the field was a student number and this system supports multiple courses — meaning a single student number is allowed to exist multiple times so long as each instance is tied to a different course. New constraints and checks have been put in place to ensure this can’t happen again, but regardless; lesson learned 😉