Hiltmon

On walkabout in life and technology

Application Context Packs

When developing in Rails, I use a certain pack of applications; when coding for iOS, I use a different pack of applications; and when in a blogging context, I use a third pack of applications. And then there is the regular set of applications that I usually leave running. Starting and switching between these contexts used to take time, until I found a better way.

The Old Way

After a clean reboot, I would then have to go through the same dance every time, launch the regular applications manually. Start Mail.app, OmniFocus, Billings, nvAlt, Twitterrific, Reeder, iChat and Skype, waiting for each to launch before clicking the next one.

Then I would choose what to do next and start the application pack for that context. If I were to be programming in Rails, that means two terminal sessions, TextMate, BBEdit and Safari. If iOS, then it’s Xcode, BBEdit and Photoshop, blogging, MarsEdit and Safari.

To switch contexts, I would manually close the unnecessary applications, and then manually launch the new ones. And then configure them for the project I was working on.

This was painful, slow, and I often forgot to either close unnecessary applications or launch the ones I needed.

The New Way

I have set up a bunch of Keyboard Maestro macros and shortcuts to take care of all of this, and use TextExpander snippets for configuration where necessary. Here’s how it works.

I have setup a Keyboard Maestro macro mapped to ⌃⌥⇧⌘W that opens all my standard applications (called ‘Start All’). This macro launches all my regular applications, then hides the Skype window. One keystroke, and everything is on. I boot, I hit this combination and it’s all done. I also have a matching ⌃⌥⇧⌘Q (‘self-destruct’) macro that kills everything, one keystroke and all my running apps terminate.

To switch contexts, I have a series of context macros linked to the same key combination ⌃⌥⇧⌘C. In Keyboard Maestro, if you use the same key for more than one macro, it displays a panel for you to choose from. Here’s mine:

I can either use the mouse to select a context, or just press 1 for the first, 2 for the second, etc. The macros themselves are pretty simple: if I am already in that context, it terminates the context applications, else it launches them. It determines whether I am in a context by checking if the key application for that context is running. For example, if Xcode is running, then triggering the Xcode context terminates it, else it launches it.

This works great in my blogging context. Trigger the macro and a terminal session is opened in my blog folder, ready for me to create a new post. I have modified the new_post code in Octopress to launch Byword. When I am finished blogging, I trigger the same macro and Byword and Terminal are closed. Back to a clean system.

It’s almost same for programming in Rails. Trigger the Rails context and Terminal, TextMate, BBEdit and Safari all launch. The problem is that I work on multiple rails projects at the same time. I could have simply created a context for each Rails project, but given that I bounce between Rails projects while staying in the same context, having to quit and launch the same application pack just wastes time. Instead, I have created a set of TextExpander snippets to handle the configuration of the context.

For example, when I wish to work on Kifu, I do the following:

  • Launch the Rails Context using ⌃⌥⇧⌘C and then press 2. This launches my Rails application pack and leaves me in the terminal.
  • I type ;cdki which TextExpander expands to the Kifu source folder path and press enter.
  • Type ;md (which expands to mate .) to open the project in TextMate which is already loaded.

And I’m ready to program. Everything I need is loaded, configured and ready for action.

And when I am finished, ⌃⌥⇧⌘C and 2 again terminates them all. Back to pristine.

Dealing with OS X Lion

I am very comfortable with this workflow, but a few OS X Lion features get in the way. The first is the application resume feature. Since I may be using the same application in different contexts, I sometimes do not want the state from the previous context to be resumed in the new context (and sometimes I do). I have therefore gotten into the habit of hitting ⌘W a few times on the main context application to close all windows before triggering the context switch.

The second is that Lion resumes all applications on a reboot. Most of the time this is OK, but I want control. So I usually hit self-destruct ⌃⌥⇧⌘Q before rebooting so I don’t have to uncheck that darn checkbox to prevent it.

My iPhone Home Screen

