Updating my 11-inch Late 2010 MacBook Air

After two good months on my 15″ Retina MBP yesterday I thought it was a good time to take my 4GB / 120GB SSD based Intel Core 2 Duo Late 2010 11-inch MacBook Air and make it modern again.  This involved first mostly getting videos off of the SSD in order to get to 20GB free so as to then be able to download Mountain Lion and then install the latest Xcode.

The spring cleaning of offloading to a thumb drive took me from 16GB to eventually yielding 20GB free and then I started what amounted to a simple 2 hour (mostly unattended) update which started with a 4.44GB download of Mountain Lion (over Wifi and having the just recently released 10.8.3 – besting my rMBP).   After that was painlessly installed I was pleasantly surprised to now be in possession of a 27GB free SSD.  Magic!

Next Xcode.  Clocking in at a mere 1.65GB makes the days of 4GB+ Xcode look pathetically ancient.

After no time I was left with Xcode 4.6.1 (4H512) and a machine I had all but forgotten about.

Although my rMBP is the best machine I have ever owned I had forgotten how convenient and unthinkably thin and light this was and continues to be.  Now with the latest OS and Xcode I will happily be tugging this at conferences, meetings, and even in the house without compromises.

Coming up I’ll have to update my rMBP which is now one behind on both OS and Xcode.

Kicking it with Auto Layout

OS X Lion introduced a new layout system for Cocoa, replacing the historical springs and struts model.  iOS 6 adopts this system.
Autolayout is a constraint-based layout engine that can handle an amazing variety of user interfaces.

Yesterday, I reviewed CS193p Lecture 8 and then took about 5 minutes to make my Card Playing View all nice in Autolayout.

Prof Hegarty isn’t kidding when he calls it whack-a-mole system since changing one constraint introduces another item to review in a chain of constraints. But it is a speedy way nonetheless to get something working for an iPhone 4 or 5 or iPad Retina or mini.

If you’d like further information on Auto Layout there are the following three great WWDC 2012 Sessions (that’s close to 3 hours of Auto Layout):

  • Session 202: Introduction to Auto Layout for iOS and OS X: Come on in, the water’s fine!
  • Session 228: Best Practices for Mastering Autolayout for OS X and iOS
  • Session 232: Autolayout By Example

Also, Ben Scheirman’s NSScreencast Episode #35, is a great, quick, 13 minute tour of Autolayout for subscribers.

Fun with UICollectionView

Introduced into iOS 6, and like its OS X 10.5 cousin NSCollectionView, I spent some time yesterday with UICollectionView.

I made a PlayingCard View in a PlayingCardGame be a UICollectionViewCell of a UICollectionView.

Here is my tap gesture to the ViewController that flips the playing card:

- (IBAction)flipCard:(UITapGestureRecognizer *)gesture
   CGPoint tapLocation = [gesture locationInView:self.cardCollectionView];
   NSIndexPath *indexpath = [self.cardCollectionView indexPathForItemAtPoint:tapLocation];
   if (indexpath) {
      [self.game flipCardAtIndex:indexpath.item];
      self.gameResult.score = self.game.score;
      [self updateUI];

This result is some very clean code.

Tomorrow, Autolayout.

Swipe & Pinch

My first Swipe and Pinch methods yesterday.
This is the pinch from my View from my HW #3:

- (void)pinch:(UIPinchGestureRecognizer *)gesture
   if ((gesture.state == UIGestureRecognizerStateChanged) ||
       (gesture.state == UIGestureRecognizerStateEnded)) {
   self.faceCardScaleFactor *= gesture.scale;
   gesture.scale = 1; // reset

And here is the Swipe from my Controller with a block for animating the card flip (line 6-9):

- (IBAction)swipe:(UISwipeGestureRecognizer *)sender
   [UIView transitionWithView:self.playingCardView
                       if (!self.playingCardView.faceUp)
                             [self drawRandomPlayingCard];
                       self.playingCardView.faceUp = !self.playingCardView.faceUp;

Next UICollectionView.

Evernote Hacked

Yesterday my Evernote Mac App suddenly popped-up a message that read something like “Your Evernote password has changed.  Enter your new password.”

My first reaction was, “WTF? I didn’t change my password. Oh-oh.”

After doing a quick Google search it looked like Evernote was indeed hacked.

The Evernote team posted an immediate Security Responde on their site that reads:

Evernote’s Operations & Security team has discovered and blocked suspicious activity on the Evernote network that appears to have been a coordinated attempt to access secure areas of the Evernote Service.

As a precaution to protect your data, we have decided to implement a password reset. Please read below for details and instructions.

Looks like the passwords were seeded and hashed. Good for the Evernote team on being cautious, taking precautions, and communicating.

Steam on Linux

Last night I took my old workhorse Dell Inspiron 620 i5 that I had been using to run Lubuntu off a 32GB Cruzer Fit Nano thumb drive and put in:

  • a new 1TB HD and
  • a GeForce GT 640.

I installed Ubuntu 12.04 and after installing the tools I use (Ruby, Rails, Sublime, FireBug, Pocket, Skype, Evernote, mySQL, git, giggle, heroku, VLC, Flash downloader, iTunes 10 via Wine, and the Cairo Dock) I also now added Steam to the mix.

I connected the rig up to two monitors: 23″ Westinghouse (DVI) and a 27″ Acer (Mini HDMI).

I downloaded the free Team Fortress 2 from Valve and went through the training.

This HD and graphics card has really breathed new life into this workhorse and I look forward to using it on those rare times whenever I leave my 15″ rMBP.


Somewhat of a palindrome day, but not quite, today is a day for beginnings.

I am taking the Winter 2013 Stanford CS193p iOS Development course on iTunes U with the legendary Paul A Hegarty (former VP of Engineering at NeXT, close associate to Steve Jobs, co-founder of ORM (Operating Resource Management) pioneer Ariba, and author of AppKit) in order to teach myself all the new iOS 6 SDK & Xcode updates such as (but not limited to):

  • Storyboards,
  • Autolayout,
  • NSAttributedString’s new methods,
  • UICollectionView,
  • Allocating arrays on the fly,
  • @property updates (goodbye synthesize – almost).

Today I’m starting Assignment #3: Graphical Set.

I’ll post the code to the following GitHub repo when I’m done (where I already have my first two assignments checked-in):