Learning a new language is never a simple task, but the process itself shouldn’t be difficult. For my Master’s final project, I’m teaching myself Objective-C. (More on our decision to go native here.) For those facing a similar task, here are some tools I’m using using to facilitate this process.

Learning Materials

I researched several learning resources that had been recommended on Quora, including Big Nerd Ranch’s iPhone Programming and Craig Hockenberry’s iPhone App Development: The Missing Manual.

In the end, I decided to “take” the Stanford iPhone Application Development course, which is available in its entirety on iTunes U. (Note that iTunes U has both the 2009 and 2010 courses. I chose the 2010 version because a) it’s geared for a newer iOS SDK, and b) all the supporting materials are still (as of Spring 2011) available on Stanford’s course website.

iTunes handles the lecture downloads, but I watch them with QuickTime Player for two reasons: it uses less screen real estate, and you can speed up playback by option-clicking the fast-forward button. A text editor is ideal for notes (particularly one that handles Obj-C syntax highlighting), and it’s always handy to keep the lecture slides open as well. Here’s my typical “class time” screen:

Screen shot 2011-02-27 at 10.29.51 PM.png

Helpful shortcuts:

  • Setting up the screen like this is a snap with Divvy. I set up shortcuts to move windows to each half or quadrant of the screen, so they can fly to any position with a keyboard shortcut. Priceless.
  • A series of quick-and-dirty AppleScripts—which can be quickly invoked with FastScripts—makes it easy to work the lecture files. Scripts I use (available on Github) include:
    • launch the current iTunes file in QuickTime Player (or vice-versa), retaining the current playback spot
    • jump to an arbitrary playback position in QuickTime Player (especially helpful if I’ve been watching a video on my iPhone)
    • jump backwards or forwards in QuickTime Player

Notekeeping

Right now I keep two types of notes: course notes and error notes.

Course notes—general notes from the lectures or books—go in a single text file that’s easily searchable. I type or copy most of the lecture slides into this document because it’s easier to have it all in one place.

Error notes, which detail all the build errors I get in Xcode, live in Notational Velocity (tagged with “ObjC” and “Error”). Each error note contains the following sections:

  • Error message
  • Context (anything that might help)
  • My code (specific code throwing the error, and which file)
  • Problem explanation (interpretation of what went wrong)
  • Solution (fixed code)

These error notes are a personal history of the mistakes I’ve made. My expectation is that this practice will have value both now and in the future, but as the good folks at Field Notes say, “I’m not writing it down to remember it later, I’m writing it down to remember it now.” The more I can internalize beginner’s mistakes, the less likely I’ll be to repeat them.

My only complaint w/r/t using Notational Velocity for this purpose is that it doesn’t have syntax highlighting. A relatively minor inconvenience, but I’m hopeful that a future NValt build might include this.

Helpful shortcut: I use a TextExpander shortcut to pre-fill each error note before I start adding data. It simply adds each section’s header—something that might not seem that important, but it saves a little time and helps me be consistent in this practice.

Troubleshooting

Stack Overflow is an indispensable Web site for programming questions/answers. I should probably get better at perusing Xcode documentation, but often it’s faster to search Stack Overflow. (I’ve noticed that most of my problems are answered in Stack Overflow questions with no upvotes, meaning that they’re beginner errors. I’ll know I’ve arrived when I graduate to more popular questions!)

Helpful shortcut: Searching Stack Overflow is nearly instantaneous using a LaunchBar search template set to search StackOverflow with the [Objective C] tag pre-filled. Once it’s set up, ⌘[space] → “so” → [query] gets it done pronto.

Here’s a draft Zenburn-based theme for OmniFocus. Due to some limitations of the theming engine, some of the status indicators (repeating, flagged, etc.) are displayed as grey-on-grey and are therefore somewhat difficult to read. Otherwise it’s quite usable. Download it here.

Zenburn.png

Rumor has it that there’s an extant Stata bundle for TextMate. The original package link is a dead, but Gabriel Rossman was kind enough to send me a copy of his installed bundle.

With thanks to the author, Timothy Beatty, here’s the original bundle:

Download Stata Bundle

Stata bundle (original)

For those wanting a little extra functionality, George MacKerron described a method to add tab-completion for Stata variables. I’ve added his code to this version of the Stata bundle. (N.B. If your Stata application is not named “Stata”, you’ll need to make one small change. Open TextMate’s Bundle Editor; then, in the Stata bundle’s Complete Variable command, change the “appname” variable in line 6 to reflect your app’s true name, e.g. “StataMP”.)

Download Stata Bundle with tab-completion

Stata bundle (with tab-completion)

Update: I’ve learned that two forward slashes can also be used in Stata for comments, including inline comments. To properly highlight this in Textmate, open the Bundle Editor > Stata > Stata. At the end of this file is the ‘comment.line.star.stata’. Change the match line to this:

match = ‘((^|\s)\*|//).*$’;

(N.B. As Sean points out below, make sure the single-quotes are straight, not curly, when you paste this line. Otherwise TextMate will throw an error.)

While studying in Oxford seven years ago—most likely in a fit of procrastination—I determined that the word billion can be spelled on a telephone keypad with the number 245-5466. As it turns out, 2455466 was also the Julian date of a certain September day in [the then-distant future year] 2010. I put a reminder in my Palm V and forgot about it. Thanks to an electronic calendar that doesn’t forget, I was just reminded…

That day is today.

Happy Billion Day, everyone!

(One could discount this event by pointing out it’s only the coincidence of a) Julius Caesar’s arbitrary selection of the calendar’s start date, as well as b) the arbitrary—though now standardized—mapping of Latin letters to the 10-digit keypad. I suppose we could also cite the rise of the decimal numeral system in this celebration as well; who knows what billion would map to on a hexadecimal phone keypad, or if we’d even care since 1,000,000,000 is much less elegant as 3B9ACA00 in hex. Then again, many of our declared holidays aren’t much less arbitrary.)

Here is an AppleScript that schedules the selected OmniFocus tasks for the coming weekend. If a weekend (as defined by you) is in progress, items will be scheduled for the current weekend.

In concept, the script really lets you to set start/due dates based on a relative weekly schedule. Simple modifications include:

  • Changing your “weekend” to a different day/time range is as simple as modifying the settings at the top of the script. You could easily make a copy for “this week”, “next week”, “next Friday”, “next Thursday from 4:00-6:00″, etc.
  • Un-commenting one line will bump it forward a week (think: “next weekend”).

Download it here

For OmniFocus users: here’s a script to clear the start and due dates of all selected tasks.

Download it here

Update: for those interested, here is a version that lets you change the context as well. I don’t personally use this version so please let me know if you have any issues with it.

For Fastmail users who also use Mail.app, here’s a script that searches for the selected messages (in Mail.app) in the Fastmail web interface.

Why would you need such a thing? One reason is that Fastmail lets users specify an infinite number of aliases which they can give to an infinite number of websites (and subsequently block, if an infinite amount of spamming ensues). Mail.app doesn’t offer a good way to change your reply address, but replying from the Fastmail web interface does the trick nicely. (Thunderbird users can use the Virtual Identity plugin for this as well.)

Here’s the script:

--Searches for the messages selected in Mail.app using the Fastmail web interface
--By Dan Byler (http://bylr.net)

tell application "Mail"
    try
        set selected_messages to selection
        set remaining to count of selected_messages
        set the_url to "https://www.fastmail.fm/mail/?MLS=MS-*;MSS=!MB-*;SMB-CS="
        repeat with the_message in selected_messages
            set remaining to remaining - 1
            set message_id to the message id of the_message
            set the_url to the_url & "msgid%3A%22" & message_id & "%22"
            if remaining > 0 then set the_url to the_url & "%20OR%20"
        end repeat
        set the_url to the_url & ";SMB-SearchAll=on;MSignal=*P-1"
        open location the_url
    end try
end tell

Or download it here.

A while ago I posted this script, which selectively archives RSS feeds/items in NetNewsWire to DEVONthink Pro Office.

This long-overdue update includes two changes:

  • adds the option to archive all items in a specific date range
  • fixes an issue when a news item’s description is not available

Grab it here.

It is becoming well known that social media hashtags form a de facto backchannel wherever a critical mass of tech-savvy people congregate. At InfoCamp Berkeley, we wanted to encourage the Twitter/Flickr backchannel and bring it to the fore as much as made sense. Our hope was that this would encourage attendees to tweet and post photos during the event.

There were no tagged Flickr photos at the beginning of the event, so we displayed tweets as they came in using an AIR-based app called TwitterCamp. (As it happens, Twittercamp was developed for a BarCamp, so it made an appropriate home with us at InfoCamp.) TwitterCamp is not being developed or supported, but it works fine and is open source. When customized with our logos, it looked like this:

Twittercamp

Twittercamp

By mid-afternoon, Flickr had a amassed a good selection of event-tagged photos. We switched to Twitterfountain, which can display tweets against a Flickr slideshow. Here’s a still shot with Twitterfountain in the background:

Twitterfountain

Twitterfountain

Twitterfountain looked great, and at a slow speed it wasn’t too distracting. Unfortunately, though, it tended to loop over a small selection of photos instead of iterating through the entire tagset.

To see our Twitterfountain instance in action, click* here:

And that’s about it. We kept the backchannel onscreen during announcements and between sessions—not during, to avoid undue distractions. Although there is, of course, no way to judge the “success” of these tools, we felt they added some good buzz to the room.


*Disabled by default because it’s a bit of a CPU hog.

This is one of those times. From QuickPress to the world.

QuickPress

FireStats icon Powered by FireStats