I have noticed of late a trend in people or sites showing off their iPhone home screens, the first page on your iPhone with the dock, and explaining why they rearranged the applications and icons. Some have even moved the Phone.app off their home screens.

They are all doing it, so it must be cool.

My home screen on the iPhone is factory original. All the applications are exactly in the same place that Apple put them when the iPhone was first set up. Much cooler. Why? Two reasons.

So that others can use my phone.

My phone gets passed around all the time like a two-bit hooker. I am always giving it to people so they can read a tweet, look at a photo, interact with an app, play a game, or make a phone call.

Somehow, all my previous phones seemed to be private, mine and mine alone. Maybe because all they did was make calls (anyone remember when you could actually make calls on a mobile phone in New York?). Maybe because I was embarrassed to have such crappy devices. Maybe because there was rarely a need to.

But the iPhone with it’s lovely display is more than a phone. It’s a picture frame, a game console, a web browser, a GPS, and none of these things feel private. All my data, text and pictures are on it, and the whole internet is on it, it’s both the container and the medium of all things I wish to share.

So I leave the device home screen as expected, so when I hand it over, others can use it easily.

Spatial Awareness

As an old-school Mac, I remember when the finder would remember where and how the last time a folder was opened, and would always open it again in the same place in the same way. Since every item on the screen was always in it’s place, I did not have to hunt for anything on the computer. I always knew without looking where everything was. This knowing is called spatial awareness, and we humans are pretty good at it.

I expect the same on my iPhone. I know where everything is on my phone, without having to search for for it. I know the phone app is in the bottom left corner and SMS is the top left. The camera is top right, Instagram is one swipe to the right top right. It enables me to use muscle memory to navigate the phone quickly and efficiently.

It’s taken me a while to choose and place the third party apps on my phone, and every year I do seem to rearrange the them as new ones come and go. But the home screen remains pristine. That muscle memory is too ingrained. Which also means that when Apple does move things around, as they did for iOS 5, it drives me mad until I get used to the new default layout.

So if you want to see what my iPhone home screen looks like, because looking at these is cool, just nuke yours, and after it reboots, that’s it.

This Industry Is Full of Crap

Lovely rant by Amber Weinberg in This Industry Is Full of Crap:

We get to do something that regular people can’t understand so we’re think we’re cool. We’re not.

And I’m right with her on this too:

I love the fact that as a freelancer, I can choose who ever I want to work with – both in terms of clients and other freelancers.

Microsoft Did Not Always Suck

I was a Mac when Apple was beleaguered. Those were the days when Microsoft was in ascendancy, this new Blackberry thing was cool and Google was just a search engine. It’s traditional, and expected, for us Mac people to outright disparage Microsoft and all its products as things that suck. But the reality is that Microsoft has made some pretty amazing products in spite of its size, bureaucracy and inertia. These are some of the things I think they did just right.

US Dining Etiquette Failures

I’ve been living in New York for almost nine years, and I love to go out and eat at all the myriad of restaurants that pepper this town. The variety, quality and prices of food is amazing. But there are still things about the dining experience here that drive me insane. Here are some of my annoyances, with proposed solutions to each of them.

Spike UI Teaser

Following on to last week’s Spike Solutions piece, I did some work on the second spike, to see if I could use CoreGraphics to render some of the UI components I want for the new product. Wow, worked out great, one less known unknown to deal with. Turns out, CoreGraphics does a lot of what you can do in PhotoShop, just in real time and on the GPU.

The following snaps were generated on the fly, quickly, using code, no image or artwork required, and the values change and update dynamically. The best part, I can skin them later once I pick the theme and design for the product (or just use these as is).

Note the subtle gradient in the large numbers, the glow around the panel titles, and the strong gradient in the pie slice.

The graph scales as the data is added, there are no escapee pixels on the line joints, and the points are correctly positioned.

I have not yet decided whether to share this spike’s code like I did the last one, let me know if you would like to see it. Remember, it’s spike code, to be thrown away, so it may work, but it certainly stinks. One more spike to go.

