Monday, May 07, 2007

Air Tunes + Alarm Clock = Trouble

Occasionally, someone asks me about waking up to music on their Airport Express connected speakers using Air Tunes. Is this something you can add to Alarm Clock?

As I'm sure most people already know, Alarm Clock does not depend on iTunes to play it's music in the morning. This is one of those features that makes Alarm Clock stand out from the rest, and gives it rock solid stability. For more information on why it's important that an alarm clock application not depend on iTunes, check out my FAQ, question #2.
http://www.robbiehanson.com/alarmclock/faq.html

Now, concerning Air Tunes:

Unfortunately, the API to play music wirelessly over Airport Express is kept secret by Apple. In other words, they have decided to use the functionality only within iTunes, and not allow 3rd party developers to use the technology. So, for the time being, this is not a built-in feature of Alarm Clock.

However, this is one of those features that may not actually be a good idea for an alarm clock. Sending the music wirelessly to a set of speakers adds a degree of uncertainty. If another computer is connected to the speakers, it will fail. If the network has problems, it will fail. If there is some kind of radio interference, it will fail. These are all problems you won't see if you use your built-in speakers, or a set of speakers that are hardwired to your computer. Also, many people who use Air Tunes (maybe not you, but many other users) have their Airport Express connected to a home theater system. This also means that before you go to bed you have to make sure to switch your audio receiver from TV or DVD over to the correct setting to allow music from your computer to play. A problem that most users never have to worry about when using a set of speakers dedicated to their computer.

Now, it may be possible for Alarm Clock to recover from some of the above scenarios. If the connection to the speakers fails, it could just play the audio on the built-in speakers. But herein lies the problem. Anybody who would go through all the extra trouble and effort to configure their alarm clock to play to another set of speakers wirelessly probably has a reason to do so. And that reason is probably because their computer speakers aren't loud enough to wake them up, or their computer is in another room, and too far away to be loud in the bedroom. So if the Air Tunes failed in either of the above scenarios, it means disaster for the user. If the computer isn't in your bedroom, or doesn't have built-in or attached speakers loud enough to wake you up, it's probably not a good idea to use it as an alarm clock anyway. (And then there are those users who would use the feature just because of the cool factor...)

So even if Apple decided to make public the API to use Air Tunes, I would have to think long and hard before implementing it in Alarm Clock. In many aspects, it's like giving users a gun to shoot themselves in the foot with. There are many other software alarm clocks on the market that put the importance of features far and above stability and dependability. Alarm Clock 2 is not one of them.

I should point out that there IS an application on the market that will allow you to use Alarm Clock and have the audio play wirelessly via Air Tunes. The product is called Airfoil, and you can find out more about it here:
http://www.rogueamoeba.com/airfoil/mac/

But please remember that Apple's API is still private. Which means that this application works because they've managed to hack Apple's API (as far as I know). If Apple decides to change anything in the future, this product may stop working. And then there are all the other problems with playing music wirelessly that I pointed out above.

As always, I'm welcome to criticism. So if you disagree with anything I said, or you just have a different perspective about something, feel free to let me know.

Monday, February 05, 2007

Alarm Clock Tips

