Cult of the iPhone

Friday, November 30th, 2007

After watching the cult of the iPhone grow this year, I finally drank the Kool Aid today and reestablished my alpha geekdom. A new iPod seemed like a good new job reward, and the additional capabilities of the phone were just too slick to pass up.

Even with the holiday rush starting to pick up at the mall, the Apple store was still pretty efficient in ringing up quick iPod and iPhone purchases. As soon as you open the phone, it pops up graphics and instructions to dock and use iTunes to set it up and sign up or AT&T service, starting at $70 or so once you account for the conveniently omitted [cell phone tax]. Activation and transfer of my number from Verizon took just a few hours, though.

In the meantime, I loaded the phone up with my iTunes library (it just about fits) and photos. I’m a little disappointed the photo sync doesn’t support nested folders, skips over the whole folder when parts of it won’t fit, and recognizes only iPhoto albums instead of rolls. With it’s web capabilities, though, I can always just show people my live gallery.

The interface is amazing slick, and it’s very cool to have photos of all my contacts, or be able to snap a quick photo with the phone if I don’t. One other little thing that impressed me: stick the phone back in it’s dock while a song is playing, and it smoothly fades out.

Frak FileVault

Friday, November 30th, 2007

After finding that even the upgraded version of Mac OS X’s FileVault hard disk encryption was incompatible with its Time Machine backup, I finally dumped it today. In the last six months, it’s given my MacBook multiple aneurysms, forced me to buy an external drive to provide temporary space while recovering it, and sent me scrambling to resurrect my files.

What I finally realized is that the only things I needed to encrypt were tax returns and credit reports with whole or partial social security numbers. I included the partial ones, because even though most credit agencies only display the last 4 digits, many of the accounts use the same number and display everything but the last 4. A good way to hunt down these files is to search file contents for the first 5 and last 4 digits, with and without dashes.

These files are easily stored in a smaller encrypted disk image created using Disk Utility, and by creating it as a sparsebundle, it’ll grow and shrink as needed. When TrueCrypt offers a Mac version, I’ll probably switch to it so the files are also directly accessible from non-Mac backup machines.

From Stripes to Spots

Tuesday, November 27th, 2007

I recently upgraded my MacBook from OS X 10.4 Tiger to 10.5 Leopard and have been mostly pleased with the upgrade. The upgrade itself was simple enough, and most of the changes are subtle enhancements. A few of my favorites are the todo list in Mail, and Mail’s new ability to recognize dates in messages and create iCal appointments from them. One of the neater graphical upgrades is PhotoBooth and iChat’s new option to show you against any background.

Of course, I did have bigger reasons for upgrading: Time Machine and FileVault. Though I’m pretty handy with rsync, it’s not as clean - or reliable - as a built-in solution. Time Machine also offers a very simple interface, but the two-click setup soon brought up a FileVault issue. It Machine can’t backup older FileVault drives, so I needed to “turn FileVault off and then back on”. Or, as one would say outside of the Steve Jobs Reality Distortion Field, decrypt and re-encrypt over 30GB of data. Naturally, this takes a good bit of extra space, and more than I had, so it took some shuffling of files to an external drive for it to work.

One last oddity after that was a pause while “backing up home directory” when I logged out or restarted, which makes sense if they’re doing something based on the encrypted image once it’s unmounted. Going back in Time Machine, it turns out the only thing it exposes is the single, encrypted image file of the home directory - no individual files! Needless to say, that’s not very useful, and plenty of other people are making the same complaint. What good are slick methods of protecting and backing up your data when they won’t work together?!

Hidden Job Hunting Costs

Tuesday, November 27th, 2007

I spent a lot of time on my cell phone while job hunting, and figured I’d get hit with a big bill, but the $300 email from Verizon was still a shock! You’d think after 500 overage minutes, they’d cut you a deal, but every single one is still $0.45.

After a bit of horse trading, I got them to refund 50% of the overage by signing up for the next highest plan (temporarily, of course). So if you’re thinking about looking for a job, consider bumping up your cell phone plan or getting an unlimited VOIP line.

Macbook Hide and Seek

Sunday, September 16th, 2007

For the second time in a week; my Macbook up and decided to hide all my files. After spending most of last Sunday repairing its first aneurysm, I thought I had narrowly made it out of the woods. Then, on an otherwise mellow Saturday afternoon, it rebooted for a system update and undid all my work!

Fortunately, the data wasn’t gone, just trapped once again it a hidden, encrypted sparseimage file FileVault that was no longer associated with any of the accounts on the machine. Not wanting to take any more chances, I waited until the next morning to pick up an external drive to make a full copy of the file before doing anything else. (The intervening hours also included Bob’s bachelor party and a nice Sunday-morning hangover.) (more…)

