follow me on twitter and win a gift basket!

Zach Holman

September 18, 2009

Cue higher integrity of integrity’s queue

We just jumped on the Integrity bandwagon at the office. It’s a cute little open source project that I’ve admired for quite some time but haven’t had the chance to play around with until now. So far so good; if you’re looking to move to continuous integration it’s definitely a viable option. (The other jive cat on the street, CI Joe — a @defunkt production — looks really interesting but is a little bleeding-edge right now.)

One of the issues we ran into fairly quickly was effectively a fat race condition. If I commit and push right now, and then a minute later I commit and push again, Integrity seems to run the first batch of tests and, once notified by GitHub about the second push, immediately run the second batch. Since we’re running this on a test database that gets destroyed and rebuilt, once the second batch runs it nukes the tests for the first run and then fails on its own.

The gist below is a quick solution to that. Once tests are run, it touches a file; when finished, it removes the file. If the file’s present, chill in a holding pattern until it’s gone.

The last bit, ci:throw_error, is to ensure that the temp file gets removed if an earlier command bails out. For example, a sample integrity build command:

rake ci:enqueue && rake spec && rake ci:dequeue

This works if your specs run clean, but if that fails it’ll exit before you can dequeue, which impacts any future pushes. Instead, use a command line:

(rake ci:enqueue && rake spec && rake ci:dequeue) || rake ci:throw_error

…which will still throw an error so Integrity marks it as a broken build, but it also ensures you clear that tempfile.

September 16, 2009

Making a better iTunes

After iTunes 9 was released, much of the criticism surrounding it was directed at the bloat of the software itself.

From a random digg comment:

Talk to me when iTunes isn’t an enormous, bloated, fatass of a program. Yeah iTunes is great for the casual music listener, and the iPod support is awesome, but there are a lot of areas to improve on. Here is my wishlist for Version 10:
- Shrink the memory footprint! iTunes should play music in the background and still allow me to do whatever else I’d like to do without killing performance.
- FLAC support.
- Fix the coverflow art issue with older nVidia cards.
- Add the option to tag files from the internet. MediaMonkey has a feature where you click an album and press ctrl + L. This opens a window where you can select to download cover art, artist tags, track tags, genre tags, year tags, etc.

It’s a pointed comment, but I think it fares pretty well for generalizing many of the “iTunes is bloatware” crowd. Right off the bat, however, there’s two conflicting thoughts: that iTunes is a “fatass of a program” and should slim down, and that iTunes should then add at least two new features that don’t have particular broad-market appeal. That’s the foundation of bloatware.

That nitpick aside, I think this brings up three interesting questions about iTunes itself: what is the meaning of iTunes, and what does that mean for its future?

The Meaning of iTunes

This is a particular point of contention that I feel most reactive criticism misses. They seem to take the “iTunes” name as the same as its historical origins: namely, that it is a place for your tunes. At this point, music has become subsidiary. When you think about it, that’s staggering. The cornerstone of Apple’s business this millennium has been the iPod, and, to a lesser extent, the iTunes Music Store. That its flagship product no longer caters to music is certainly surprising, and I think it’s a common point of frustration for people making these comments. But it’s no longer the reality: Apple has been increasingly pushing far more than music the last few years, and iTunes has adapted and changed with the iPod and the iTunes Store.

It’s nice to say that you want to go back to the glory days of Winamp in the 90’s, where all you have to worry about is some MP3s, a few playlists, and a play and pause button. Great. The problem is that consumers’ interests have changed. For the vast majority of people, that purist mentality would be disaster. Do you store your videos and movies in some unsearchable, unbrowseable Videos directory, like so many of us did years ago? How do you get those into your iPod? Drag and drop? A separate application? Does that mean you split it into iMusic, iMovies, iSync, iPodcasts, iApplications, iTVShows, and so on? The difference is that people have different expectations based on how they use their media. You can’t let them hide it all away in some folder they’ll never use; they want it all easily accessible in one package so they can shoot it to their iPods, their iPhones, their AppleTVs, and so on.

The meaning of iTunes is no longer just music. It requires the addition of different features, different focuses. That means the Winamp of the 90’s doesn’t cut it. Album art is now a focus. Genius playlists take some of the great ideas from Last.fm and Pandora and moves it to your personal machine. App management is now done in iTunes because it’s such a pain in the ass to do it on your phone. Things are changing, and iTunes has had to change with them every step of the way.

The Future of iTunes

