Thursday, February 21, 2013

The Still Handy C Language Cheat Sheet

I got this in college to deal with writing C game code on a Solaris box using something called World ToolKit.

How I Couldn't Recover Deleted Videos & an iMovie Project from iPhone Backups

I finally downloaded iMovie and started editing some video on my phone. I usually don't have time to sit down at my iMac for an editing session, but I do usually want to string a few clips together with titles. iMovie iOS seems to work well for that.
There is, however, a catch. Somehow I got the notion that iMovie copied clips into itself, not used them directly from the Photo roll. When I went to export to the Photo roll, I was out of space on my 16 GB iPhone. So I deleted the source video clips and boom, iMovie could no longer find the videos, prompting this:
Since the first iPhone in 2007, I've never accidentally deleted a video or photo. I've also been meticulous about backups. Since iCloud backups and Photo Stream in iOS 5, I am syncing photos and videos manually less and less frequently to the iMac. When I tweeted the above, I had no idea I would totally fail to get both the videos and iMovie project back together. Here's what happened.
Plan A
The plan seems simple, restore from backup right? iCloud makes this super easy. Here's what I had to work with:
  • iPhone 5 with iMovie project but no videos
  • iCloud backup with videos but no iMovie project
If iOS had Time Machine, or even Trash of some kind, this would have been really simple and I hope iOS 7 has something more granular than full device restore. Heck, even if videos were added to Photo Stream I wouldn't have had a problem. But we aren't there yet. I thought I'd:
  1. Restore iCloud backup onto an iPhone 4
  2. Email video clips to myself to get them onto iPhone 5
  3. Sync clips to iMac just in case something else goes wrong
  4. Finished exported from iMovie
This immediately goes wrong when I restored an iPhone 5 backup onto the iPhone 4.
iOS Won't Restore Photos & Videos from an iPhone 5 backup to iPhone 4
I've done a decent number of iCloud restores to move devices around amongst family members. It works great, I've never seen it fail. So at first when I restored the iPhone 4 from iPhone 5 and there were no videos, I thought it was either just taking a while to copy all the data back or for the first time it had simply failed.
So what do you in tech do if something doesn't work the first time? Like Sisyphus you do it again, and I did. Another round through restoring the device to factory and restoring from iCloud ended with the same result. I babysat it this time, and saw an alert like some items could not be restored blah blah blah. I was too annoyed to record the entire message and had sussed out what was happening. I had thought this might be a possibility because photos and videos from iPhone 5 are much higher quality, maybe even beyond the performance capabilities of the hardware. So I had to try this from a different angle.
Plan B
The only way to get the videos back was to restore from iCloud to the iPhone 5:
  1. Backup iPhone 5 using iTunes to preserve iMovie project
  2. Restore iPhone 5 from iCloud to get the videos back
  3. Extract the videos from iCloud backup
  4. Restore iPhone 5 to iTunes backup
  5. Deposit videos on iPhone 5's photo roll
  6. Hope the iMovie project isn't busted
I only got to Step 3 before blowing it. On Step 4, iTunes offers to backup the phone before restoring it. Seems like a perfectly smart and safe decision to make with one crucial exception: this backup overwrote my good backup with the iMovie project. I hesitated on the checkbox to backup before restore, knowing I shouldn't check it, but wanting the safety net in case something went wrong.
I knew I had seen iTunes offer me the choice to restore from multiple backups of the same device before, so I trusted it would be so here. It wasn't, iTunes overwrote it's last backup ending my dreams of recovering my iMovie project.
Post-Mortem
  • I could have avoided losing the iMovie project if I had added Step 0 to Plan B and synced the project to the iMac using iTunes.
  • I could have previously imported the videos to the iMac using iPhoto and avoid either Plan A or Plan B.
  • A friend suggested undelete software. I did not consider that option until after I overwrote the iPhone in Plan B.
iCloud backups are great and probably save most people from catastrophic mistakes, but I really look forward to a more granular accidental deletion recovery mechanism, hopefully in iOS 7. Actually surprised now that I'm thinking about it that one of the original Mac's great innovations, Trash, doesn't exist in some form on iOS.

Wednesday, February 20, 2013

On Seeing Hard R 80's Movie "Lifeforce" As A Pre-Teen & the Blu-ray Release


