TweetFollow Us on Twitter

ADHOC/MacHack: I Love the Nightlife

Volume Number: 20 (2004)
Issue Number: 11
Column Tag: Programming

Mac OS X Programming Secrets

ADHOC/MacHack: I Love the Nightlife

by Scott Knaster

If you're a Mac programmer, you've attended your share of computer conferences, such as Macworld Expo, Java One, and Apple WWDC. But unless you've been there, you've never experienced anything like ADHOC, the Advanced Developers Hands On Conference, formerly and still occasionally known as MacHack. ADHOC starts at midnight and takes place in the tourist mecca of Dearborn, Michigan, and those facts give you a good start toward understanding just how strange and wonderful ADHOC is.

In this month's column, I'll describe my visit to ADHOC/MacHack 19, which took place July 21-24, 2004. Wrapped inside is some actual technical content, a nifty iPod project that isn't nearly as cool as Tim Monroe's program-your-iPod article a few issues ago, but that has the advantage of being actually real.

Day 0: It's Time To Start

ADHOC begins on Thursday, but it's really Wednesday, and...well, I'll just let this exchange from the conference FAQ explain:

Q: When should I be there?

A: The best time to arrive is sometime on Wednesday before the conference begins. The conference begins at midnight, Thursday, which is really just a minute after 11:59 PM Wednesday. Don't get confused and think that you can arrive on Thursday. If you arrive on Thursday, you've already missed the keynote.

So I got on a plane on Wednesday, in time to arrive and watch the keynote as Thursday began. My flight from San Jose to Chicago was late, of course, which managed to eat up my layover time at O'Hare almost perfectly. Due to a quirk in the universe, I was able to trade little-used frequent flier miles for a seat in first class, which meant more service, a bigger seat, and, I'm pretty sure, a higher quality of air freshener.

I arrived in Detroit just late enough to have missed my chance to attend a baseball game, and headed to the glorious Holiday Inn Fairlane in Dearborn, home of ADHOC/MacHack.

http://www.adhocconf.com/index.html

Day 1: Night Fever

