• Name

    I read an article this morning about [falsehoods programmers believe about names](http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/) (and probably the rest of you too). Reminds me of this:

  • Fixing Calendar Colors on iOS

    One if the major bugs that has always existed in iOS, ever since 2.0 was that calendars that are not synced via MobileMe or iTunes will have unpredictable colors. This usually means that [your colors won't match iCal](http://www.google.com/search?q=iphone+calendar+colors). There are a [lot](http://www.touchtip.com/iphone-and-ipod-touch/quick-tip-calendar-color-fix-for-iphone-and-ipod-touch/) [of](http://www.google.com/support/forum/p/Google+Mobile/thread?tid=3d8377b8eb791bfc&hl=en) [bad](http://nuevasync.blogspot.com/2009/01/iphone-calendar-color-selection.html) [solutions](http://maticek.wordpress.com/2008/08/22/trying-to-edit-calendar-colors-for-iphone-20x-os/) and a few that are [semi-decent](http://www.macosxhints.com/article.php?story=20080710143428536). Let me start off by saying that if you have MobileMe, your calendars will match iCal. If you have other calendars (Subscribed, CalDav or Exchange) set up both in iOS Calendar and iCal the colors likely don't match. It's these calendars we're talking about. I'm going to expand on that last one to make it slightly easier. Sadly, this is still a gross hack. 1. Disable the calendar syncing on all of your accounts (don't delete them, just set the calendar to Off) 2. Find some [random calendars on Google](http://www.google.com/search?q=filetype%3Aics) 3. Add several until you get the color you want, then delete the most recently added 4. Enable the calendar that you want to be that color 5. Rinse, repeat. I've filed [radar 8087720](rdar://8087720) about the lack of color control for calendars

  • Have an Airport Express and Need an Extra Power Adapter for Your iOS Device?

    I have three USB power adapters between my wife's iPhone, my iPhone and my iPad, and one at work. The ones we have at home are in the bedroom so that we can both have our phones nearby, in case they ring, and because I often read late into the night with my iPad and want to charge it for the morning. Unfortunately I am often in the living room and need some quick power. Fortunately, I recently set up an Airport Express connected to my wife's Bose SoundDock that is conveniently located next to my favorite chair. The Airport Express comes with a USB port that was intended for sharing USB printers or hard disks over the air. Since I have a network printer and a file server (along with three more Airports) in other rooms it goes unused here. Until I discovered that I can just plug in an extra 30-pin USB cable (I seem to have no shortage of those...) and now I don't have to cart around power adapters. Airport iPhone Power.png

  • I have a new favorite episode of Mythbusters

    From [How I Do It](http://fora.tv/2010/05/22/Adam_Savage_Presents_Problem_Solving_How_I_Do_It#Adam_Savage_Banned_MythBusters_Episode_on_Cannibal_Mouse).

  • Being the Best Is Hard Work

    From [Art of Manliness](http://bit.ly/9tUow6) > As you listen to the finished art of the master genius, is the days and nights of consecrated toil, foregoing, not only dissipation, but even innocent pleasures others take as their natural right, that the artist might master and keep the mastery of the technique of his art. What I do didn't come naturally. I spent 15-20 hours a day at a UNIX terminal for 10 years. I did then and still do *choose* to spend my time this way.

  • Steve Jobs' Thoughts on Flash

    > Adobe has been painfully slow to adopt enhancements to Apple's platforms. For example, although Mac OS X has been shipping for almost 10 years now, Adobe just adopted it fully (Cocoa) two weeks ago when they shipped CS5. Ouch.

  • Growing the Capacity of a ZFS Mirror

    When I set up my [OpenSolaris](http://www.opensolaris.org) server, in order to save on money I had to skimp a little on the disks. I'm only at about 33% capacity right now, but once I pass the 50% mark it will be a good idea to start shopping around for larger disks. By then nice cheap 2TB or 3TB drives should be available. But there's no reason I can't get prepared now! The process for growing a zpool is fairly straightforward. 1. Attach new devices 2. Wait for resilver 3. Detach old devices 4. Export/import pool (or reboot if operating on the root pool) First, let's get set up by creating some file vdevs for testing. Two 128MB to represent the old drives and two 256MB representing the new ones. # mkfile 128m /vdev/v0 # mkfile 128m /vdev/v1 # mkfile 256m /vdev/v0 # mkfile 256m /vdev/v1 # ls -l /vdev -rw------- 1 root root 134217728 Apr 3 06:16 /vdev/v0 -rw------- 1 root root 134217728 Apr 3 06:17 /vdev/v1 -rw------- 1 root root 268435456 Apr 3 06:21 /vdev/x0 -rw------- 1 root root 268435456 Apr 3 06:21 /vdev/x1 Now I'll create my play area, and check the size. # zpool create play mirror /vdev/v0 /vdev/v1 # zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT play 123M 74.5K 123M 0% ONLINE - Okay, 123MB. Next I'll attach one of my larger vdevs and wait for it to resilver. Since I'm using empty files as stand-ins for disks they'll resilver almost instantly. **MAKE SURE YOU DO NOT DETACH A DISK BEFORE THE NEW DISK IS DONE RESILVERING**. You *will* destroy your data. # zpool attach play /vdev/v0 /vdev/x0 # zpool detach play /vdev/v0 # zpool attach play /vdev/v1 /vdev/x1 # zpool detach play /vdev/v1 With the new devices attached my pool still doesn't look any different. # zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT play 123M 74.5K 123M 0% ONLINE - Until I re-import the pool. # zpool export play # zpool import -d /vdev play # zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT play 251M 91K 251M 0% ONLINE - # Obviously you will need down time to perform this operation since you need to fully export the pool (or reboot the system if operating on the root pool).

  • The Great Digital Disaster of 2010

    #### The Beginning of a Nightmare One week ago my hard disk failed in my laptop, which is my primary computer. It wasn't a big deal to me at the time because I knew it was going to fail. I had noticed the signs that I know full well indicate imminent disk failure. But without a full failure I wouldn't be able to get it warranty repaired. So I waited. Until one week ago. Apple didn't have the right model HDD in stock, since I had ordered the largest size available at the time. Not a big deal, I would just make due for a couple of days. My first mistake was that I had ignored my [Time Machine](http://www.apple.com/macosx/what-is-macosx/time-machine.html) errors so when it failed my most recent backup was 12 days old. Not too bad. The only thing I lost was a few notes and my completed tasks. What I didn't know was that my Time Machine backup was corrupted. Not by a lot, and I didn't know it at first. After doing a full system restore the only two symptoms I had were that 1) iChat would not save or remember my passwords, and 2) when attempting to view some (but not all) keychain items I would get an error message stating **"Access to this item is restricted"**. This drove me nuts for a couple of days because there seems to be little to no help on the Internet about this. What was even more maddening was that every other computer I have did not exhibit the problem. I tried backing up and restoring my keychain database every which way I could and nothing helped. A good keychain file on one computer was useless on my laptop. Now, I like Keychain quite a lot. But I began to lose faith in the entire system. If I couldn't trust Keychain to keep my passwords safe then it was worthless to use as a password repository. But I still needed my applications to work. And I was beginning to worry about the loss of my 836 stored passwords. I finally found [a discussion on Apple's mailing list](http://lists.apple.com/archives/Apple-cdsa/2009/Nov/msg00014.html) with someone having the same problem and thanks to [Ken McLeod](http://lists.apple.com/archives/Apple-cdsa/2009/Nov/msg00015.html) an accurate description of the problem. #### Codesigning Codesigning, for the uninitiated, is a way for a software publisher to ensure that an application has not been tampered with (either by malware or bit rot). I checked Keychain Access and sure enough, it was damaged. $ codesign -vvv /Applications/Utilities/Keychain\ Access.app /Applications/Utilities/Keychain Access.app: code or signature modified It may seem odd that finding data corruption is cause for rejoice, but I began to see the light at the end of the tunnel. I copied Keychain Access from another computer and checked it again. $ codesign -vvv /Applications/Utilities/Keychain\ Access.app /Applications/Utilities/Keychain Access.app: valid on disk /Applications/Utilities/Keychain Access.app: satisfies its Designated Requirement Bingo. I once again had access to all of my keychain items but iChat still kept prompting me for my passwords. I checked iChat itself but it was valid. Now, if you don't know, iChat is really just a front end to the iChatAgent application which does all of the real work. It's built like this so that the menu bar status can be online while iChat itself is not running. I already *did* know this so that's where I checked next and sure enough it was corrupted. Again copying from a known good source fixed the problem and iChat would log in without interaction. #### The Nightmare Lands I was in the middle of doing a system install and I had been working on this in my idle time as my coworkers racked and cabled the system. I needed to reboot to enable my serial port driver so I could configure the device. It was at this point that my hard disk died. Again. After the reboot, instead of seeing the Apple logo I got a flashing question mark. So close and yet so far, I was stunned. I had to finish the system configuration with a coworker's computer. When I got back to my desk I ran Disk Utility which told me that my disk was too damaged to repair and to re-initialize the disk. Knowing there was data corruption I blamed this on Time Machine and this time did a fresh install and only restored my home directory. This took all night to get back to a usable state so I could actually *work* the next day. In the morning I started to notice it acting very odd. Applications were very slow to launch but would otherwise operate fine. Switching from one application to another would sometimes freeze my entire computer for about 20-40 seconds. It was *chronic*, and essentially unusable. Attempting repair with Disk Utility again reported that it was too far gone for fixing. #### The Nightmare Closes *Another* trip to the Apple Store. *Another* wasted day restoring my system. This time though, they did have the drive in stock, and they gave me priority in the repair queue so I had it back in about 40 minutes. After reinstalling the OS, all of my apps and restoring my data everything seems to be back in order now.

  • Fanboy (Or Why I Hate Flash)

    Recently in discussing Flash on the iPad, I was told to admit that I'm an Apple fanboy. I hate to disappoint you but to "admit" such a thing would be lying. If anything I'm a **UNIX** fanboy. I'm not a fan of Apple's draconian App Store policies or many of their PR policies. I use a Mac laptop because it's the only decent UNIX laptop. Not because it's an Apple product. And i'm particularly anti-Flash. It's a fact that Flash either does not run, or runs very poorly on all UNIX platforms. I have never liked Flash. HTML5 and MP4 however *do* work very well on my Solaris 10 workstation. And on Linux. And on BSD. And yes, on a Mac. It's also a fact that Flash is responsible for the most browser crashes on the Mac (and other UNIX variants as well). If you made a car with a hood ornament that was the leading cause of auto accidents and the hood ornament maker could fix it by changing the shape or material but refused to, all the while you are being blamed for those accidents, what would you do? It seems pretty obvious. You get rid of the damned hood ornament. But even if Apple *did* want to include Flash, the iPad is 64-bit, and Adobe refuses to make a 64-bit version of flash. It also runs on Apple's A4 chip, which Flash does not run on. Will Adobe bother to port it? I doubt it. The code in Flash is probably so bad that it would be nearly impossible without a complete rewrite. I'm even pretty ecstatic about Silverlight. Not because I like it, but because it weakens Flash. Flash and Silverlight will duke it out, injuring each other, meanwhile HTML5 will come out the winner. Which makes us all winners. 

  • Don't Blink or You'll Miss It

    The [Drake Equation](http://en.wikipedia.org/wiki/Drake_equation) notwithstanding, the folks over at **SETI** have realized it's [all a big waste of time](http://www.guardian.co.uk/science/2010/jan/27/aliens-cant-hear-us-astronomer). Let's assume for the moment that extra terrestrial intelligent life exists. According to popular belief the earth around 10 billion of years old and the universe billions of years older still. We've been broadcasting for just under **100 years**, or roughly **1/100,000,000th** of the earth's existence. Comparatively, if *I* were the universe, at my current age that would mean that intelligent life living on (or in) me would have been broadcasting for about the past 10 seconds. And we're about to stop. Analog TV broadcasts are already dead in the U.S. The rest of the civilized world will follow suit soon enough. We're turning to digital wired or low powered wireless signals. Those signals are increasingly becoming encrypted to top it all off. Any encryption algorithm worth it's salt looks like random meaningless data. So even if we are heard, it will be indistinguishable from noise. I'm not saying aliens don't exist. Maybe the do, maybe they don't. But we'll never make contact.