I’ve been mulling this about in my head since a bit before iTunes 9. Where is this taking iTunes? On my Mac, iTunes is a glaring omission from Activity Monitor’s neat column of “Intel (64 bit)”. From all the rumors over the last few years, it sounds like having a decade-old Carbon-based iTunes has become a development nightmare. I’m sure there’s still predecessor SoundJam-era code standards and design buried in there. Any sort of instability, performance drains, or design inefficiencies are a huge pain in the ass when you’re the world’s most-deployed software outside of the OS.

I’d imagine The Big Rewrite is probably coming in the next year or two. QuickTime X is fundamentally a different project than QuickTime 7 (see Siracusa’s excellent Snow Leopard review on Ars for the intensive details of this changeover). QuickTime stretches back nearly two decades and has become a standard unto itself, so I think it’s fair to say that Apple has the balls to make heavy changes like that. One has to wonder what The Big Rewrite would entail for iTunes, though.

John Gruber went into some detail yesterday on what that rewrite might entail, specifically from the point of OS X development. I think what he’s saying makes sense, though I don’t think sprinkling WebKit is sufficient enough pixie dust for ease of cross-platform portability. I do think that WebKit would (and is, as of iTunes 9) helps out in the iTunes Store perspective, though. Pretty much all of the new iTunes Store is straight CSS3, HTML 5, and JavaScript, which you’re able to do when you’re sure that your entire audience is on the world’s most advanced browser. This means you can hire regular designers and front end developers to update your store rather than dive deeper into any proprietary XML or even make Objective C-level changes. It’s a win for Apple. And as long as we’re on the subject: my secret hope is that this opens the door for a more public and web-based iTunes store in the future. Whenever I click on one of those special open-in-iTunes links I cringe; it’d be slick if I could browse in my browser of choice and click-to-download-in-iTunes instead.

Then there’s the issue of the name itself: iTunes. It’s got great branding, but it doesn’t make sense considering it’s now two distinct (and huge) parts: your media, and your iPod. If there’s a company that would ever drop a brand like iTunes it’s Apple, but would it ever make sense. Would there ever be a case for an iSync (current app named that way aside)? I think the problem is that you do want to be as close as you can to your media itself, so spinning off syncing into another app might be confusing, but does this change if you sync your media over your network? Does this all change if you keep all of your data in the cloud and sync over the air? Does syncing itself become just another web app? When iPhones and Touches get in the neighborhood of 200GB, 300GB and more, does it really matter about selecting which calendar, which playlist, or which photos to sync when you could just toss it on your device with room to spare? These issues might not come into play for another 3-5 years, but I think it’s a model towards which we’ll be moving, and when we move there iTunes will have to adapt again.

September 15, 2009
There's No Such Thing as a Good Client
Things which make money for you not only give you money, they also give you time. But if you’re only getting income, and you’re not getting equity, your books only balance if you pretend the time budget isn’t there.
Another good read by Giles Bowkett. The core of its message is far broader than just consulting.
September 14, 2009

Little Snow Leopard Tidbits

- QuickTime, if maximized full-screen on a secondary display, stays full-screen even if you interact with other apps. This is excellent, and it’s one of those things I’ve always wanted but never knew it.

- As you move between Spaces, the small icon overlay that shows your position animates. In Leopard, it immediately flashes to the new position; in Snow Leopard, it quickly moves the white fill to the next space.

- Though more of an iTunes tidbit: you can consolidate everything into one Media folder now. Which, you know, considering you’re reading this you probably know that by now.

- Split windows in Terminal are pretty awesome. I haven’t settled on my regular usage of them yet, but I’m leaning towards some sort of setup with autotest or script/console readily accessible. It’s too bad these are attached to specific tabs, though; I’d rather which they worked like frames that were attached to windows, with each split having their own set of tabs.

- The Image Capture redesign, though a little confusing from a UI perspective, is totally worth it just for the fact that I’ll hopefully never have to install some 3rd party printer or scanner software sludge from HP or other vendor. The scanner at work showed up immediately on my network through Image Capture and worked without any setup whatsoever.

- I keep the lock icon on my menu bar: it’s set up through Keychain. It’s mostly designed to let you quickly lock or unlock Keychain to restrict access to password-protected areas if you’re stepping out temporarily, but I’ve always used it for a quick way to lock my screen. In Snow Leopard, this turns your screen off rather than the previous method of dumping you to your screen saver. I’m neutral about this change, as I enjoy my iPhoto-studded screensaver, but I love how it’s now a quick way to turn both of my displays off at night so the glow doesn’t keep me up longer as I try to sleep. (Though luckily I can sleep through anything, really; try it sometime. My neighbors do every morning.)

