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

Dropbox 193.4.5594 - Cloud backup and sy...
Dropbox is a file hosting service that provides cloud storage, file synchronization, personal cloud, and client software. It is a modern workspace that allows you to get to all of your files, manage... Read more
Google Chrome 122.0.6261.57 - Modern and...
Google Chrome is a Web browser by Google, created to be a modern platform for Web pages and applications. It utilizes very fast loading of Web pages and has a V8 engine, which is a custom built... Read more
Skype 8.113.0.210 - Voice-over-internet...
Skype is a telecommunications app that provides HD video calls, instant messaging, calling to any phone number or landline, and Skype for Business for productive cooperation on the projects. This... Read more
Tor Browser 13.0.10 - Anonymize Web brow...
Using Tor Browser you can protect yourself against tracking, surveillance, and censorship. Tor was originally designed, implemented, and deployed as a third-generation onion-routing project of the U.... Read more
Deeper 3.0.4 - Enable hidden features in...
Deeper is a personalization utility for macOS which allows you to enable and disable the hidden functions of the Finder, Dock, QuickTime, Safari, iTunes, login window, Spotlight, and many of Apple's... Read more
OnyX 4.5.5 - Maintenance and optimizatio...
OnyX is a multifunction utility that you can use to verify the startup disk and the structure of its system files, to run miscellaneous maintenance and cleaning tasks, to configure parameters in the... Read more
Hopper Disassembler 5.14.1 - Binary disa...
Hopper Disassembler is a binary disassembler, decompiler, and debugger for 32- and 64-bit executables. It will let you disassemble any binary you want, and provide you all the information about its... Read more

Latest Forum Discussions

See All

Zenless Zone Zero opens entries for its...
miHoYo, aka HoYoverse, has become such a big name in mobile gaming that it's hard to believe that arguably their flagship title, Genshin Impact, is only three and a half years old. Now, they continue the road to the next title in their world, with... | Read more »
Live, Playdate, Live! – The TouchArcade...
In this week’s episode of The TouchArcade Show we kick things off by talking about all the games I splurged on during the recent Playdate Catalog one-year anniversary sale, including the new Lucas Pope jam Mars After Midnight. We haven’t played any... | Read more »
TouchArcade Game of the Week: ‘Vroomies’
So here’s a thing: Vroomies from developer Alex Taber aka Unordered Games is the Game of the Week! Except… Vroomies came out an entire month ago. It wasn’t on my radar until this week, which is why I included it in our weekly new games round-up, but... | Read more »
SwitchArcade Round-Up: ‘MLB The Show 24’...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for March 15th, 2024. We’re closing out the week with a bunch of new games, with Sony’s baseball franchise MLB The Show up to bat yet again. There are several other interesting games to... | Read more »
Steam Deck Weekly: WWE 2K24 and Summerho...
Welcome to this week’s edition of the Steam Deck Weekly. The busy season has begun with games we’ve been looking forward to playing including Dragon’s Dogma 2, Horizon Forbidden West Complete Edition, and also console exclusives like Rise of the... | Read more »
Steam Spring Sale 2024 – The 10 Best Ste...
The Steam Spring Sale 2024 began last night, and while it isn’t as big of a deal as say the Steam Winter Sale, you may as well take advantage of it to save money on some games you were planning to buy. I obviously recommend checking out your own... | Read more »
New ‘SaGa Emerald Beyond’ Gameplay Showc...
Last month, Square Enix posted a Let’s Play video featuring SaGa Localization Director Neil Broadley who showcased the worlds, companions, and more from the upcoming and highly-anticipated RPG SaGa Emerald Beyond. | Read more »
Choose Your Side in the Latest ‘Marvel S...
Last month, Marvel Snap (Free) held its very first “imbalance" event in honor of Valentine’s Day. For a limited time, certain well-known couples were given special boosts when conditions were right. It must have gone over well, because we’ve got a... | Read more »
Warframe welcomes the arrival of a new s...
As a Warframe player one of the best things about it launching on iOS, despite it being arguably the best way to play the game if you have a controller, is that I can now be paid to talk about it. To whit, we are gearing up to receive the first... | Read more »
Apple Arcade Weekly Round-Up: Updates an...
Following the new releases earlier in the month and April 2024’s games being revealed by Apple, this week has seen some notable game updates and events go live for Apple Arcade. What The Golf? has an April Fool’s Day celebration event going live “... | Read more »

