Last night (Christmas Eve) my niece Sara Jones ( @cindersara ) opened a present from her long-time boyfriend, Jake Goss ( @trendge ). She was happy to see an iPod Touch. What she didn’t know (but ours and Jake’s entire families did) was Jake had the iPod engraved with a question.

Will you marry me?

Romantic little shit. :-)

Funnier than her initial reaction is poor Jake was left hanging for an answer for quite awhile before someone reminded her an answer was pending. It was, over all, a very geeky proposal. I like this kid already. Video below.

Congratulations, Sara and Jake. I wish you all the best.

 

Several people have asked me privately to let them know when the book comes out. It seems e-mail is the preferred method for those who (for reasons I can’t possibly fathom) don’t feel like keeping up with the Social Web. So I created a mailing list for the Xcode 4 Book site.

For those who want details: I used Mail Chimp to create and manage the list. Since I’m using WordPress 3, I downloaded the sign-up list plug-in supplied by Mail Chimp. I don’t plan to send frequent updates, only major news (like the release of the book or a new edition, etc.). Of course unsubscribing is an option. :-)

 

Back in September I bought a nicely-loaded Nissan Rogue. It came with XM Radio built in with a 3-month trial subscription to their programming and their traffic reporting system. I listened. Meh, I suppose it’s alright. The traffic report? Only a few major highways show information and it’s never up to date. Then the end of the trial period neared. That’s really where the trouble began. If you want the gory details, read on. Otherwise, here’s the verdict: run the fuck away.

On December 15, after a week of calls from XM that I didn’t take, I finally decided to answer and let them know I wouldn’t be signing up for a paid account – I didn’t think the service was worth the money. The rep was very friendly and offered me 6 months at $4 per month, after which time it would go back to full price. I thought “what the hell?” and said as much. He charged me about $33 that day and I considered the matter closed.

Tonight, December 22, I received another call from XM. They wanted to know if I wanted to sign up for a paid account, that my trial period was ending in the beginning of January.

Uh … what?

I explained what had occurred on the 15th. He said the money had been refunded because I called in and cancelled. “I cancelled the subscription that didn’t exist until I paid you to start it on the day you say I cancelled?”

“Yes,” he replied. “You were going to call back in with a payment for your service.”

“What? First, I never called and cancelled – that was the same day I agreed to continue service for six months. Second, why would I be expected to call back in with a payment for service when you refunded my money for supposedly canceling?”

He typed and typed. Nothing intelligible for fully a minute. “Hello?”

“Please wait one moment, sir.”

I then asked what about the six months at a reduced rate. He very politically disavowed any knowledge of such an offer.

“Okay, let’s just get a supervisor on the phone. Something weird is going on and I don’t think we’re getting anywhere here.”

I’m placed on hold for a supervisor. Ten minutes go by before I arrived at the house. I hung up so I could carry stuff and get into the house. Annoyed, I called back, gave a very brief run-down of the odd happening and unsatisfactory call with the other guy, then asked if I could please speak to a supervisor now, without any more delay.

He kept insisting that I explain everything again so he could help me. I kept insisting on speaking to a supervisor. When he finally relented, I sat on hold for twenty-five minutes this time before hanging up.

I’ve just filed a detailed complaint with the local Better Business Bureau.

I have no patience for incompetence, no tolerance for shitty customer service, and that goes double for services I feel lukewarm about to begin with. They won me over initially into signing on for awhile. I might’ve continued if I found more content I liked. With this experience, however, they’ve guaranteed I’ll never do business with them again.

Wish I could remove the XM button from my system or reprogram it to do something more useful…

 

I decided to create a separate site for posting news, errata, examples, etc. for the Xcode book titled Develop Apps with Xcode 4, which I’m writing for Peachpit Press. You can see it at xcodebook.com and follow the Twitter account @xcodebook.

I did this so that I could keep more personal announcements or commentary here on my own site while maintaining some semblance of professionalism on the book’s site. I’ll still mention the book here but for every incremental little piece of news, I’d suggest following @xcodebook or the RSS feed at xcodebook.com.

 