Macbook Aneurysm

Saturday, September 8th, 2007

My Macbook had a major aneurysm this morning; after locking up, it refused to log me back in, giving an error message of “You are unable to log in to the user account [name] at this time”. One discussion suggested a simple password reset, another more pessimistically cited a reinstall of OS X. Since the password reset didn’t work, I suspected corruption in my FileVault-encrypted hard drive. Unfortunately, the only instructions to repair it required another user account on the machine, and I found no way to create one from the install/repair disk. (more…)

My Cat Has a Facebook Profile

Thursday, September 6th, 2007

At the urging of a few other pet-owning friends, I joined Facebook so I could make a profile for Meadow. Of course, I also had to make one for myself, and I was impressed with the Facebook application. After creating a MySpace profile for the King of Prussia Ski Club last year, I quickly realized what a mess that site was.

Facebook definitely seems geared to a more mature audience, and the site is pretty solid with plenty of AJAXy goodness. It’s also amazing to see how quickly they’ve amassed over 3500 applications based on their platform, including a complete profile system for your pets (they get to have friends, too, and people can “stroke” them). Poke your friends, stoke their pets - it’s easy to see how it can get addictive. Meadow already has more friends than I do; cute girls get all the attention :)

social-network-lolcat.png

(Image created at the ICanHasCheezBurger Factory.)

iPod Mania

Wednesday, September 5th, 2007

Steve Jobs’ marketing prowess is amazing; 6 of the top 10 stories on Digg right now are about his iPod announcements today. For those like me who are playing catch up: the iPhone price fell $200 dollars, and there are new models of the “classic” and nano iPods, plus an iPhone-like iPod touch. Also, in a sign of the times, the base 80 GB iPod classic now offers as much capacity as any one of my full blown computers!

Feeding the MacBook More Memory

Thursday, August 16th, 2007

I’ve been seeing the Mac’s “spinning beach ball of death” (as Merle coined the animated busy icon) a lot lately. My MacBook is about a year old, and upgrading the 1 GB RAM seemed like the answer.

Watching the Activity Monitor and reading some web pages on the subject led me a bit astray: my memory was mostly in use, though a good chuck was blue “inactive” memory, where OS X stores extra data instead of having to go back to the disk. In practice, switching between a few big tasks (growing Firefox session, Picasa running under CrossOver emulation) was overusing it.

A Macworld article on Upgrading RAM finally filled in the missing piece: watching the page in/out counter for pages being written out to disk. Mine was ticking off at a good clip, which sealed the case for upgrading to 2 GB of RAM. It was easy enough to install, and I’ve yet to encounter the beach ball after 5 days of regular use. In fact, my “inactive” memory has swelled to 1.2 GB, leaving about 150 MB truly free. Not bad for under $100.

Log4php Example

Saturday, August 4th, 2007

As an engineer turned software developer, I’m slowly moving from the world of printf debugging to proper logging. We use log4net at work, and having harnessed a bit of its power, log4php seemed like a natural fit for some debug logging in my migration script. Unfortunately, their configuration format is different and not nearly as well documented.

After much hunting, I finally spent $5 on a single PDF edition of some Canadian PHP magazine that had an article on log4php. Those examples didn’t quite do what I originally wanted, but got me on another path to success. Here’s my configuration:

log4php.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<log4php:configuration
  xmlns:log4php="http://www.vxr.it/log4php/"
  threshold="all" debug="true">
 <appender name="default" class="LoggerAppenderEcho">
  <layout class="LoggerLayoutHtml" />
 </appender>
 <root>
  <level value="DEBUG" />
  <appender_ref ref="default" />
 </root>
</log4php:configuration>

bootstrap.inc (or some other high-level include file):

define("LOG4PHP_CONFIGURATION",
 "/full/path/log4php.xml");
define('LOG4PHP_CONFIGURATOR_CLASS',
 '/full/path/log4php/xml/LoggerDOMConfigurator');

And finally, in the actual code class:

require_once('/full/path/log4php/LoggerManager.php');

class ItemAddFromServer extends ItemAddPlugin {

 var $log;

 function ItemAddFromServer() {
   $this->log =& LoggerManager::getLogger('ItemAddFromServer');
 }

 function DoSomething() {
   $this->log->debug('DoSomething');
 }

}

That gives you an HTML table display of your log, which interrupts the flow of your application, but gives you a convenient way to immediately view the results.