Essays

Essays about Systems

2 years ago

Thursday, November 8, 2007

Lunch With You: Mike Lee

Sakuzaku's LUNCH WITH YOU: Mike Lee

Mike Lee makes an impression. Several, actually.

The first: this guy is in an aloha shirt and he could break me in half with his pinkie finger. The subsequent impressions, taken in over Brazilian barbecue for over three hours, make you realize this guy has a lot of big ideas and opinions. So, it was our pleasure to have him and his wife Mary inaugurate our “Lunch With You” series when he visited Honolulu recently.

For those who don’t know, Mike works at Delicious Monster, whose flagship product Delicious Library is a best-selling library management software for OS X. The app allows you to scan in all of your books, movies, music, and video games (using either your iSight camera or a custom barcode reader) and keep them organized, automatically pulling in cover art and a plethora of other data from Amazon. It keeps track of to whom you’ve lent what and is kind of addicting for those crazy about organizing.

A sample shelf from Delicious Library.

We asked Mike a number of questions that we’ll paraphrase his answers to here.

The Delicious Monster team has just begun the Library 2.0 private beta, after about two years of work. Leopard has caused the team a lot of work — nearly every change they make has caused problems and incompatibilities that require bug fixes and adjustments. Mike said, “We spent a year working on what was going to be Delicious Library 2, then delayed it a year after deciding to go Leopard, all the while cramming in features. It’s almost like we skipped 2 and are shipping 3.” He said it’s been frustrating for them. But, such is the nature of building software for an evolving platform, said Mike, and it’s the most difficult part of working at a commercial desktop software company. But it’s not just Apple — all of the cover art and metadata for the software comes from Amazon, making the software’s functionality subject to Amazon’s whims.

We asked some technical questions. Delicious Monster uses Subversion for version control. The team doesn’t do any automated unit or functional testing. Mike’s opinion is that all the testing in the world won’t make your software free of bugs, and there’s just no way to account for things you can’t account for. A serious insight that we definitely concur with and that we see a lot of people missing is the importance of planning for but not implementing the plan for ‘what if’ scenarios. There’s a good chance that those things may never even happen. Citing his boss Wil Shipley, Mike put it well: “If we ever get to the point where we have so many users that this is actually a problem, we will be so rich we can pay someone else to deal with it, while we sip rum on a beach in Tahiti.” Take care of the real problems today, and don’t worry about what’s going to happen if your servers are hit by a flaming tornado filled with sharks during an earthquake, or three hundred people with the same name sign up for your software.

Being coffee shop hounds ourselves, we wanted to know what it was like to work out of one every single day (Delicious Monster works out of Seattle coffee shop Zoka everyday). Mike said it has its ups and downs. There’s no office overhead, it’s cheap, and it’s brought some great publicity. But it doesn’t take long to get sick of the menu, the intrusive atmosphere, and the not really having an office.

A tweet from Mike Lee complaining about Zoka.

Getting back to Delicious Library, Mike admits that the app has its detractors, many of whom ask the obvious question: “What’s the point?” Well, if you don’t get what the point is, then there probably isn’t one for you. But the fact remains that Delicious Library is selling extremely well, meeting the needs of a niche market that includes families, collectors, and, interestingly, Bible scholars, each with lots of different media that needs organizing. In Mike’s opinion he thinks it helps that Library is so well put together and the competition isn’t, but also that their competitors are few and far between.

But while Library is the only thing Delicious Monster is focusing on at the moment, they don’t seem to have any shortage of ideas. What else is the team thinking about? Pinball, human slide-puzzles and Pokémons on the iPhone. We waxed nostalgic for Sonic Spinball. It’s true — there is no great pinball software for the Mac. Delicious Monster obviously has no fear of peripherals if they help get the job done, having developed a barcode scanner to use in place of an iSight for scanning into Delicious Library. The ideas were flying: Network play, of course, and how about some flipper dongles and customizable boards?

But none of it has begun to crystallize yet. Delicious Monster has their hands full with Library and their professed object is keeping it The Best Solution. This idea — complete dedication to a vision and executing it well — kept popping up and telescoping in scale as lunch went on.

If we got one thing out of the conversation, it was that Mike Lee loves to write software. He says it best himself: “I was born a programmer. The rest is just implementation detail.” Whether it’s working without pay in Wil Shipley’s basement designing the application that won multiple Apple Design Awards or developing a poker program with lemurs for face cards for his wife’s birthday (really!), programming is Mike’s creative outlet, and one that he says he can’t seem to turn off. And he wants to tell you about it. His blog and Twitter feed, named exactly what you think they’d be, are the best evidence of his outspokenness.

