Job title

I work for a company that provides high-end digital photography services. Many of our clients are in the fashion industry.

I'm not involved in the actual photography part — my group sits in a back room and writes code — but just once I'd like to go on a fashion shoot and be in charge of positioning the cameras, so that I can say on my resume that I was a "model view controller"…

How I arrange windows in Xcode

A coding tip from Mike Morton, by way of Mark Dalrymple, inspired me to post a micro-tip of my own.

Often I need to spend some time working on a subsystem of classes. Typically the classes have a natural logical ordering: the main class is A, which uses abstract class B, which has concrete classes C and D, and so forth. I open these classes in their own windows and arrange them like this, with class A in the top left corner of my screen:

+----------+
| A        |
|  +----------+
|  | B        |
|  |  +----------+
|  |  | C        |
|  |  |  +----------+
+--|  |  |  D       |
   |  |  |          |
   +--|  |          |
      |  |          |
      +--|          |
         |          |
         +----------+

I find this makes it easy to jump from class to class. The lower-left corners are always visible and they're big click targets. I like using my spatial memory to connect the position of the windows with their place in the conceptual scheme of things. This ordering also makes me feel reassured that what I'm looking at is logical and finite.

Here are some handy mouse and keyboard tips that go along with this:

  • Command-Option-O opens a file in its own window.
  • Command-Option-UpArrow toggles a window between the .h and the .m.
  • Command-DoubleClick on a class or protocol name opens its source file.
  • Command-0 (that's the number zero) brings you back to the main project window.

I briefly tried using the favorites bar in the main Xcode window (View -> Layout -> Show Favorites Bar), but never warmed to it, maybe because it's only in the main project window, which often has windows in front of it. I might give the favorites bar another chance someday.

Getting back the Cocoa-Java bridge in Snow Leopard

Here's a hack that seems to restore the Cocoa-Java bridge on Snow Leopard. I have not tested it beyond a quick launch of one Cocoa-Java app. This is purely a data point that you can take for what it's worth. I offer no support and take no responsibility for what it may do to your system.

The trick is to copy two sets of files from a Leopard installation to the corresponding locations on the Snow Leopard installation:

  • the com directory in /System/Library/Java, and
  • the eight files ending with .dylib in /usr/lib/java (four of these are regular files, the other four are symlinks; if you prefer, you can copy just the files and recreate the symlinks by hand).

That's all.

A coworker figured most of this out. I'm not even sure how he did it. We were originally experimenting with instructions from OneSwarm.org for downgrading to Java 1.5, but that seems not to be necessary to get the Java bridge back.

Obviously if you're a developer you can't ship this hack with your product, but it might allow you to upgrade to Snow Leopard sooner if the only dealbreaker was the absence of the Java bridge.