My Address Book 1.9.0 - rewritten from scratch

May 11, 2011 [Python]

Ordinarily, my motivations for doing open source work are clear: peer recognition and the satisfaction of knowing people are using my work.

However, I've been distracted from that stuff recently because of my desire to scratch my own itch, by re-writing My Address Book from scratch to allow sharing the same address book between the web interface and the various email programs I use on different computers.

The only way to make it work with those email programs is to store the data in an LDAP server, instead of the custom MySQL database I had used in the original version (which is still available, of course: My Address Book version 1).

While I was doing it, I took the opportunity (or made the mistake) of re-writing in my favourite language, Python. Joel would not approve, but that's the fun of open source: I can do whatever I like, no matter how unwise.

I learned a lot of things on the way:

  1. I like web.py. It is a simple, and helpful library in the Python tradition of being concise but powerful.
  2. Setting up Python running as FastCGI on either Apache or lighttpd is much harder than creating a page of PHP. However, once it's done, it's done. (The results of my research are shown at the bottom of the Install Guide.)
  3. Setting up an LDAP server to act as a little address book is unbelievably complicated. See the Install Guide for how to do it. One day, I or someone else will turn all those instructions into the preinstall step of a .deb, and no-one will ever have to worry about it again. Volunteers, please.
  4. Templetor, web.py's templating system is fine, but too slow for large pages. I had to reimplement the main address list rendering in plain Python, which made me sad.
  5. I am compulsive about getting my work out into the world.

It has been a struggle to write all the documentation and think through the installation procedure and all the other stuff that comes with making a public release, but I have been unable to move on to other things until I have got it done. I hope I've done an ok job - the installation procedure is far too complex and should be automated, but if the volume of documentation is any indicator of how helpful it is, it should be reasonable.

I think I found it more difficult than normal because, unlike normal, getting it out to other people was not my main motivation for doing the project. I'm glad I've worked through it though, and I really hope some people get interested enough to help me make it much easier to use.

I think this project is a good example of how it can be much better to live in the open source world than the proprietory one. If I want to create a small address book for my family in the open source world, I end up with an industrial-strength LDAP server providing it, meaning that so long as someone does the work to make it simple to use for my simple use case, it can scale to solve pretty much any problem I might have in the future. So if I start a small business that eventually grows and needs to track millions of addresses, I can keep using the same LDAP server, on the same hardware, as my original address book.

Of course, My Address Book would have broken long before that. It doesn't even do paging, and the home page lists all your addresses in one page.

I must write a rant one day about how I hate paging.