It’s been about a month and a half since I announced I’m writing an Xcode 4 book for Peachpit Press. I thought I’d give a little status update for those who keep asking me about it – something more substantial than “I’m writing as fast as I can, you damn vultures!” :-)

Where Am I?

I’m very rapidly approaching the half-way point of the raw production work. That means the pure writing-and-creating-screenshots stage is almost half-way done. Of course there is the technical review and editing part and probably a bit of last-minute worriment and trouble as there always is with any reasonably-sized project. The basic cover design is already decided but I haven’t seen any of the actual layout of the content yet. It’s well on its way to being a book and now almost as long as one of my average e-mails or telephone conversations.

Wait, What?

A very comical – but thankfully very brief – misunderstanding arose last week. Born of the inadequacies of e-mail, speed-reading, and my own inevitable insecurity over doing something new, I nearly had the rare trifecta of heart attack, stroke, and aneurism. True multitasking, folks.

Cliff (the executive editor) told me he’s actually a little worried. Kim, my book editor says I’m a pleasure to work with. He immediately followed that sentence with, “you’re not trying hard enough.

In a rare moment of abject horror, my mind raced with questions like, “Why didn’t you tell me sooner?” and “What specifically is wrong?” Hoping for some clue, I re-read the paragraph. Then I got the joke. We’d been joking back and forth that, due to my often R-rated sense of humor I’m trying to scare Kim away. He was worried about me because, due to Kim’s compliment, I wasn’t trying hard enough to scare her away.

Yes, I’m still laughing thinking about it. Cliff seemed somewhat aghast to have caused such grief but to my credit he could see how I would’ve misread it at first. He assured me I’m doing fine, so I’m relieved. I’m also mildly amused that Cliff seemed to feel a little bad about actually paying me a compliment. That’ll teach’im. :-)

Faster, Damn You!

That said, I am a little behind schedule in the strictest “this chapter is due on this date” sense but some chapters are longer than others so there’s no worry so far. One earlier chapter remains incomplete due at first to the Xcode beta not cooperating and now due to just finding the time to get back to it and finish it. Another chapter caused difficulties initially because of beta issues but grew to “do I want to introduce this now or later?” and “is this basic or advanced stuff?” Decisions, decisions. Then I was sick as hell for half a week.

Conclusion (or Wrapping Up if You’re Kim)

So it’s coming along. I’m looking forward to concluding/wrapping up the book and unleashing it unto the very supportive Cocoa community. Sadly it’s time I can’t spend developing Lamp.app, my desktop answer to all the Flashlight iOS apps out there.

If you’re wondering about the conclusion/wrapping up thing, it was the one thing Kim and I actually punted back and forth over. Lacking imagination, my first chapter concluded with a section titled “Conclusion.” She felt it sounded a bit too formal (she used the phrase “high-school essay”). She suggested “Wrapping Up” or something “fun.” Now I would personally have loved to make the book funny-bordering-on-ridiculous a la the For Dummies series. After all, most of my blog posts and e-mail responses – even at work – tend toward “smart ass,” but after trying to choose a funny title, I decided overt comedy would be too a hard sell. I settled for her first choice so that I could blame her for it later.

I’ll try to keep you all updated on the latest. There’s something hilariously conceited about writing about my writing. The Cocoa community doesn’t need another Gemmell to play up the hero worship role but perhaps it could use a conceited prick of an author. There’re plenty of candidates but he who shouts loudest …

 

A brief tweet to Drew McCormack finally gave me my first Mac App Store idea. Read on for the great reveal.

The (iOS) App Store’s flashlight app market has already been saturated. Now with the iPhone 4′s built-in LED camera light, the paid updates for the new flashlight features have milked that market dry. So what’s my ground-breaking idea that will mirror the mobile market’s success? We think you’re going to love it. I mean I think you’re going to love it.

Ladies and gentlemen, meet Lamp.app.

The All New Lamp App

Lamp.app in Action

1.0 Features

  • Full-screen mode
  • Brightness control
  • Automatic power-save mode
  • Choice of colors (white shown)

