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

Summon your guild and prepare for war in...
Netmarble is making some pretty big moves with their latest update for Seven Knights Idle Adventure, with a bunch of interesting additions. Two new heroes enter the battle, there are events and bosses abound, and perhaps most interesting, a huge... | Read more »
Make the passage of time your plaything...
While some of us are still waiting for a chance to get our hands on Ash Prime - yes, don’t remind me I could currently buy him this month I’m barely hanging on - Digital Extremes has announced its next anticipated Prime Form for Warframe. Starting... | Read more »
If you can find it and fit through the d...
The holy trinity of amazing company names have come together, to release their equally amazing and adorable mobile game, Hamster Inn. Published by HyperBeard Games, and co-developed by Mum Not Proud and Little Sasquatch Studios, it's time to... | Read more »
Amikin Survival opens for pre-orders on...
Join me on the wonderful trip down the inspiration rabbit hole; much as Palworld seemingly “borrowed” many aspects from the hit Pokemon franchise, it is time for the heavily armed animal survival to also spawn some illegitimate children as Helio... | Read more »
PUBG Mobile teams up with global phenome...
Since launching in 2019, SpyxFamily has exploded to damn near catastrophic popularity, so it was only a matter of time before a mobile game snapped up a collaboration. Enter PUBG Mobile. Until May 12th, players will be able to collect a host of... | Read more »
Embark into the frozen tundra of certain...
Chucklefish, developers of hit action-adventure sandbox game Starbound and owner of one of the cutest logos in gaming, has released their roguelike deck-builder Wildfrost. Created alongside developers Gaziter and Deadpan Games, Wildfrost will... | Read more »
MoreFun Studios has announced Season 4,...
Tension has escalated in the ever-volatile world of Arena Breakout, as your old pal Randall Fisher and bosses Fred and Perrero continue to lob insults and explosives at each other, bringing us to a new phase of warfare. Season 4, Into The Fog of... | Read more »
Top Mobile Game Discounts
Every day, we pick out a curated list of the best mobile discounts on the App Store and post them here. This list won't be comprehensive, but it every game on it is recommended. Feel free to check out the coverage we did on them in the links below... | Read more »
Marvel Future Fight celebrates nine year...
Announced alongside an advertising image I can only assume was aimed squarely at myself with the prominent Deadpool and Odin featured on it, Netmarble has revealed their celebrations for the 9th anniversary of Marvel Future Fight. The Countdown... | Read more »
HoYoFair 2024 prepares to showcase over...
To say Genshin Impact took the world by storm when it was released would be an understatement. However, I think the most surprising part of the launch was just how much further it went than gaming. There have been concerts, art shows, massive... | Read more »

Price Scanner via MacPrices.net

Amazon is offering a $100 discount on every M...
Amazon is offering a $100 instant discount on each configuration of Apple’s new 13″ M3 MacBook Air, in Midnight, this weekend. These are the lowest prices currently available for new 13″ M3 MacBook... Read more
You can save $300-$480 on a 14-inch M3 Pro/Ma...
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
24-inch M1 iMacs available at Apple starting...
Apple has clearance M1 iMacs available in their Certified Refurbished store starting at $1049 and ranging up to $300 off original MSRP. Each iMac is in like-new condition and comes with Apple’s... Read more
Walmart continues to offer $699 13-inch M1 Ma...
Walmart continues to offer 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 MacBook for sale by... Read more
B&H has 13-inch M2 MacBook Airs with 16GB...
B&H Photo has 13″ MacBook Airs with M2 CPUs, 16GB of memory, and 256GB of storage in stock and on sale for $1099, $100 off Apple’s MSRP for this configuration. Free 1-2 day delivery is available... Read more
14-inch M3 MacBook Pro with 16GB of RAM avail...
Apple has the 14″ M3 MacBook Pro with 16GB of RAM and 1TB of storage, Certified Refurbished, available for $300 off MSRP. Each MacBook Pro features a new outer case, shipping is free, and an Apple 1-... Read more
Apple M2 Mac minis on sale for up to $150 off...
Amazon has Apple’s M2-powered Mac minis in stock and on sale for $100-$150 off MSRP, each including free delivery: – Mac mini M2/256GB SSD: $499, save $100 – Mac mini M2/512GB SSD: $699, save $100 –... Read more
Amazon is offering a $200 discount on 14-inch...
Amazon has 14-inch M3 MacBook Pros in stock and on sale for $200 off MSRP. Shipping is free. Note that Amazon’s stock tends to come and go: – 14″ M3 MacBook Pro (8GB RAM/512GB SSD): $1399.99, $200... Read more
Sunday Sale: 13-inch M3 MacBook Air for $999,...
Several Apple retailers have the new 13″ MacBook Air with an M3 CPU in stock and on sale today for only $999 in Midnight. These are the lowest prices currently available for new 13″ M3 MacBook Airs... Read more
Multiple Apple retailers are offering 13-inch...
Several Apple retailers have 13″ MacBook Airs with M2 CPUs in stock and on sale this weekend starting at only $849 in Space Gray, Silver, Starlight, and Midnight colors. These are the lowest prices... Read more

Jobs Board

Relationship Banker - *Apple* Valley Financ...
Relationship Banker - Apple Valley Financial Center APPLE VALLEY, Minnesota **Job Description:** At Bank of America, we are guided by a common purpose to help Read more
IN6728 Optometrist- *Apple* Valley, CA- Tar...
Date: Apr 9, 2024 Brand: Target Optical Location: Apple Valley, CA, US, 92308 **Requisition ID:** 824398 At Target Optical, we help people see and look great - and Read more
Medical Assistant - Orthopedics *Apple* Hil...
Medical Assistant - Orthopedics Apple Hill York Location: WellSpan Medical Group, York, PA Schedule: Full Time Sign-On Bonus Eligible Remote/Hybrid Regular Apply Now Read more
*Apple* Systems Administrator - JAMF - Activ...
…**Public Trust/Other Required:** None **Job Family:** Systems Administration **Skills:** Apple Platforms,Computer Servers,Jamf Pro **Experience:** 3 + years of Read more
Liquor Stock Clerk - S. *Apple* St. - Idaho...
Liquor Stock Clerk - S. Apple St. Boise Posting Begin Date: 2023/10/10 Posting End Date: 2024/10/14 Category: Retail Sub Category: Customer Service Work Type: Part Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.