I've had several users email me recently with similar stories. They have a laptop, but they keep their giant music collection on an external drive somewhere. The problem is, they like to bring their laptop into their bedroom to use as an alarm clock, but it's a hassle to bring the external drive too. (Very understandable in my opinion...who wouldn't prefer to slowly awake to their favorite tunes over a blaring, annoying alarm clock.)

There's a very elegant solution to this. Starting with iTunes version 7, Apple introduced support for multiple iTunes libraries built right into the application. If you hold down the option key while launching iTunes, you'll be prompted with the following dialog box:



The idea here is to create a seperate iTunes library just for the alarm clock application that only contains songs on the internal hard drive. If we click "Create Library..." we can do just this. Just give the library a name:



Now you've got an empty iTunes library. Just add any songs you want that are on your built-in hard drive.



After you do this, you can quit iTunes, and relaunch holding down the option key. Then pick your original library (most likely in ~/Music/iTunes/) and you're back to your regular iTunes library.

The final step is simply to instruct Alarm Clock to use this new library that you just created. Quit the Alarm Clock application. Open up your terminal. And type in the following command:

defaults write com.digitallity.alarmclock2 'XMLPath' '/Users/robbie/Music/iTunes (AlarmClock)/iTunes Library.xml'

Replacing the last part of the command with the proper path on your machine. For more information about this tip, see my FAQ page, question number 9.

Happy Anniversary

Today was Super Bowl Sunday here in the US. This is the day when all Americans crowd around the TV and watch the championship game of "football." But for me it represents the beginning of the Alarm Clock application.

Last year I was watching the Super Bowl (and browsing the web) when I noticed that my Alarm Clock application was featured on MacBytes.com. At the time I was hosting the application on an old Linux box I had sitting in my apartment. Our Internet connection came to a screeching halt as thousands of people starting downloading the application. I had to scramble to find a web host, and that night robbiehanson.com was born.

It's been around a year since then, and the Alarm Clock application has grown and matured. It has been downloaded around 300,000 times. It's available in 16 different languages. And today it's on the front page of Apple Downloads (#5 in the iPod + iTunes category).

I'd like to thank everyone who has sent me donations, and those who have contributed by providing localizations or sending feedback.

By no means am I done developing this software. I continue to have new ideas on how to improve it, and I continually get feedback and suggestions via email and this blog which helps me improve the application.

Monday, January 29, 2007

Version 2.4.1 released

A while back I mentioned a known bug in Alarm Clock that had been really bothering me. The problem occured when the application attempted to play a song that was protected, and the user wasn't authorized to play it. When this happened, QuickTime would pop up a dialog box prompting the user to authenticate, and the alarm would fail to play. Granted this happens very rarely, and probably only affected a few users, but the fact that it might bother even 1 user is enough to keep me up all night working on it.

Well I'm proud to announce that I found a solution for it, and this is no longer a problem as of version 2.4.1. In fact, I tested this problem on my main 2 competitors' apps, and both of them failed. So it looks like I may be the first alarm clock app to solve this little dilemma.

And while the above paragraph might sound like I'm tooting my own horn, my biggest goal is to improve the overall reliability of software alarm clocks. Not simply mine, but all software alarm clocks, especially on the Mac platform. After all, the reason I made my own alarm clock in the first place is because I wasn't satisfied with the reliability of other products on the market. And I'm guessing that my competitors probably read this blog, so this will help motivate them to solve the problem in their own software, giving all of us (no matter what product we use) a more reliable application.

And the other fix I made is a little embarrassing.
I somehow forgot (or deleted it at the last second) the CFBundleName key in the info.plist file of the application. Generally this isn't a big deal at all, except that the Sparkle (auto update) framework relies on this key to function properly. So the auto update feature in version 2.4 is broken. So users will be notified there's an update, and they'll have a button that says "download and install"...except it won't work! The download will work fine, but it will fail to properly install the application! And so users will be left with a broken application on their computer! Oops! (ouch).

Well I've fixed the problem, but users will have to manually download version 2.4.1 from my website.
When they're notified that there's a new version available, the release notes tell the user that the auto update feature is broken, and it provides the user with a link to directly download the file.

My apologies for this goofup! The auto update feature should work flawlessly in the future.

Sunday, January 28, 2007

Version 2.4 released

I've had a lot of spare time recently to work on the alarm clock. Why have I had so much spare time? Because an ice storm hit the city that I live in and knocked out power for nearly the entire city. My apartment lost power as well, and it took 2 weeks to get it back! I spent those 2 weeks at my parents house, and at my girlfriend's parents house. There wasn't a whole lot to do of course, so I sat around and coded.

During this time I managed to add 2 new features to the alarm clock that I've been wanting to do for a long time, but have been putting off for some reason. The first thing I did was give the application a proper preferences panel. A standard one with buttons at the top, like this:


The second feature (which is a bit obvious from the image above) is automatic software updates. I've been meaning to get around to this for so long, but never got the chance. Well now it's implemented. In the future, when updates are released, users will automatically be notified, and the downloads can be downloaded and installed with a few clicks!

Sunday, November 26, 2006

Speaking of cell phone alarms...

In my last post I talked about the hideous horrible problem with the alarm clock on the motorola razr. But know I'd like to talk about something else regarding cell phone alarms.

My girlfriend uses her cell phone to wake up every morning. Now, I have to go off on a tangent for a second to explain why she uses her cell phone. She doesn't have a Mac, first of all, so she can't use my application. She'll probably get a Mac when she gets a new computer, but she can't exactly afford to buy a computer right now. She has a regular alarm clock by her bed, and she doesn't use it. I asked her why once, and she told that it was too loud first of all. And second of all, the genious manufacturers put the tiny snooze button right next to the tiny stop button, so when she tries to hit snooze in her sleep, she ends up hitting the stop button half the time. Thus she uses her cell phone.

Now every night as we're lying in bed, I sit there and watch her set her alarm. She'll go to the alarm menu, and then she'll find the alarm named 'School'. She looks at it for a second, and then decides that she wants to use this alarm, but she's not sure what time it's set for. So she has to go into it's settings and double-check what time it is. Every night she double-checks it's time, even if she's not changing it from the night before. When I ask her why, she says that she feels more confident if she see's the actual alarm time. If she just sees the word 'School' she doesn't know if it 's set to let her sleep in, or get her up early, etc.

Now for the love of me, I don't know why she even uses a name for her alarms. She could save herself some time every single night, if she would just stop naming her alarms. But the fact that the alarm gives her the option of setting a name is enough to convince her that she should name them ALL...

Now I get a lot of feature requests for Alarm Clock 2. And one of the common requests is to name the alarms. This way when people click on the alarm clock icon, they can see a name for their alarm, and not simply the time. I have not implemented this feature. I hope this gives you an idea of why...

Tuesday, November 14, 2006

Alarm Clock vs Motorola Razr

I had a test this morning, and I needed to study for it. Actually, I needed to study for it really bad, so I had to pull an all nighter. Well, at least I tried to pull an all nighter, but I got really tired at like 4 in the morning. So I decided to take a quick nap. Give myself an hour of sleep to refresh, and then get back to studying. So I set an alarm for 5 AM on my computer and laid down. But while I was laying in bed, I decided that a second alarm would be nice. Configure this second alarm to go off at 5:05 just to annoy me out of bed, because I know I'll jump up and hit snooze on my computer alarm right at 5. A second alarm might force me up sooner. And my motorola razr phone was sitting right next to my bed, so I grabbed it, and quickly programmed an alarm for 5:05 and quickly drifted off to sleep.

5 o'clock comes around, and my computer alarm goes off, slowly ramping the volume for me, and playing some easy jazz music. Off course, I'm still dead tired, so I got up and convinced myself to hit snooze and lay down for just a little bit longer. A couple minutes later, my razr alarm goes off. In the dark I fumble for my phone, and quickly mash the side buttons (on the outside of the phone) with my thumb (in order to hit snooze), and fall back asleep.

Couple minutes later, my computer alarm goes off again. I probably hit snooze a few more times on my computer before I actually got up. But the whole point to this story is that the alarm on my razr never went off again! I hit snooze, and it decided to stop on me! WTF?!?

Now I've been using motorola cell phones for years now, and I've used the alarm feature many times on my last motorola phone. I would trust it just fine. But this is the first time I'd used the alarm feature on my razr. So I found it hard to believe that the software would have such an obvious bug. I wanted to get to the bottom of this, so I started testing the alarm later that day. Everytime I tested it, it worked just fine. When the alarm goes off, I can hit any button on the outside of the phone to put it to sleep, and it will go off again after the snooze duration perfectly. That is, until I discovered the most hideous software engineering mistake of all time:

If you hit a button on the outside of the phone once, it snoozes the alarm. If you again hit another button on the outside of the phone, it turns the alarm off!

So when I had reached for the phone, and quickly pressed an outside button, I had inadvertantly pressed 2 buttons at the same time, and turned the alarm off! Now it's not like I'm a professional basketball player, with giant hands. Anybody who has ever used a razr before will tell you how easy it is to press two buttons on that thing on accident. Even worse, the volume buttons are actually one button, where you have to press one side or the other to turn the volume up or down. But if you press in the middle of this button, you actually press in both buttons. And since this volume button is the biggest button on the outside of the phone, I'm assuming this is what happend.

So apparently motorola expects me to wake up to my phone alarm, and ever so carefully, while still half asleep, in the dark, use my pinky finger to press snooze, and be attentive enough to not press any more buttons after that. Brilliant work Motorola. You suck. Thank goodness for my computer alarm, or I would have failed my test this morning.

PS - I still love my motorola phone, I just won't depend on it's alarm clock. And I was exagerrating when I said it was the biggest software engineering mistake ever. This mistake would have to compete with microsoft for that honor...

Wednesday, November 01, 2006

Version 2.3.8 released

For those people who use a 12 hour clock with AM/PM, it is rather common to set the time and forget to double-check the AM/PM symbol. I'll bet just about everyone has done it once. Well I did it the other day, and I was pissed off. It's pretty easy to do on a normal alarm clock. But I use a $2000 alarm clock, so it should be a little smarter than that. So here's what I came up with:



When the time is between 6AM and 6PM you'll see the sun icon. Because it's generally light during these times. At other times you'll see the moon icon. It makes it a lot harder to screw up a morning alarm. And for those people that use a 24-hour clock, and don't have to deal with these problems, the icon is hidden.

Also, many people have asked that they be able to put timers and stopwatch windows above all other windows. So I've added an "always on top" option. Also, the timer will now include an option that allows one to say, "when this timer goes off, sound the alarm at the same volume that I have configured my normal (non easy wake) alarms to go off". The option is called "Use alarm volume"