Which is not to say he lacks other passions. Mike’s email signature pegs him as the “Delicious Monster Majordomo. He’s as likely to be programming beside [the Delicious Monster team] or cooking them dinner. He serves as bodyguard and confidant, jester and enforcer.” He’s in love with lemurs and wants to save Madasgascar. But he first and foremost thinks of himself as a software engineer. We got the impression that he understands the economics of being a productive human being.

When I asked whether he had thought about helping Madagascar directly, making the move from computer scientist to natural scientist, the answer was instantly and unequivocally “No.” He’d obviously thought about this, and immediately compared his approach to work to that of a diesel-electric locomotive. Much as the diesel and electric components of the engine do what they are designed to do and pass on the output of their work to other pieces of the system, Mike wants to do what he’s best at — programming — and offer his resources to the charitable organizations already helping Madagascar.

We talked a lot about charity, actually — Mike was in the middle of a piece he’s just published on his blog with a number of ideas about how to work charity into software development (and everywhere else). Mike thinks working against human nature isn’t just difficult, it’s a bad idea — intelligently leverage the compassion and tendencies of people, and there’s no reason you can’t build a better way to keep spam off blogs or prevent the extinction of a cute ancestor. We think Mike Lee is genuinely interested in applying his skills to have a wider impact on an audience greater than a single piece of software’s immediate user base. It downright gave us some inspiration.

He is, after all, the (self-titled) World’s Toughest Programmer. He said what was on his mind and it’s clear he doesn’t tolerate nonsense. And while the rest of us are too full, you better believe he’s going to finish what’s on his plate. (Literally — we couldn’t possibly finish all that Brazilian barbeque.)

So, Who’s Next?

Would you like us to have Lunch With You? Are you in Honolulu? Will you be soon? Have some good ideas or some insight to share? If we know who you are (or if you think we should), let us know, and we’ll take you out to lunch on us.

Email us if you’re feeling talky.

Update: Many commenters thought this article was a sycophantic puff piece, and yeah, we can see how it gave that impression. But Matt just didn’t make it clear that a lot of what was written was paraphrased. I’ve edited it to make it a little more objective and clear in that regard. —Cody

10 Comments

2 years ago

Sunday, October 28, 2007

Making netatalk Work on Debian with Leopard

If you’ve recently upgraded to Leopard, you might have started running into problems accessing AFP shares on Debian if you’re using netatalk with the cleartext UAM (uams_clrtxt.so).

Trying to connect to the shares results in the error

There was an error connecting to the server. Check the server name or IP address and try again.

It’s not a very helpful error, but if you do some digging, you’ll find out it’s Finder error code 5002, ‘afpBadUAM.’