Planned Features

  • In-app purchases for a variety of lamp shades (with thanks to @dunk for the idea)
  • Emergency Road Beacon (laptops only)
  • Clock and weather (additional in-app purchase)

Availability

Available soon from the Mac App Store for just $9.99, you lucky, lucky bastards!

Secret built-in tethering not included.


Note to fellow devs: Yes, I did reserve “Lamp” in the MAS. Just to be a dick :-)

 

Now that contractual matters are settled and I’m finishing up the first chapter, I can finally announce my good news. Drumroll, please. I’m writing a book on the up-coming Xcode 4 for Peachpit Press. Yay!

Awhile back, Duncan Campbell asked Twitter if anyone was interested in writing a book on iPhone development or using Xcode (to paraphrase). Duncan has a few books out via Peachpit. I had been thinking about writing Cocoa-related books for the last couple of years but shelved the idea – pun most certainly intended. Self-publishing wasn’t a very attractive option to me because of the time and resources it would take to market it properly. Cut to present (with my thanks to Duncan and Cliff) and it’s now official.

- girlie squeal of excitement -

I’ll leave the details for later but I thought I’d share the title I selected: A One-Night Stand with Xcode 4: Sure it LOOKS clean, but how well do you really know it?

Now I’ll share the actual title kicked back and forth between Peachpit’s marketing team, Cliff, and myself: Develop Apps with Xcode 4: Use Apple’s development tools to start writing iOS and Mac OS applications

It’s just as verbose but not nearly STD-related enough for my tastes. C’est la vie.

It turns out giving a technical book a good title is rather difficult. As any blogger who reads blogs by bloggers who blog about effective blogging knows, titles and summaries should be search-engine-friendly in addition to being well-focused (and ideally with a call to action). All the titles I could think of were shaded by all the popular “series” action phrases like “jump into” and “teach yourself.” I am dutifully ashamed. I trust Peachpit’s marketing team over my own smart ass any day.

Runners up were Xcode 4: The Book, Bob: The Xcode 4 Book, and so on.

I’m already off to a good start and look forward to gaining a following of millions of Xcode 4 minions by second quarter of 2011.

 

There was a great question on Stack Overflow today about how to catch media key events (such as play/pause or seek forward/backward) in your own app. I thought I’d post the solution I use in Transcriva.

My approach (which may not be the only or best approach) was to subclass NSApplication and catch calls to -sendEvent: (through which keyboard events, among other kinds, are sent). If the event is a media key press, I translate it to the appropriate action call to my app delegate.

The complete (relevant) code listing:

#import <IOKit/hidsystem/ev_keymap.h>

- (void)sendEvent:(NSEvent *)event

{

    // Catch media key events

    if ([event type] == NSSystemDefined && [event subtype] == 8)

    {

        int keyCode = (([event data1] & 0xFFFF0000) >> 16);

        int keyFlags = ([event data1] & 0x0000FFFF);

        int keyState = (((keyFlags & 0xFF00) >> 8)) == 0xA;

        // Process the media key event and return

        [self mediaKeyEvent:keyCode state:keyState];

        return;

    }

    // Continue on to super

    [super sendEvent:event];

}

- (void)mediaKeyEvent:(int)key state:(BOOL)state

{

    switch (key)

    {

        // Play pressed

        case NX_KEYTYPE_PLAY:

            if (state == NO)

                [(TSAppController *)[self delegate] togglePlayPause:self];

            break;

        // Rewind

        case NX_KEYTYPE_FAST:

            if (state == YES)

                [(TSAppController *)[self delegate] seekForward:self];

            break;

        // Previous

        case NX_KEYTYPE_REWIND:

            if (state == YES)

                [(TSAppController *)[self delegate] seekBack:self];

            break;

    }

}

Just remember to set your app’s principal class to your new NSApplication subclass (see below) and implement the -togglePlayPause:, -seekForward:, and -seekBack: actions in your app delegate (and make sure you have an app delegate).

Setting Your App's Principal Class

Setting Your App's Principal Class

© 2011 Joshua NozziJoshua Nozzi is a Cocoa developer for hire.Suffusion theme by Sayontan Sinha