I checked in at the hotel, leaving my cable-and-battery-laden bag in my room. I registered for the conference and happily greeted beloved organizers Carol Lynn and Maurita Plouff. Then I headed to the ballroom for the first event of the conference: the midnight keynote (plus pizza - there's a lot of junky-but-fun eating at this conference).

This year's speaker was the famous David Pogue, star of books, the New York Times, and many a Macworld back page. The keynote was ostensibly about cool Mac tips and tricks, or something like that, but no MacHack keynote ever stays on track for long. You see, we nerds have no social graces, so as soon as the speaker begins, we start to "interact" with him - not by heckling, exactly, but by adding our own comments, stories, and questions.

David said he was nervous, because he felt he was less technical than everybody in the audience, which he probably was. He thought he would have nothing to teach us, but he was wrong. Even when he revealed a tip that most members of the group already knew about - in one case, somebody knew about a tip because he was the programmer who had actually written the code for it - David stayed spontaneous and hilarious, and the crowd appreciated it. David dealt superbly with the ADHOC style of interactivity, listening to all comments and responding to them, even when they required him to change the ever-ambling course of his talk.

At one point in the talk, some of us nerds decided we weren't multitasking enough, so we started interacting with David electronically. A couple of folks used iChat's Rendezvous feature to send notes to David while he was talking. I started fiddling with my Bluetooth-enabled phone and managed to bluejack David during his speech. He took it all in good humor, along with all the other geeky antics.

David concluded after touring through a bunch of Mac OS X tips, lots of editorial comments, about a million jokes, and even a few of his well-known parody songs, including "Don't Cry For Me, Cupertino" and "The Girl I Met by E-mail". ADHOC keynotes go on for hours, and David finished up at an impressive 3:40 AM. David's presentation was wonderful, and enjoyed by all the geeks in attendance.

http://www.davidpogue.com/songs.html

One of ADHOC's oft-repeated mottos is "Sleep is for the week and sickly", but I prefer a little preventative rest to avoid becoming week and sickly. So after hanging out post-keynote until about 4:30, I headed off to bed.

Day 2: We Belong To The Night

One of the Holiday Inn Fairlane's finest and most important features is the superthick blackout curtains in the rooms, which prevent any trace of sunlight entering to disturb sleep. Taking advantage of these wonderful curtains, which were probably installed specifically for our little conference, I slept until the still-early time of 10:30, when I had to prepare for the ADHOC session I was presenting on writing books at 11:00. I was told that I would have few attendees at that early hour, but that more folks would trickle in as we approached noon (nobody wants to sleep through a meal). So, in the spirit of the conference, I decided to present the session backwards, beginning with Q & A, then the summary and miscellaneous info, and the important stuff at the end. This worked out OK - everybody understood and appreciated my meager attempt at adding entertainment value.

After lunch, I started to think about working on my hack project. In previous MacHacks, the soul of the conference was the attendee hack projects. People at the conference were encouraged to cook up some weird and fun programming project while they were there - something they probably wouldn't find time to work on while back at home in the real world. On the third night, attendees would get a chance to show off their work in a marathon hack show, featuring MacHack-style interactivity. The final night featured the awards banquet, at which contest honcho Scott Boyd bestowed weird and appropriate prizes on all participants - last year I got a bag of rocks.

http://www.hax.com/MacHack/HackContest.html

For a variety of reasons, the final hack contest took place in 2003. This year's conference featured a reasonable facsimile called the ADHOC Labs Showcase. Although the name, details, and traditions changed, the important bits - attendees hacking, showing off their work, and receiving awards - were pretty much the same. Everyone at ADHOC is encouraged to create a hack, even the non-programmers. For example, Mac maven Adam Engst hacks the hotel itself by hiding (sometimes in plain sight) a four-foot wooden stake somewhere, which stays in the hotel until he can retrieve it the following year.

As a professional explainer, I'm not really a programmer, and I had never attempted a hack in my 3 previous MacHacks. This year was going to be different: I wanted to hack the iPod.

Although some hack purists insist on waiting until Friday afternoon (that is, the last minute) to start working on their hacks, I was much more cautious. I wimpily started on my project with more than a day to spare.

Every iPod that has the Notes application includes a little-known feature called "museum mode". With judicious use of museum mode, you can actually prevent users from getting to the standard iPod commands, and replace them entirely with your own custom user interface. Of course, there's a catch: your new UI can only take advantage of the iPod's notes features. Even with this limitation, you can do a lot. Notes can display text (of course), link to other notes, and even play music.

The trick to stealing the iPod's user interface is to create a note with the following text:

<meta name="NotesOnly" content="true">

If you save this file with the name Preferences (or Preferences.txt) and put it into the root of the Notes folder on the iPod, then reboot the iPod, it will no longer display the familiar commands of the main menu. Instead, the iPod will only show the names of other files and folders in the Notes folder. Score!

My plan was to use museum mode to construct a faked-up "Super iPod" with all the features that have been rumored for the iPod over the past few years. Of course, these "commands" would actually be notes. On some of them, I would create dummy interfaces for the "features". What I lacked in technical virtuosity, I would have to make up in comedic value, a standard MacHack technique.

Furthering The Hack

To make my iPod notes hack, I first created the Preferences file. In addition to the tag shown above, I added another tag:

<title>Super iPod</title>

This title tag lets you replace the text that normally appears at the top of the screen with whatever you want. Adding this tag to the Preferences note made sure that I would see "Super iPod" at the top of the screen when the iPod started up, which would enhance the illusion.

Next, I wanted to figure out which fantastic items my main menu screen would contain. After a judicious review of the best iPod rumors, I came up with these choices:

Music         >
Pictures      >
Telephone     >
Video         >

To simulate these Super iPod features, I created a folder in the Notes folder with the name of each feature. You'll note a very important hidden feature of these commands: they're listed in alphabetical order. The Notes application always displays files and folders in alphabetical order, a fact I had to keep in mind when I picked the names of my super-features. I had hoped to use another esoteric notes feature, the main.linx file, to list features in whatever order I wanted. But unfortunately, when I created the main.linx file, I discovered that Notes didn't display the right-arrow after the names of the folders such as Music and Pictures, which destroyed the illusion that those were iPod commands. So I had to abandon the main.linx technique and avoid other "features" (such as Backlight or Settings) that would appear out of their natural order.

Now it was time for the social engineering part of my hack. What should happen when I delved into the Super iPod features? I wanted the Music command to actually play music, because that's what an iPod does (and it's one of the things you can do from Notes). The menu I built inside the Music command looked like this:

Albums
Artists
Composers
Playlists
Shuffle Songs

These weren't in proper iPod order, but I figured it was close enough for their quick appearance during the demo. For the last item, Shuffle Play, I used another Notes trick: the .link file. I created a file called shuffle.link, with the following contents:

<title>Shuffle Songs</title>
<a href="song=Invasion of the Gabber Robots">Shuffle Songs</a>