It was at this point that I remembered that Debian’s netatalk doesn’t include any SSL-related authentication modules because of a licensing incompatibility (see Debian bug #191790). At the time, I wasn’t in the mood to dig into building the package manually, so I used the cleartext UAM — we’re on a secured closed network, and, though Tiger warns about sending a cleartext password every time you connected to a share, it’s more than happy to let you do so. There’s even an option to turn the warnings off.

This behavior has apparently been changed in Leopard — it appears to outrightly refuse to send cleartext passwords. This is probably a good idea, but it means you now have to build netatalk to include the DHX UAM that it doesn’t include by default.

I found two posts by Damon Timm and Durk Hellinga that describe the general process. However, as my comment on Durk’s blog says, I had some problems with circular dependencies. When you try to build the package with dpkg-buildpackage, it complains

% DEB_BUILD_OPTIONS=ssl dpkg-buildpackage
dpkg-checkbuilddeps: Unmet build dependencies: cdbs (>= 0.4.6) debhelper (>= 4.1.46) dh-buildinfo d-shlibs (>> 0.19) libdb4.2-dev libwrap0-dev libpam0g-dev libslp-dev libcupsys2-dev heimdal-dev (>= 0.7.1-3)
debuild: fatal error at line 993:
You do not appear to have all build dependencies properly met, aborting.
(Use -d flag to override.)
If you have the pbuilder package installed you can run
/usr/lib/pbuilder/pbuilder-satisfydepends as root to install the
required packages, or you can do it manually using dpkg or apt using
the error messages just above this message.

Unfortunately, libcupsys2-dev and libkrb5-dev seem to be mutually incompatible with heimdal-dev — aptitude won’t install both at the same time. I tried installing each by themselves and forcing dpkg-buildpackage to build with the -d switch, but /usr/lib/netatalk/uams_dhx.so still wouldn’t show up.

As it turns out, I wasn’t looking at the build output carefully enough. This post mentions to look for the line ‘Configure summary’, and for me it didn’t list the DHX UAM as being built. Looking at the output from the configure script, I realized I didn’t have libssl-dev installed. After installing that, everything went smoothly.

Update: A comment on Stefan Lange-Hegermann’s post describes how to re-enable cleartext passwords in Leopard.

Relatedly, Yvo van Doorn describes how to get your Linux-based AFP server to show up correctly in Leopard’s new Finder. Was Glück! I knew there had to be a Zeroconf daemon for Debian, but I had no idea what it was called, or how to make it work if I did. However, I think the XML configuration for Avahi that Yvo has in his post is suffering from some formatting problems. Here’s my version:

1
2
3
4
5
6
7
8
9
10
<?xml version="1.0" standalone=‘no’?><!–*-nxml-*–>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">

<service-group>
  <name>%u</name>
  <service>
    <type>_afpovertcp._tcp</type>
    <port>548</port>
  </service>
</service-group>

Documentation for Avahi’s service configuration files

Usability Improvements to Interaction with Network Shares in Leopard

The frustrating and limiting way in which Finder forced you to access network shares in Tiger has long been a sore point with me. First you had to trawl through Network and its mess of ugly workgroup folders and iconless symlinks. Then you had to click ‘Connect’, wait for the authentication dialog to come up, enter the same authentication information every time, and then click ‘Connect’ again. Then you had to select a single share, and repeat the entire process if you wanted to work with multiple ones. And then, heaven help you if one of the connected shares subsequently becomes unavailable. If I was on my MacBook Pro, accessing a share on my Powermac or file server, and then left the house with the MBP, the entire operating system would be brought to a halt for minutes when the MBP was woken up, while Finder spins looking for the lost share. From a usability standpoint, it was completely awful.

The Finder in Leopard has completely solved all those problems. When shares become unavailable, the system doesn’t beachball — Finder just quietly and patiently keeps looking for the share while everything else remains responsive. Tiger left me wishing for an analog to Windows’ ability for network drives to reconnect at login. But the way Leopard has been redesigned to just reconnect to network shares automatically on demand (using the last username you used) beats mapped network drives hands down. It pleases me that Apple completely rethought the problem and introduced a far better solution.

These things all couple to allow me to work with network shares completely transparently, the way I want to. I can drag locations in network shares into the sidebar, and clicking them automatically connects to the share if unconnected. If the share is unavailable, the system doesn’t freeze looking for it. And it’s so great to be able to have our file server show up in Finder’s sidebar now! No more wading to find shares you don’t access regularly — they are instantly accessible. Bravo!

3 Comments

2 years ago

Friday, October 5, 2007

I Am Building Ruby, Rails, Subversion, Mongrel, and MySQL on Mac OS X — Automatically (And So Can You!)

Update: This script has been given a permanent home in the Sakuzaku Goodie Basket. Please head over there to get the latest documentation for it.

Here’s a script to automatically download, build, and install the OS X versions of the following software:

  • Readline (5.2)
  • Ruby (1.8.6)
  • Rubygems (0.9.4)
  • Subversion (1.4.5)
  • MySQL (5.0.45)
  • Rails (latest version)
  • Mongrel (latest version)
  • Capistrano (latest version)

The steps it takes mirror those explained in Hivelogic’s great post Building Ruby, Rails, Subversion, Mongrel, and MySQL on Mac OS X. If you’re of the variety that can’t easily understand the instructions in HiveLogic’s post (for some reason your humorless software-engineer–partner insists you run the Rails app on your local machine for development), or if you’re the variety that has to do this installation samba prance dance on a frequent basis, then this might come in handy for you.

Notes

  • Before you run the script, you’ll need to have Xcode installed. Unfortunately, I can’t make the script download and install it automatically, since you need to login to with an ADC account to download it. It’s an almost 1 GB download, so plan accordingly. But real developers have Xcode installed, so it’s OK.
  • While installing the gems, you’ll probably be prompted to choose which version to install for a number of the gems. Choose the option for the highest Ruby version listed (i.e., not the ‘mswin32’ version).
  • If the script complains when installing the MySQL gem, see our post about Installing the Ruby mysql-2.7 gem on OS X 10.4.
  • Since you can only really run this script once, I have only tested it a few times, on a Powermac and a few MacBook Pros running OS X 10.4.10. If you run into any problems, send me a bug report so I can improve the script.

There’s no easy way to make the script automatically download the latest versions of the software involved (except for the gems), so I’ll try to keep the script up-to-date as new versions of the software it installs are released. (If I fall behind, just email me and I’ll post an update, and maybe send you a Sakuzaku pin badge.)

Download

Usage

  1. Open Terminal.
  2. Type:
    bash /directory/where/i/downloaded/the/file/install.sh

Sudo will prompt you for your administrator password after you run the script, and then blast off with a flurry of downloading and compiling. You’ll have to do some clickety-clicking to help MySQL install itself. Then sit back — you just saved 15 minutes (or 4 hours).

12 Comments

2 years ago

Saturday, September 29, 2007

Creating a Self-signed SSL Certificate for Apache 2 on Debian lenny

While setting up SSL for Apache 2 on Debian lenny for our development server, I got stuck when all the instructions I could find (1, 2) said to use the script apache2-ssl-certificate, which wasn’t installed on the system.

After some more Googling I found Ubuntu bug #77675 in Ubuntu’s apache2 package, which notes that apache2-ssl-certificate is missing. Debian bug #398520 indicates it’s also a problem in Debian. Both bugs indicate that the solution is to use make-ssl-cert instead. So, this is what I originally did.

Yesterday, however, the certificate expired, and I noticed it had only been created to be valid for 30 days. So, I went through the trouble of regoogling everything I just mentioned above in order to refresh my memory about how to create a certificate. This time, however, I read to the bottom of both bug reports. They mention that the default lifetime for make-ssl-cert is only 30 days. Debian bug #293821 mentions the problem, and even seems to include a patch for make-ssl-cert that gives it a -days option. The patch doesn’t seem to have made it into lenny, though.

So, I copied /usr/sbin/make-ssl-cert to /etc/apache2 and modified it myself. All you need to do is add the -days option to the openssl line near the bottom:

94c118
<     openssl req -config $TMPFILE -new -x509 -nodes -out $output -keyout $output -days 1095 > /dev/null 2>&1

>     openssl req -config $TMPFILE -new -x509 -nodes -out $output -keyout $output > /dev/null 2>&1

While I was at it, I copied /usr/share/ssl-cert/ssleay.cnf and modified it, too, by removing the required country, state, locality, and organizational unit fields in the certificate, since I didn’t have anything useful to enter for them:

1
2
3
4
5
6
13a14,16
> countryName                     = @CountryName@
> stateOrProvinceName             = @StateName@
> localityName                    = @LocalityName@
14a18
> organizationalUnitName          = @OUName@

I also changed the relevant lines in my new make-ssl-cert:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
12c12
<     templates="organisationname hostname email"

>     templates="countryname statename localityname organisationname ouname hostname email"
23a24,35
>      db_get make-ssl-cert/countryname
>      CountryName="$RET"
>      db_fset make-ssl-cert/countryname seen false
> 
>      db_get make-ssl-cert/statename
>      StateName="$RET"
>      db_fset make-ssl-cert/statename seen false
> 
>      db_get make-ssl-cert/localityname
>      LocalityName="$RET"
>      db_fset make-ssl-cert/localityname seen false
> 
27a40,43
>      db_get make-ssl-cert/ouname
>      OUName="$RET"
>      db_fset make-ssl-cert/ouname seen false
> 
37a54,56
>      CountryName="XX"
>      StateName="There is no such thing outside US"
>      LocalityName="Everywhere"
38a58
>      OUName="Office for Complication of Otherwise Simple Affairs"
44c64,68
<     sed -e s#@OrganisationName@#"$OrganisationName"# 

>     sed -e s#@CountryName@#"$CountryName"# 
>       -e s#@StateName@#"$StateName"# 
>       -e s#@LocalityName@#"$LocalityName"# 
>       -e s#@OrganisationName@#"$OrganisationName"# 
>       -e s#@OUName@#"$OUName"# 

Then, all you have to do is run the following:

/etc/apache2/make-ssl-cert /etc/apache2/ssleay.cnf /etc/apache2/ssl

This should create the necessary certificate in /etc/apache2/ssl as explained by all the other instructions.

The patched scripts are available in their entirety below. I also posted the diffs above, in case you have different versions of ssleay.cnf and make-ssl-cert and you want to patch them.

2 Comments