Draconis Software Blog

My MacBook died

MacBookI’m very sad - the logic board on my MacBook died on me several days ago. I’m very glad I bought the AppleCare extended warranty, though, as it was almost exactly one year and one month since I bought it (and would have been one month out of warranty had I not purchased the extended plan).

It’s currently being repaired now, which means I’m stuck using an old machine until I get it back (an aging Windows Pentium 4 I had). It’s tough going back to Windows now that I’ve been used to the Mac for so long, but I’m still able to get work done. I’m using Gmail for my email (I had set it up to automatically download all of my work email to Gmail before my Mac died, so I have most of my important messages there), the e text editor, which is very similar to TextMate, WinSCP (to replace Cyberduck), and Putty for my terminal.

When the MacBook died, I was getting very nervous, as I had a deadline (today) for a client. I brought the laptop to the Apple Store nearest me, and they helped me get the documents I needed off the drive before sending it in for repair (they pulled out the drive and inserted it into another MacBook, as I had FileVault turned on - big mistake - where I was able to plug in my external USB hard disk and trasfer the docs I needed). That was way cool, and extremely helpful, as I wasn’t able to get it to boot into target mode.

So, long story short, I should have it back early next week. First problem I’ve had with it, and luckily I had all my important documents backed up (and I met my deadline!). So the process was about as painless as it could have been, and I should have it back early next week.

Update: I got my Macbook back from Apple.  It powered on and was working fine until I went to plugin the power adapter.  Turns out the light on the power adapter (green or orange) doesn’t light up, and it doesn’t charge my battery.  Very frustrating, so I brought it back to the Apple Store, which they are now repairing (again).

Sake - Rake for Your Whole System

Ruby's version of make, Rake, is an indispensable tool that all Rubyists should learn and use regularly. It's the perfect way to run all of those project-specific tasks like clearing the cache or removing stale session data.

Once you start using Rake, you'll probably find that you duplicate many of your tasks in all of your projects. It's not too much to copy often-used .rake files, but there is a better way. Sake (short for System-wide Rake) solves this. Once you install a Rake task into Sake's repository, it becomes available system-wide via the sake command.

Say you have a file named dbversion.rake, which finds the migration version of your database, as follows:

RUBY:
  1. namespace :db do
  2.   desc "Returns the current schema version"
  3.   task :version => :environment do
  4.     puts "Current version: " +
  5.       ActiveRecord::Migrator.current_version.to_s
  6.   end
  7. end

To install this system-wide, first install Sake by running gem install sake. Rubygems will download and install everything for you. Now you can install the Rake task into Sake by typing sake -i dbversion.rake. You can now run the db:version task inside any Rails app by typing sake db:version. Pretty neat, eh?

Sake has a few more tricks up its sleeve. You can view the rake tasks that are currently installed into Sake by running sake -T. It can also install tasks hosted on a remote web server by replacing the filename that appears after sake -i with the url. Check out the original blog post to read more.

Some other sites with info on Rake that I found interesting:

Upgraded Wordpress

Wordpress LogoWe've finally upgraded Wordpress (the engine powering this blog) to the latest version (2.1 from 2.0). We've been very happy with how it works thus far, though we've noticed that our trackbacks never seemed to be going out. It's been a nagging problem for some time now, and finally it's been fixed.

Part of the problem, really, is that we could receive trackbacks from other sites without problem, but sending them out never seemed to work. Adding the URLs to the Write Post page would never show them as being successfully sent, for some reason. And, to make matters worse, tracking down what the problem actually was didn't seem possible: Wordpress doesn't keep good logs, for some reason.

The lesson here is: when in doubt, upgrade. And perhaps have better logs. And never forget to back everything up.

Del.icio.us Linkroll

del.icio.us logoI've (finally) added a linkroll to the Draconis Software Blog, provided by del.icio.us. Over time, I've been adding interesting programming, science, lifehack, and other related links to my bookmarks, and thought I'd share them here. Hope you find them useful.