The href tag plays the given song. Putting the tag into a file with the .link suffix tells Notes to start playing the song as soon as the user selects the note on the iPod. The title tag hides the file's true name and replaces it with another, in this case "Shuffle Songs", which is how we want it to appear in the Music menu. The effect is that when the user clicks Shuffle Songs, the song will start playing. The other notes (Albums, Artists, Composers, and Playlists) are just dummy files.

Adding Features That Don't Exist

Now that I had faked music playing, it was time to work on the Super iPod features. For the Pictures "feature", I decided to simply add a set of folders chosen for their humor value, since I wasn't really going to try to display images on the iPod. Inside the Pictures folder, I added these folders:

blackmail            >
Hawaii               >
kitchen remodel      >
MacHack 1857         >
not safe for work    >
vacation 2003        >

Because I wasn't going to open any of the folders, I simply left them empty. The next "feature" I worked on was Video. I added some files and folders to the Video folder:

Ardussi's greatest hits      >
I, Robot
iMovie Store Purchases       >
Pooty Tang
Star Wars Episode III
The Incredibles	

The items with the greater-than sign were folders, and the others were files. As with the Pictures folder, I wasn't going to do anything with these items other than just show and joke about them, with one exception: The Incredibles. All the folders and files were empty except for "The Incredibles". Inside that file, I put the following text:

The MPAA filterbot has detected the presence of unauthorized content. 
Local law enforcement authorities have been informed. Thank you for your cooperation.

Visit Universal Studios!

"The Incredibles" is, of course, this fall's new release from Pixar. After I finished setting up the Video folder, I moved on to the Telephone "feature". My idea for Telephone was to fill the folder with names of people, one per note, as if they were contacts. I put files into the Telephone folder like so:


Adam Engst Alaska Airlines Andrea Ammerman Asa Noriega David Shayer Jef Raskin Marshall Clow Nevin Liber

I intentionally listed Adam first because he had been talking earlier in the conference about how he's often listed first in cell phone address books and so gets more than his share of accidental I-forgot-to-lock-the-phone calls. By listing him first, I would help Adam prove his point - and earn another laugh, I hoped.

All the contacts were simply empty files, except one: Jef Raskin. For some reason, this year's conference included a never-ending series of jokes and comments about Jef, I decided to add Jef to my Super iPod and to actually call him there on stage when I was demonstrating my hack! Well, apparently.

What I really wanted, of course, was to display Jef's contact info, including phone numbers. Then, I would click a phone number, and the iPod would "dial". At that point, I would say something like "Well, it's late, and we really don't want to bother him right now", and I would press Menu to "hang up" the "phone". To dial convincingly, I wanted the iPod to play a series of DTMF tones. Asking Mr. Google for help, I quickly found a site that would turn any string of digits into the corresponding DTMF tones. I added the tone-song to my iTunes library, then moved it to the iPod. I then created Jef Raskin's contact note, like this:

Jef Raskin
1313 Mockingbird Lane
Palo Alto, CA 94030

home: <a href="song=raskin">650-555-8736</a> 
work: <a href="song=raskin">650-555-2947</a>
mobile: <a href="song=raskin">415-555-7799</a>

Notes

Likes fondue, old movies, and formal arguments.

As you can see, I wired up all three (fake) phone numbers to the DTMF file. When I selected any of the phone numbers, the tones would play, just as if the iPod were making a phone call. My Super iPod was ready. I was even lucky enough to borrow a brand-new 4G iPod for the demo from David Shayer, who also helped me get the hack up and running.

With my hack all set to go, I could enjoy the second night's keynote speech by Steve Hayman, an Apple engineer who works in Toronto. Steve's speech was fast-paced and funny, and filled with great hacks. Steve's best trick was using Apple Remote Desktop and a bit of script to make a line of PowerMac G4 Desktops in the next room repeatedly open and close their DVD trays. Steve and his able assistant Daryl Hawes even rigged an iSight camera and iChat to verify the remote tray antics. After Steve's session and the requisite hanging around and munching cold pizza, I turned in about 5:45 AM. Tomorrow was another day - well, actually it was the same day: Friday.

Day 3: What Day Is It? Can You Please Tell Me? What Day Is It? I'm Confused, You See...

Friday dawned bright and clear, probably. But I wasn't there to see it. I shuffled to my feet just before noon and headed down to, er, lunch. With my hack in the bag, I devoted Friday to socializing, attending sessions, and the inevitable road trip to Zingerman's, the incredible deli in Ann Arbor about 30 miles away. Zingerman's is a MacHack/ADHOC tradition. Long live potato knishes!

http://www.zingermans.com

As the hack showcase approached, I mentally went over my presentation. I concocted a story in which I claimed I found a strange iPod in the bushes at Apple after parking my car for a nearby restaurant. I started playing with the strange iPod, and...behold! Super iPod!