- I think it’s worth installing QuickTime 7 (the old “QuickTime Pro” from Leopard). I really dig QuickTime X, but it’s *really* barebones in terms of functionality: limited export options, and virtually no video control options. For example, I’ve used QuickTime Pro a number of times in the past to do a simple 90 degree rotation and re-save; it seems the supported fashion to do this now is to import into your iMovie library and really dig into it there. You’re better off digging out your Snow Leopard disk, looking in “Optional Installs” and installing the older version of QuickTime for these quick one-offs.

- If I recall correctly, right clicking and selecting “Change Desktop Background" wasn’t in previous versions. This is quite a bit more intuitive than Quicksilvering around my system preferences instead.

- There’s some additional hooks in Automator for defining and creating your own Services directly. I only made very limited usage of the Services menu in the past, and a lot of people are abuzz about the new Snow Leopard Services panel, but I’m still skeptical about whether I’ll actually use it. With a quick plug into Automator, though, it’ll make it a lot easier for me to define my own (or for others to create and share their own) if it makes sense in the future. It’s especially cool if I can fork almost all of the heavy lifting to a Ruby script using the built-in “Run Shell Script” in Automator as well.

September 11, 2009

Sebastiaan de With breaks down Snow Leopard’s UI changes pixel-by-pixel.
The wry self-referential man inside of me would also appreciate a similar, detailed, pixel-based analysis to Sebastiaan’s detailed, pixel-based analysis to Snow Leopard and other similar posts. It’s hard to find another blogger who puts so much thought into not just his blog design but the design of each individual post itself.

Sebastiaan de With breaks down Snow Leopard’s UI changes pixel-by-pixel.

The wry self-referential man inside of me would also appreciate a similar, detailed, pixel-based analysis to Sebastiaan’s detailed, pixel-based analysis to Snow Leopard and other similar posts. It’s hard to find another blogger who puts so much thought into not just his blog design but the design of each individual post itself.

September 10, 2009

The iTunes organizational hierarchy has been slowly getting more and more disorganized with each feature Apple adds. When you let iTunes manage your files, traditionally they toss everything in ~/Music/iTunes/iTunes Music. That works great when everything in “iTunes Music” is, you know, music. Once they’ve tossed movies, podcasts, and a slew of other features in the mix, your directory hierarchy gets really nonsensical with everything in one big ol’ pile.
iTunes 9 finally moves away from this mentality, though the feature is hidden by default. iTunes now lets you organize everything into an upper level “iTunes Media” folder structure, which then breaks out neatly into logical groupings: movies, apps, shows, and so on. You can find this in File => Library => Organize Library. You’re welcome.

The iTunes organizational hierarchy has been slowly getting more and more disorganized with each feature Apple adds. When you let iTunes manage your files, traditionally they toss everything in ~/Music/iTunes/iTunes Music. That works great when everything in “iTunes Music” is, you know, music. Once they’ve tossed movies, podcasts, and a slew of other features in the mix, your directory hierarchy gets really nonsensical with everything in one big ol’ pile.

iTunes 9 finally moves away from this mentality, though the feature is hidden by default. iTunes now lets you organize everything into an upper level “iTunes Media” folder structure, which then breaks out neatly into logical groupings: movies, apps, shows, and so on. You can find this in File => Library => Organize Library. You’re welcome.

September 6, 2009

Moving your Rails stack to Snow Leopard

A few notes on upgrading to Snow Leopard for you attractive Rails developers out there:

MySQL

Your MySQL install will get nuked (configuration, binaries, and the database itself). Head to mysql.com and grab the new image (the installer for 10.5 worked for me) and install MySQL like usually. Once installed, you’ll need to reinstall your mysql gem. I needed to dust off my Snow Leopard disk (all one hour of dust) and install the Developer Tools again. Dive into your “Optional Installs” directory on the DVD and install Xcode.mpkg. Once installed, you can then get your mysql gem built for your particular architecture:

Using the 32bit MySQL install:

sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

That should build your gem and you should be able to proceed from there.

MacPorts

MacPorts, if you’re moving to a 64bit Snow Leopard install, will be completely bombed, leading to odd errors when you try to build C extensions for gems like nokogiri or RedCloth. You’ll have to uninstall all of your ports.

Unfortunately, the port command will also fail for you. To fix that, I needed to rebuild MacPorts from source, which kind of sucked. Once built, thought, you can do a sudo port -f uninstall installed and you’ll be back on track.

TextMate

TextMate has a few gotchas regarding the upgrade to Snow Leopard. I’ll push you over to the helpful wiki page on it, which lists some fixes for command+arrow, command+R, and some 32bit/64bit issues.

