Swift 1.2 and Facebook’s New Login SDK

I’ve had the pleasure of working with Apple’s new Swift over the last few months, and recently ran into some problems integrating Facebook’s API with an iOS 8 app I’m building.

The problem I was having is that, immediately after login, I couldn’t seem to get the user’s access token.


was always returning nil, even with the user logged in.

You need to get this token so that you can send it to your Rails app (or whatever you’re using on the back end) and perform Facebook authentication on behalf of your user up there.

Continue reading Swift 1.2 and Facebook’s New Login SDK

Project: Automated Lawn Room

I recently finished creating a 3D-printed, Raspberry-Pi-powered, Twilio-backed lock for one of the oldest rooms in Charlottesville.   The goal? To allow my friends anytime access to my space on the Lawn while simultaneously staying secure.

I was originally going to grant access to all of my Facebook friends  (the Raspberry Pi would use Facebook’s API to check who my friends were), but thought that it might be less chaotic to design my own registration system, so that I can easily control when individual users are permitted to enter my room.


  1. Not destroying a UNESCO World Heritage Site
  2. Designing/Printing a container and transmission to adapt a servo motor to the existing door lock.
  3. No existing “Instructables” for this project (or pieces of it therein)
  4. Learning how to make the Arduino talk to the Raspberry Pi
  5. Getting through the University’s draconian firewall to Twilio. (ended up using a few servers as mirrors to get there)
  6. Allowing manual override for maintenance workers who occasionally let themselves in.

Here’s a video I submitted to the Engineering Student Council as part of a contest.  (The second half shows how it works)

Update:  Some new features!

I’ve been working on a few new features to make my room more intelligent.  One of the features will save electricity by turning lights on only when there are people in the room, and turning them off automatically when the visitors leave.  Another new feature  sends me a text with a picture of the visitor who entered the room.  Finally, I’ve created a lockdown mode so that I can go on vacation without worrying about what will happen to my room when I’m out of town for a weekend.

Calling a method I wrote to control the lights in my room via DMX protocol by way of the raspberry pi.
Calling a method I wrote to control the lights in my room via DMX protocol by way of the Raspberry Pi.



Cloudification of Things

Cloudbursting, the ability to rent additional servers in the cloud on demand, has been an extremely successful concept in enterprise computing recently. When a researcher has the need to perform complex computations, rather than investing in a supercomputer, she can rent a cluster of Amazon’s idle servers for just the duration of the calculations. She pays for the power when he needs it, and when she doesn’t she avoids having an expensive asset sitting idle and depreciating.

Expansion into the cloud has been made possible in part by improved networking. Analogous to decreased shipping costs, more bandwidth reduces the friction in moving large sets of data from the firm to the cloud. What will enable the Cloudification of Things is the decreased friction in loan logistics.

Take Zipcar, for example. Some people do not need a car 7 days a week. Rather than having a depreciating asset sitting in a car park, Zipcar users can rent a vehicle for only the time which they need. The proliferation of GPS tracking devices has reduced the friction in trusting customers to return a vehicle, allowing this business to be viable.

Another example is fashion site Rent the Runway. Rather than paying for an outfit which is to be worn but a few times, customers can rent these items for a special occasion. Courtesy of improved shipping routes and delivery algorithms, shipping costs have actually decreased while fuel costs increase. Decreased transitional costs combined with large inventory availability has removed the friction that prevented previous clothing rental companies from being successful.

From records, to 8 tracks, to CDs, to iTunes, the music industry has never been complacent with any particular medium. Shifting from iTunes, users begun favoring “rented” music with services like Spotify, Pandora, and iTunes Match.

There are many other examples of users transitioning from ownership to renting, most of which have been enabled by reduced friction in transactional logistics. Going forward, there are many other businesses that have the ability to “cloudify” their business model.

Further, the nature of this model need not be B2C. Consumer-to-consumer rentals can also lead to a more efficient utilization of underutilized assets. Photography equipment, vacation homes, office space, restaurants, energy production equipment, and farming equipment are just a few possibilities.

It’s been estimated that Manhattan was sold by Native Americans to explorers for only $24. The reasoning for the low price was that the Native Americans believe that it was impossible to “own” land. How humanity defines ownership has never been consistent across time and cultures.

“Imagine no possessions,
I wonder if you can.
No need for greed or hunger,
A brotherhood of man.
Imagine all the people, sharing all the world”

– John Lennon, 1971

Interview with Virginia.edu hackers, R00TTH3B0X

I’m surprised to be writing this, but I think the hacking incident this week with the Virginia.edu homepage is terrifically ironic.  Before chatting with the two hackers, who go by the handles “x86” and “n3tcat,”  I thought that the episode could be an important milestone for computer science, and IT in general at the University. I think there are a few takeaways: First, the exploit serves as a reminder that we must never rest assured systems are, and will always be, secure.  Second, improperly managed software can cause problems beyond their foreseeable scope. And finally, a quick response does not always equate to the best response.

I chatted with x86 and n3tcat using an encrypted application called cryptocat, which prevented me from determining their IP addresses, and consequentially, protecting their anonymity.   My purpose for chatting with them was to find out their motives, and to see if they shared the same view on always pushing technology to it’s edge for the purposes of furthering our general security as I did.  I ask them why, if they had access to everything (as they claimed), would they only take down the site’s homepage, leaving everything else in tact.

Continue reading Interview with Virginia.edu hackers, R00TTH3B0X