About 5 minutes before the show was supposed to start, I suddenly had an idea for something new to add. I had planned on "dialing" Jef Raskin and then bailing out of the "call". But I had a Belkin Voice Recorder for my iPod. I could use it to record "Jef's" answering machine, then play the recording after the DTMF tones. I ran out of the ballroom and found a quiet corner, where I recorded the message (got it in one take). I had just enough time to change Jef's contact file so that the second phone number was connected to the "answering machine message". All I had to do was select and press the second link - it would happen too fast for anyone to notice.

I got to demo Super iPod a little while later, and it went pretty well, although projecting the iPod's screen proved to be a challenge. Of course, the highlight was the fake answering machine, which proves an old adage about demos: the best part is the part you added right before the demo.

The show featured lots of great demos, as always, and I got to bed at the unusually early (for ADHOC) hour of 3:15 AM.

Day 4: 'Round Here We Stay Up Very, Very, Very, Very Late

Saturday is always the last day of the conference. There are fewer sessions to attend, so there's more catching up with old friends and general socializing. The day is capped by the awards banquet, with everyone anticipating both their own prize and the overall winner. I received the "ADHOC Prize in Women's Studies", apparently because in my session on writing books I jokingly claimed that being a technical book writer would help you get a date - be careful what you say at this conference. The actual winner was Jorg Brown for his wonderful Unsummarize, a Mac OS X service that takes a theme sentence or two and expands upon it, exactly the reverse of Summarize, which you'll find in your Services menu right now (it's in the Application menu). In the great spirit of ADHOC, Jorg was inspired by a comment David Pogue made during his keynote, wishing for a program just like Unsummarize, and Jorg put it together in less than 48 hours.

After the banquet, in another great ADHOC tradition, we all went to a nearby theatre to make fun of a new movie. This year's target was "I, Robot", and it certainly proved worthy. And after the movie, the attendees were treated to a lively movie discussion by Keith Stattenfield, star of "Keith Explains!", this year for the first time participating via iChat video conference. And then it was morning again, and time to go to sleep.

http://www.keithexplains.com

Day 5: Steal My Body Home!

Sunday morning features bleary-eyed attendees catching cabs and shuttles and returning to their regular lives. As I schlepped my bags to the taxi, I took a last look at the majestic lobby of the Holiday Inn Fairlane. It was another great time at MacHack, even though it's now called ADHOC. I knew I would give (almost) anything to be back next year at this most uniquely geeky conference.

Plus, on the way to the airport, I saw the World's Biggest Tire.


Scott Knaster writes books, including the recently published Mac Toys and the brand-new Hacking iPod and iTunes, both from Wiley Publishing. Scott can't read and listen to vocal music at the same time. Scott writes these little bios in the third person. Write to Scott at scottk@mactech.com.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Fresh From the Land Down Under – The Tou...
After a two week hiatus, we are back with another episode of The TouchArcade Show. Eli is fresh off his trip to Australia, which according to him is very similar to America but more upside down. Also kangaroos all over. Other topics this week... | Read more »
TouchArcade Game of the Week: ‘Dungeon T...
I’m a little conflicted on this week’s pick. Pretty much everyone knows the legend of Dungeon Raid, the match-3 RPG hybrid that took the world by storm way back in 2011. Everyone at the time was obsessed with it, but for whatever reason the... | Read more »
SwitchArcade Round-Up: Reviews Featuring...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for July 19th, 2024. In today’s article, we finish up the week with the unusual appearance of a review. I’ve spent my time with Hot Lap Racing, and I’m ready to give my verdict. After... | Read more »
Draknek Interview: Alan Hazelden on Thin...
Ever since I played my first release from Draknek & Friends years ago, I knew I wanted to sit down with Alan Hazelden and chat about the team, puzzle games, and much more. | Read more »
The Latest ‘Marvel Snap’ OTA Update Buff...
I don’t know about all of you, my fellow Marvel Snap (Free) players, but these days when I see a balance update I find myself clenching my… teeth and bracing for the impact to my decks. They’ve been pretty spicy of late, after all. How will the... | Read more »
‘Honkai Star Rail’ Version 2.4 “Finest D...
HoYoverse just announced the Honkai Star Rail (Free) version 2.4 “Finest Duel Under the Pristine Blue" update alongside a surprising collaboration. Honkai Star Rail 2.4 follows the 2.3 “Farewell, Penacony" update. Read about that here. | Read more »
‘Vampire Survivors+’ on Apple Arcade Wil...
Earlier this month, Apple revealed that poncle’s excellent Vampire Survivors+ () would be heading to Apple Arcade as a new App Store Great. I reached out to poncle to check in on the DLC for Vampire Survivors+ because only the first two DLCs were... | Read more »
Homerun Clash 2: Legends Derby opens for...
Since launching in 2018, Homerun Clash has performed admirably for HAEGIN, racking up 12 million players all eager to prove they could be the next baseball champions. Well, the title will soon be up for grabs again, as Homerun Clash 2: Legends... | Read more »
‘Neverness to Everness’ Is a Free To Pla...
Perfect World Games and Hotta Studio (Tower of Fantasy) announced a new free to play open world RPG in the form of Neverness to Everness a few days ago (via Gematsu). Neverness to Everness has an urban setting, and the two reveal trailers for it... | Read more »
Meditative Puzzler ‘Ouros’ Coming to iOS...
Ouros is a mediative puzzle game from developer Michael Kamm that launched on PC just a couple of months back, and today it has been revealed that the title is now heading to iOS and Android devices next month. Which is good news I say because this... | Read more »