I’ll probably add more as I run into issues, but these are the main issues I’ve noticed since launch.

August 31, 2009

Getting Logitech Control Center to work on Snow Leopard

If you’re doing an upgrade to Snow Leopard, you might notice that, while Logitech Control Center might be installed still in your System Preferences, various shortcut buttons on your clever little Logitech mouse are completely not working. I enjoy having Spaces and Expose right on my mouse, and the fifteen minutes without those shortcuts readily available nearly put me in the psych ward. You know, more than usual.

Have no fear! A quick hackery is here! (At least until Logitech gets their crap in gear- you hear? This is no mere software engineer veneer to interfere with what we’d do best to steer clear; this is important shit.)

But I digress. Dive into your Applications folder and copy Expose.app and Spaces.app into your main Applications directory. (Make sure you copy rather than just drag and drop, otherwise Untold Foolery will probably happen.) I’m guessing Snow Leopard swapped the location of these apps and LCC has yet to be updated for that.

August 27, 2009

The quickest path to $50m in revenue? Build fun.

nabeel:

Turns out it takes an average of eight years to hit $50m in revenue, which is about the point when you can start thinking about things like going public.

Feeling impatient? Don’t start a networking company. Of course this is a limited study, but we are seeing another wave of entertainment-oriented companies repeating this pattern in Social Gaming currently. At least three social gaming companies I know of will be, or already have, hit $50m in revenue in their first three years of business.

August 27, 2009

Apple’s iPhone tactics work

Lately there’s been a lot of comparisons between Apple’s iPhone and Microsoft’s Windows monopoly of the 1990’s (I’m looking at you, reddit and Hacker News). A lot of the anger is focused on Apple’s AppStore and iPhone lockdown tactics, which leads to warcries of “APPLE IS A MONOPOLY! APPLE IS EVIL!”.

Luckily, Apple’s not evil.

Let me qualify that: I view “evil” in this context as whether that company is leveraging existing assets to curtail the freedoms of the customer. In other words, the customer is forced into a position that they wouldn’t have otherwise taken.

This is an important concept. Whether my definition of “evil” is accurate or not is likely up for debate, but I tend to hold the position that one should stay out of someone’s way. If a consumer wants to jump off a bridge, let them; while the company might be classified as irresponsible, I don’t think it makes them “evil” to follow the wishes of their customers.

Microsoft got into trouble in the 1990’s for leveraging their existing asset — Windows — and using their monopolistic power in other avenues, like web browsers. This is evil. From a consumer’s perspective, there’s not an easy way to jump ship. The Mac of the 90’s wasn’t as viable a platform as it is now, and *nix had a long way to go before user friendliness. I don’t even view the Internet Explorer issue as that big of a deal; I think the OS should be able to make smart default choices for its users. Put it this way: if Microsoft utterly entwined Internet Explorer 8 with Windows 7 and wanted to push Firefox and other browsers aside, I’d have much less of an issue with them doing it now as opposed to ten years ago, if only for the notion that switching to another OS is so much more accessible now.

Zap forward to today. You have people like Calacanis hooting and hollering — in a surprisingly high-pitched squeal, I might add — about Apple’s AppStore approval process, the issue with iPhone lockdowns, and Apple as gateway between third-party developer and consumer.

I’ll get it out of the way: the AppStore approval process is a mess. Running arbitrary code on my iPhone would be cool, that I heartily agree with. But I don’t see this qualifying them as the “Microsoft of the 2000’s”. I view this as a bridge jumping problem: Apple has designed their product in a fashion of lockdown and hand-holding. It’s a very opinionated product. Apple isn’t forcing this on their userbase. If your users use your product, and, by all measures fanatically love it, this has to raise questions about whether your typical consumer even gives a rat’s ass about these issues. The fourth highest positive response for the iPhone in that survey is specifically third-party apps.

Even though the iPhone is doing gangbusters on customer satisfaction, there’s certainly a number of capable competitors coming along, most notably the Pre and Android. Compare this to Microsoft of the 90’s, when alternatives meant a huge switcher cost. Right now, it’s not an issue to switch phones; number portability was achieved on the telcos by law a few years back, and most contact data can be easily ported from your OS-based address books or through SIM cards.

Are there some issues Apple needs to address? Sure, and I think that’s what Schiller has been trying to do. But the reason iPhone users are flocking to the device and staying there isn’t because of Microsoft monopoly-era tactics; it’s because Apple has built a better device. And if they do decide that iPhone doesn’t seem to fit the bill, you aren’t prevented from rolling the dice and trying one of the competing devices (with varied success).