"Lifeforce PosterLifeforce" was released June 21, 1985 in the USA. I was 10 years old that summer. My family went to the movies nearly every week, but we skipped that one. I can't be sure if it was VHS or HBO, but one Saturday my dad puts on "Lifeforce". I was 10, 11, or at the latest 12. I'll never forget the craziness that showed up on the Zenith tube TV when that flick started.

If you know "Lifeforce", you might think: "That is about as hard R rated as just about anything in the 80s, what the hell where your parents doing letting you watch that?!?"
That is my dad. My mom was always asleep when he put this kind of stuff on. I must conclude that he just didn't care about the ratings. I've asked him several times, and he just laughs. I saw "Aliens" in 1986 at the Movie City 5 theater in Woodbridge, NJ. I was 11, my brother was 8.5! I remember waiting in line and being in the theater more clearly than I usually remember today.

"Lifeforce" formed an equally monumental memory. I believe it was the first time I had seen a woman completely nude. When Mathilda May appears on screen, I remember looking at my dad shocked like I had just seen one of the secrets of the universe. He made mock big eyes, smiled, and we just kept on watching! I only now realize that she is only 10 years older than me. She was most likely 19 when they shot the film. If you told pre-teen me that she was still a teen, my puddle of jelly brain would have imploded.

I was vividly reminded of this because Roger Ebert has a long review, an essay really, of the film because it is being released on Blu-ray April 30, 2013. If none of that persuades you to take a gander at this hidden gem, then perhaps the presence of Sir Patrick Stewart in the cast will.

By the way dad, I'm glad you ignored the ratings. I love you! I'll try to closely follow your movie showing examples, but I don't know if I will let my oldest son watch this pre-teen. It will be on his must see list sooner rather than later…

Tuesday, February 19, 2013

Getting rid of OS X Finder Open With duplicates

This has been an annoyance for a while, but I hadn't spent the time to figure it out. Fortunately know I don't have to since John Gruber posted a link to this tip.

Unfortunately it looks like Finder hung and won't relaunch, so I'm going to have to log out, or reboot. YMMV.

Sunday, February 10, 2013

You're Drunk Mac App Store, Go Home


Mac App Store Hostname

*burp*

Drunk Mac App Store

I don't even, how can this possibly happen?!? 

Saturday, February 09, 2013

Latest Adobe Flash Emergency Patch Needed More Cooking. I'm Not Waiting Around.

Adobe issued an emergency Flash update for actively exploited vulnerabilities on OS X and Windows. Apple has blocked vulnerable versions of Flash for OS X and won't let you use Flash until you updated to the version at the time of this writing, 11.5.502.149.

I installed that update tonight, and at least for me, it's obvious the patch was rushed and needed more time in the oven.

For the first time in many versions, Flash crashed.

Adobe Flash Player Crash

I saw John Gruber's post on the emergency Flash patch the other day too and remembered he linked to his November 2010 post about going Flash-Free. He says it's been working out pretty well for him in the 2+ years since.

So that's it, I'm done with Flash on the home iMac. If I didn't have the whole Creative Suite installed at work, I'd dump Flash there to.

A Corollary to "Adding More Developers to a Late Project Only Makes it Later"

In The Mythical Man-Month, Fred Brooks found that adding more programmers to a late project only made it later:

The equation is something like this:

If time-spent-adding-programmer > work-new-programmer-produces then 
    project-ships-later

Recently occurred to me there is a corollary to the idea I hadn't previously considered:

If time-spent-code-reviewing-programmer > time-another-programmer-would have-fixed-issue then
    project-ships-later

In plain English, if the time spent by a programmer producing buggy code plus time spent by other programmers in code reviews is greater than the time other team members could fix said bugs, your project ships later. 

It seems like the right corrective action is to fire the underperforming developer for the project to not fall further behind. 

Shorter version: keeping a bad programmer on a project always makes it later. 

Friday, February 08, 2013

The Software Was Installed Definitely

You never can predict just how many ways there are to poorly word a dialog box.

Epson Download Navigator

Discredit: Epson Download Navigator 1.5.1

2 iMacs, 1 Desktop: Using Target Display Mode

The Mac on the left is a build server, and now my second display!

Best part is that using 2 iMacs gets both screens level.

To put any Mac in Target Display Mode, type Command-F2 on the Mac you want to use as a display:

Thursday, February 07, 2013

Developers Don't Ever Do This on iOS to Hint Interface Rotation

Just open your content in the orientation you support. This was more confusing then showing the content in landscape when I was holding the iPad portrait.