Price Scanner via MacPrices.net

Amazon is still selling 16-inch MacBook Pros...
Prime Day in July is over, but Amazon is still selling 16-inch Apple MacBook Pros for $500-$600 off MSRP. Shipping is free. These are the lowest prices available this weekend for new 16″ Apple... Read more
Walmart continues to sell clearance 13-inch M...
Walmart continues to offer clearance, but new, Apple 13″ M1 MacBook Airs (8GB RAM, 256GB SSD) online for $699, $300 off original MSRP, in Space Gray, Silver, and Gold colors. These are new MacBooks... Read more
Apple is offering steep discounts, up to $600...
Apple has standard-configuration 16″ M3 Max MacBook Pros available, Certified Refurbished, starting at $2969 and ranging up to $600 off MSRP. Each model features a new outer case, shipping is free,... Read more
Save up to $480 with these 14-inch M3 Pro/M3...
Apple has 14″ M3 Pro and M3 Max MacBook Pros in stock today and available, Certified Refurbished, starting at $1699 and ranging up to $480 off MSRP. Each model features a new outer case, shipping is... Read more
Amazon has clearance 9th-generation WiFi iPad...
Amazon has Apple’s 9th generation 10.2″ WiFi iPads on sale for $80-$100 off MSRP, starting only $249. Their prices are the lowest available for new iPads anywhere: – 10″ 64GB WiFi iPad (Space Gray or... Read more
Apple is offering a $50 discount on 2nd-gener...
Apple has Certified Refurbished White and Midnight HomePods available for $249, Certified Refurbished. That’s $50 off MSRP and the lowest price currently available for a full-size Apple HomePod today... Read more
The latest MacBook Pro sale at Amazon: 16-inc...
Amazon is offering instant discounts on 16″ M3 Pro and 16″ M3 Max MacBook Pros ranging up to $400 off MSRP as part of their early July 4th sale. Shipping is free. These are the lowest prices... Read more
14-inch M3 Pro MacBook Pros with 36GB of RAM...
B&H Photo has 14″ M3 Pro MacBook Pros with 36GB of RAM and 512GB or 1TB SSDs in stock today and on sale for $200 off Apple’s MSRP, each including free 1-2 day shipping: – 14″ M3 Pro MacBook Pro (... Read more
14-inch M3 MacBook Pros with 16GB of RAM on s...
B&H Photo has 14″ M3 MacBook Pros with 16GB of RAM and 512GB or 1TB SSDs in stock today and on sale for $150-$200 off Apple’s MSRP, each including free 1-2 day shipping: – 14″ M3 MacBook Pro (... Read more
Amazon is offering $170-$200 discounts on new...
Amazon is offering a $170-$200 discount on every configuration and color of Apple’s M3-powered 15″ MacBook Airs. Prices start at $1129 for models with 8GB of RAM and 256GB of storage: – 15″ M3... Read more

Jobs Board

*Apple* Systems Engineer - Chenega Corporati...
…LLC,** a **Chenega Professional Services** ' company, is looking for a ** Apple Systems Engineer** to support the Information Technology Operations and Maintenance Read more
Solutions Engineer - *Apple* - SHI (United...
**Job Summary** An Apple Solution Engineer's primary role is tosupport SHI customers in their efforts to select, deploy, and manage Apple operating systems and Read more
*Apple* / Mac Administrator - JAMF Pro - Ame...
Amentum is seeking an ** Apple / Mac Administrator - JAMF Pro** to provide support with the Apple Ecosystem to include hardware and software to join our team and Read more
Operations Associate - *Apple* Blossom Mall...
Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.