MacBook Happiness

There have been a lot of things discussed across the blogosphere regarding problems with the MacBook laptops, such as random shutdowns and case discoloration.  Well, I just wanted to point out that not everyone is having these problems: I bought my MacBook in May and have been using it on a daily basis since without a single problem.  I use it as my main desktop computer at work, and it's performed great (I'm even writing this on it now).

My MacBook has been the best all-around laptop I've yet owned, and based on my experiences, I'd highly recommend it to anyone considering buying a new laptop.  My next purchase will probably be a Mac Mini towards the end of the year.

Happy Fourth!

WeberI love the Fourth of July. One of my favorite things is BBQ, and nothing beats a hot grill on a warm Fourth. If I couldn't be in IT, I think I'd be a professional BBQ griller (maybe for a restaurant). One of the cookbooks kicking around here, called Weber's Big Book of Grilling, has a fantastic article in it, and a great lesson for all you entrepreneurs and salespeople out there. Here's an excerpt from "A Firehouse Turkey Tale" (p. 274):

Firefighters typically worked long shifts for 10 straight days, then had several days off. In this downtime, many picked up odd jobs to supplement their income. So I would drive up to a firehouse, remove a shiny, fire-engine red Weber charcoal kettle grill from my car, wheel it up to the firehouse, and go find whoever was in charge (if they hadn't already appeared to chase me off the property). After finding the usually suspicious watch commander, I would volunteer to cook a turkey for the crew and leave the grill behind for their use. I was generally regarded as insane, but the prospect of a tasty meal usually earned me the green light. After all, if there were any unintended pyrotechnics, they could handle it.

As I lit the charcoal, I'd tell the firefighters stories about folks who didn't follow lighting instructions and some of the crazy things that could happen. I'd invariable hear about someone in their district who had used gasoline or another forbidden fire starter and unintentionally torched a lawn or deck.

While the turkey was cooking, someone would ask why Weber had sent me out to cook a turkey and give away a grill. I'd explain that we needed demonstrators who could set up a Weber charcoal grill for Indirect cooking, safely light a fire, prepare a turkey for roasting, and then talk about the grill while the turkey was cooking. Since they had just witnessed a guy show up from nowhere and do all of this, they know it was pretty much a no-brainer. When I explained that they could earn a daily fee doing it, three or four firefighters usually applied for the job right on the spot.

The only thing that ever sidelined my recruiting efforts was a fire alarm. One such time I was in Des Moines, Iowa, chatting up a firefighter who was a natural for the job. He could tell a story, he was the firehouse cook, and he needed some culinary help with his job. His name was Stewart Leathers, but his nickname was Shoe-Leather, obviously a jab at his firehouse steaks, which he cooked in a cast-iron skillet on the stove. I was just at the point of recruiting Stu when the bells went off and the men – Stu included – scrambled into their gear, jumped onto fire trucks, and roared off.

About two hours later, they returned, grinning and … mischievous. Evidently they had just answered a call at a burning horse barn. Fortunately, no one was injured, but one of the firefighters had picked up a horribly scorched saddle as a trophy. Now, after washing off the smoke, they assembled near my grill to present it to Shoe-Leather. There was a raucous speech about the saddle being more edible than Stu's firehouse cuisine and everyone laughed. Bit it lit a fire under poor Stu.

The turkey was ready just as the "ceremony" ended. Everyone raved about how juicy and flavorful it was, and quickly reduced the bird to bones. No one asked more questions about how to grill a turkey than Stu. Before my firehouse visit ended, Stu and two other firefighters had signed up to demonstrate our grills.

One of the best parts about being an entrepreneur is the opportunity to be creative in your job. "Cooking" up new ideas to reach folks who can solve problems using your products is the whole point of going into business, and one of the things I’m always on the watch for. Have a great Fourth!

Happy Father’s Day

To all you father's out there, today is the day to kick back, relax, and have your kids do the yard work.  And be sure to check out Engadget's list of Father’s Day gifts, just in case you forgot....