The News Routine

Twitter, Facebook, RSS, all wonderful services, all bombarding us with information, all taking time and attention away from things we should be doing. In order to remain productive, I have moved these services onto the iPad and created a reading routine to eliminate the temptation to waste hours on these services.

Two screens are now one

Previously, I did all my work on my Mac Pro with dual 24" Dell monitors. The main monitor had my work on it, and the secondary monitor had Mail, iChat, Skype, Twitterriffic and Reeder running all the time. Result: The secondary screen always had something happening on it and I constantly interrupted my work to glance over and pay attention to it. 88 new tweets. 34 unread RSS items. 5 unread emails. And my productivity suffered.

Last year, I switched to doing development on the laptop. It enabled me to work in coffee shops, become more keyboard centric and it saved my eyes because the Dell monitors I have don’t do font smoothing properly with Macs (and no, the ‘fix’ does not work, it creates red halos). But the main benefit of moving to the laptop is that all these distracting programs have nowhere to display, I moved them to other spaces. Since I no longer see them, I’m no longer distracted by them. I even hide the dock now, so I do not see the unread badges. Achievement unlocked: productivity improved, but at the cost of feeling disconnected.

Time to read

Since I am no longer distracted by Twitter and RSS streams, I also miss out what is happening in real time. Instead, I have simply made reading time part of my routine.

I start the day with coffee, and process my email, news (via Reeder) and tweets (via TweetBot) on the iPad. I use lists on Twitter to follow groups by topic, leaving the timeline for key people to follow.

Then I put the iPad away and get to work, occasionally checking email on the laptop when I take breaks. Around lunch time, I pull out the iPad and revisit news and twitter. And I do it again at the end of the work day. If I come across any long form articles, I Instapaper them for later.

After dinner, I settle in on the sofa with the iPad for a final pass at news, twitter and read any new Instapaper articles.

Notifications

One thing I do keep running on the computer are Growl notifications on Twitter, but only for DM’s and mentions. People expect a fast response to these, and I want to be interrupted by them. Otherwise I’d not launch Twitterriffic at all.

I still run iChat and Skype, as these are interruptions I want and expect. But they both remain hidden unless someone calls in.

Launch all, hide all

One thing I am trying out these days are my ‘Launch Social’ and ‘Hide Social’ macros in Keyboard Maestro. These keyboard shortcuts launch all my social applications for when I do want to see them on the laptop (or know they are alive), and kills them when I don’t want any interruptions at all. Having them a keystroke away makes me feel that they are close by, even though the iPad is always within reach.

By moving my use of news feeds, Twitter, Facebook and the like off the computer and onto the iPad, I have taken away the temptation to glance at them all the time. By integrating the reading cycle into my daily routine, I still feel up-to-date and connected.

Augmented Paper

Matt Gemmell wrote yet another brilliant post on what makes a great application interface (with examples) in Augmented Paper:

For me, software experiences that feel like Augmented Paper are those that second-guess our (developers’) natural tendency to put functionality first, or to think of our apps as software. Apps are only incidentally software; software is an implementation detail. Instead, apps are experiences.

Honestly, if you are an app designer, this is a must-read.

Another View of the TSA Problem

We all read TSA previous head Kip Hawley’s WSJ essay on the weekend entitled Why Airport Security Is Broken—And How To Fix It (you may hit the paywall, sorry). If not, read it now, then come back. We’ll wait.

Ben Brooks makes a great point in ‘Why Airport Security Is Broken—and How to Fix It', that it’s the people too:

Because even if we succeed in getting rid of porno scanners and allowing liquid through, we still face the issue of TSA “officers” over stepping their bounds.

and

You may not like the FBI, but not just anyone can be in the FBI. And that’s the difference. The TSA was built out in a couple of months and staffed as quickly as possible with the most readily available people — and that’s why the TSA is as bad as it is.