2007-11-27

PoMaDiDe - Poor Man's Disk Defragmentation

As a long time user of Diskeeper, which I've always recommended as a product, I've never had to think about disk defragmentation and maintenance.

However when tweaking a new machine that I'll be using for a while at a friend's company, I decided to just automate the new (for XP), CLI disk defragmenter defrag.exe.

I simply setup a scheduled task to run daily at 4am.  It executes the following batch file:

DailyDiskDefrag.bat

@echo off
date /t >> %LogPath%\Misc\DailyDiskDefrag.log
time /t >> %LogPath%\Misc\DailyDiskDefrag.log
C:\WINDOWS\system32\defrag.exe c: -v >> %LogPath%\Misc\DailyDiskDefrag.log 2>&1

I have a system variable set for LogPath to "C:\Windows\system32\LogFiles", so this will append to a file in the 'Misc' directory called 'DailyDiskDefrag.log'.  For those of you windows n00bs that never had to experience the pain joy of old skool batch programming, '2>&1' just redirects stderr back to stdout.

I'm sure there is a much cooler way to do this in PowerShell, sadly I'm not l33t enough at this stage of my life to pull that off.  Perhaps one day I'll look into all this PowerShell goodness.

Also, FWIW, I changed the default log location for the Scheduled Tasks service using this post from the mvps.org site.

2007-11-20

Me & Mop

So earlier this month I attended BarCampLA4, which was a blast.  If you haven't attended a BarCamp event and like any two of the following: tech, nerds, learning, sharing, or free beer - then you should definitely make it out to the next BarCamp in your area.

cjl_and_mop-BarCampLA4_smallFor this particular BarCamp we had a fantastic chap by the name of Mr. Dave Bullock of eecue.com fame snapping portraits of everyone there.  He was even kind enough to play along and take this American Gothic-esque photo of me and said mop, that by the way wreaked of death.

Anyway, I think it should be obvious that I've found my new avatar of choice until the next picture is snapped of me being a jackass.

Hitchens: On the Limits of Self-Improvement

I just came across a great read in Vanity Fair from Christopher Hitchens, a proper British bloke.  If you've got 10 minutes, give parts I & II a read - if you're reading this blog, then he is sure to give you a jolly laugh at least a handful of times.

My favorite bit from Part I:

Viewed from the front when clothed, the subject resembles a burst horsehair sofa cushion or (in the opinion of one of us) a condom hastily stuffed with an old sock.

And from Part II:

But gallows humor is inseparable from dentistry: at one point I heard the good doctor say, as he plowed through the layers of plaque and tartar, “Good news. I’ve found some of your teeth.”