Price Scanner via MacPrices.net

Apple Education is offering $100 discounts on...
If you’re a student, teacher, or staff member at any educational institution, you can use your .edu email address when ordering at Apple Education to take $100 off the price of a new M3 MacBook Air.... Read more
Apple Watch Ultra 2 with Blood Oxygen feature...
Best Buy is offering Apple Watch Ultra 2 models for $50 off MSRP on their online store this week. Sale prices available for online orders only, in-store prices may vary. Order online, and choose... Read more
New promo at Sams Club: Apple HomePods for $2...
Sams Club has Apple HomePods on sale for $259 through March 31, 2024. Their price is $40 off Apple’s MSRP, and both Space Gray and White colors are available. Sale price is for online orders only, in... Read more
Get Apple’s 2nd generation Apple Pencil for $...
Apple’s Pencil (2nd generation) works with the 12″ iPad Pro (3rd, 4th, 5th, and 6th generation), 11″ iPad Pro (1st, 2nd, 3rd, and 4th generation), iPad Air (4th and 5th generation), and iPad mini (... Read more
10th generation Apple iPads on sale for $100...
Best Buy has Apple’s 10th-generation WiFi iPads back on sale for $100 off MSRP on their online store, starting at only $349. With the discount, Best Buy’s prices are the lowest currently available... Read more
iPad Airs on sale again starting at $449 on B...
Best Buy has 10.9″ M1 WiFi iPad Airs on record-low sale prices again for $150 off Apple’s MSRP, starting at $449. Sale prices for online orders only, in-store price may vary. Order online, and choose... Read more
Best Buy is blowing out clearance 13-inch M1...
Best Buy is blowing out clearance Apple 13″ M1 MacBook Airs this weekend for only $649.99, or $350 off Apple’s original MSRP. Sale prices for online orders only, in-store prices may vary. Order... Read more
Low price alert! You can now get a 13-inch M1...
Walmart has, for the first time, begun offering new Apple MacBooks for sale on their online store, albeit clearance previous-generation models. They now have the 13″ M1 MacBook Air (8GB RAM, 256GB... Read more
Best Apple MacBook deal this weekend: Get the...
Apple has 13″ M2 MacBook Airs available for only $849 today in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty is included,... Read more
New 15-inch M3 MacBook Air (Midnight) on sale...
Amazon has the new 15″ M3 MacBook Air (8GB RAM/256GB SSD/Midnight) in stock and on sale today for $1249.99 including free shipping. Their price is $50 off MSRP, and it’s the lowest price currently... Read more

Jobs Board

Early Preschool Teacher - Glenda Drive/ *Appl...
Early Preschool Teacher - Glenda Drive/ Apple ValleyTeacher Share by Email Share on LinkedIn Share on Twitter Read more
Senior Software Engineer - *Apple* Fundamen...
…center of Microsoft's efforts to empower our users to do more. The Apple Fundamentals team focused on defining and improving the end-to-end developer experience in Read more
Relationship Banker *Apple* Valley Main - W...
…Alcohol Policy to learn more. **Company:** WELLS FARGO BANK **Req Number:** R-350696 **Updated:** Mon Mar 11 00:00:00 UTC 2024 **Location:** APPLE VALLEY,California Read more
Medical Assistant - Surgical Oncology- *Apple...
Medical Assistant - Surgical Oncology- Apple Hill WellSpan Medical Group, York, PA | Nursing | Nursing Support | FTE: 1 | Regular | Tracking Code: 200555 Apply Now Read more
Early Preschool Teacher - Glenda Drive/ *Appl...
Early Preschool Teacher - Glenda Drive/ Apple ValleyTeacher Share by Email Share on LinkedIn Share on Twitter Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.