Sunday, December 31, 2006

Python Cheese Shop

It has been a while since I released a new open source project. The last time I dealt with the Python project registry it required a highly manual through-the-web registration process. The Cheese Shop is so much nicer, and the integration with distutils makes it so easy to register a project and release that there is no reason in the world not to do it. There are just a few basic steps to getting started:

  1. Create a user at http://cheeseshop.python.org/pypi by clicking on the "Register" link and following the instructions.
  2. Create a setup.py file for your Python project. You're doing this already, aren't you, so your users can install your app or library with disutils?
  3. Type: python setup.py register
The CheeseShopTutorial has more details, but once you've registered it really is just that simple. It turns out they will even host downloads of the source releases, if you want. I don't mind hosting my own releases, and they will only host Python (so none of my AppleScript projects could go there). But that's a nice commitment on their part.

Saturday, December 30, 2006

project site with django

While I'm at it, I ought to go ahead and release the code I wrote to host my projects site.

Featuritis

My project site is finally online, and I find myself falling into precisely the trap I was hoping to avoid. I originally wanted to find some existing software to host the site, so I could concentrate on the myriad projects cluttering up the back of my brain. Since I opted to build my own, I've found myself focusing on building more features into the site management tool instead of those other projects.

In any event, today I added Atom feeds to track releases for each project, as well as a global feed to track all releases from the site. The feeds include download links to each released software bundle as enclosures, because it was easy not because it seems especially useful.

Tuesday, December 26, 2006

Proctor moved

I have also moved Proctor into the new site.

Email Archives, redux

Now that I have the site in order, I have posted a copy of my mail archive script in an easier-to-use format.

code hosting

I spent some time over the weekend building a rough tool with django to host my code projects. It is only at http://www.doughellmann.com, though that domain may not be available in your DNS cache, yet. I'm happy with the schema for the results, but will probably tweak the colors and layout for a while.

Astronomy Picture of the Day

I have been using an Automator workflow inspired by an article by Andy Ihnatko to download the latest image from the Astronomy Picture of the Day site and set it as my desktop background. It also adds a copy to my screen saver images folder. Some of the pictures are pretty, and some are inspiring.

Check it out, if you are interested.

Saturday, December 23, 2006

Proctor 1.0

I've moved Proctor development from sourceforge to my own server and released version 1.0.

We have been using proctor successfully for several years now at work, and it makes automating our nightly tests very easy. The build is automatic, the software is installed automatically, and then proctor runs the test suite. All 3000+ tests take several hours to run, mostly because they aren't all strictly "unit" tests.

Friday, December 22, 2006

code hosting tool

I am looking for a tool to build out a site to host my code projects. None of these projects are large enough to warrant anything like the features provided by SourceForge. I don't think my requirements are very strict, but I haven't been able to find anything to do what I want (sort of a sourceforge-lite):

  1. I must be able to host the projects under a domain I control myself. One domain for all projects is preferable since I don't want to have to edit my apache config every time I think of a new project.
  2. I do not care to expose my svn repository to the world, since it contains plenty of stuff besides the projects that I do want to release. Releasing source as tarballs or apps as disk images is good enough for me.
  3. Each project needs a home page with a summary and links to releases and release notes.
  4. Adding new releases should be easy. I will upload the release file via ftp or scp, but I want to be able to add the reference to the release file without editing a bunch of HTML each time.
  5. A blog is a nice-to-have, but I already have this blog, so it isn't a requirement.
  6. I don't need an issue tracker, forum or mailing list manager. I may maintain an email address for support of all of the projects, or I might use a google group.

I thought about Zope for a few minutes, but just don't want to go back in that direction. I used to use Zope quite a bit. I haven't in a long while, and the zen has left me, I'm afraid. Somehow the relational model is more persistent in my grey matter. Plus, I'm still not over my plone upgrade fiasco from a few years ago, which is why I don't have much of a site up anymore. I finally gave up trying to make the site work, pulled the content out to preserve it, and just threw up a redirect to the photo gallery.

I looked at drupal. It has some nice features, but I don't like the default appearance and I'm not that interested in learning another templating language so I can improve it. WordPress has most of the features I want, though I would have to edit release pages myself. Again, though, they have a whole template language that seems like more than I want to deal with for extensions. Maybe if I was already PHP-enabled these would seem like stronger contenders.

I was hoping to find something built using django (or at least parts I could assemble myself), since I am already trying to extend my skills in that direction. It looks like the django-way to do most everything is to build your own, though, so I suppose that is what I'll end up doing. I should be able to lean heavily on the admin UI for most of my editing, so I would just need templates for presenting the results. That's not too bad.

Thursday, December 21, 2006

ATM for Books

The idea of a machine that can print a copy of every book ever written makes me think I need to build some more shelves.

Wednesday, December 20, 2006

VirtueDesktops

Wow, VirtueDesktops has come a long way since the last time I used it. I've made the switch from the older Desktop Manager, and aside from not having the desktop pager available in the menu bar I am having no trouble adjusting. Moving windows between desktops works as advertised.

Desktop Manager

I love using Desktop Manager for Mac OS X because it lets me separate my tools into separate workspaces. I have a separate desktop for communication (email and IM), local development (editors and terminals), remote development (vnc), and miscelaneous (temporary windows or apps like iTunes). With a simple keystroke I can rotate between the different desktops, even using dual monitors.

Unfortunately, it looks like the recent update to OS X broke the ability to move a window between desktops. I can still minimize, change desktops, and then expand the window. But moving the window without switching desktops doesn't seem to work. Oh, well, I didn't use that feature much anyway.

The last release of Desktop Manager was in 2005. Maybe it is time to take another look at Virtue Desktops.

Sunday, December 17, 2006

mailbox2ics

We have an Exchange-like mail server at work, but it doesn't support iCal subscriptions. Since I use a Mac, and don't have any interest in Outlook, that makes calendar access a pain.

After some poking around, I discovered that the server stores the calendar information in IMAP folders, with each event in a separate ICS file attached to a fake message. So I put together a small script read the IMAP messages and merge the ICS files into a single output file. By writing the output file to a folder on the web server, it is easy to set up a subscription in iCal.

The result only works one way, of course, though it should be possible to push fake messages into the IMAP server. I have not tried that, because I just use the server's web interface for adding new events to the calendar.

The script depends on the icalendar package from codespeak.net, and the Python standard library packages for IMAP and email parsing.

I have posted the script to my server: mailbox2ics.

del.icio.us down?

I've never worked anywhere that could take a reasonable change window like del.icio.us apparently can.

We're in the midst of a scheduled upgrade which will take no more than a couple of hours. Come back after 2 pm (Pacific) today and you will see the del.icio.us you've come to know and love. For live updates, please see our blog.
Bravo to their operations team for doing the work during the day instead of the middle of the night. Of course, they are still working on the weekend, but this is a start.

NTP settings in GA

Thanks to OS X Automation for NTP settings for GA users.

feed auto-discovery

I added feed auto-discovery to CastSampler.com today. It was pretty easy using the feedfinder.py
module, except for one small problem. Something about the timelimit() decorator in that module causes problems with django or mod_python (probably mod_python). When timelimit() is enabled, the finder either produces no URLs at all or an exception about "unmarshalling code objects" in a "restricted execution environment." It works great in my development environment, which does not use mod_python. To get it to work in production, I disabled the timelimit() decorator. I hope that does not come back to bite me in the future.

Monday, December 11, 2006

Gmail learning to recognize spam better?

I didn't see this story in the New York Times when it came out. The title is a little misleading, though. The excitement is in the reduction of false positives, rather than false negatives:

From the first quarter to the second this year, Gmail got nearly 15 times better at distinguishing legitimate commercial e-mail messages from spam...

Left-Handedness

According to the BBC:

Left-handed people can think quicker when carrying out tasks such as playing computer games or playing sport, say Australian researchers.
more specifically:
Extreme left-handed individuals were 43 milliseconds faster at spotting matching letters across the right and left visual fields than right-handed people.
It only works if you're caffinated, though.

I should say, it only works for me that way.

Sunday, December 10, 2006

Software Updates

I just updated my powerbook with Apple Security Update 2006-007 with no apparent ill effects. I found one report that mentioned having a problem that required a re-install of 10.4.8, but I have not experienced that, yet.

Immediately after updating, I was offered iPod Updater version 1.2.1, which apparently has only a minor fix for a battery indicator problem I wasn't having.

Saturday, December 9, 2006

Email Archives

Speaking of email, I've been working on an AppleScript to organize my email boxes.

I use Mail.app under OS X, so searching is easy and quick. I can use smart mailboxes as needed for subject-based organization, so I wanted to move away from my existing subject-based organization scheme (a folder for each person, job, client, etc.). But since I have about 7 years of email on my machine, I still wanted to do better than one big mailbox. Grouping the messages based on the date sent seemed to give me manageable chunks, but I didn't want to have to do that manually. So, I came up with this script:

on archiveByDate(parentMailboxName)
tell application "Mail"
set archiveMessages to the selection

repeat with currentMessage in archiveMessages
set receivedon to (date received of currentMessage)
set archiveYear to (year of receivedon as string)
if ((month of receivedon as number)


This automatically maintains a folder hierarchy like:

  • parentMailboxName
    • 2006
      • 01
      • 02
      • ...


I use that script as a library, and have another script which I run via a MailActOn action to file selected messages. The reason for having a separate script is so I can separate personal messages from work messages in the archive. For example,

set scriptDirectory to ((path to
scripts folder as string) & "Mail Scripts")
set scriptPath to (scriptDirectory & ":MailArchiveByDate.scpt")
set theScript to (load script alias scriptPath)

tell theScript to archiveByDate("Personal")


saves my personal messages to a folder called "Personal", while

set scriptDirectory to ((path to
scripts folder as string) & "Mail Scripts")
set scriptPath to (scriptDirectory & ":MailArchiveByDate.scpt")
set theScript to (load script alias scriptPath)

tell theScript to archiveByDate("Work")


saves work messages to a separate set of folders.

The Real Problem With Email

There has been a lot of discussion recently about the upsurge in spam, especially the increase in image spam. No one seems to have an answer. I think that is because they have not recognized the real source of the problem.

The email delivery protocol SMTP was designed to deliver electronic mail in the same way that postal mail is delivered: The sender hands the mail to a service which delivers the message to the inbox of the recipient. That's all well and good in the real world, where the sender has to pay for postage to ensure delivery.

In the electronic world, postage is essentially free. There have been plenty of suggestions that we tack a delivery charge onto email, with the idea being that charging for delivery of messages would eliminate the spam problem. That does not hold, though, since we all receive junk mail at home, too.

Other suggestions depend on authenticating the source of the message, with PGP or GPG focusing on the sender while SPF and DomainKeys focus on the sending server (requiring less configuration on the part of each individual user). None of these address the true problem with email:

Your inbox is world-writable.

That simple fact places the burden of dealing with spam entirely on the recipient. Anyone can send you email, and it is up to you (or your email client) to filter out messages you do not want.

So, the real solution to the spam problem is to deal with the write permissions on the inbox. More on that later.

Tuesday, December 5, 2006

CastSampler.com

My most recent project is CastSampler.com, a tool for building a personal "mix-tape" style podcast. I tend to listen to one or two episodes from a lot of different shows, so I don't want to subscribe to the full show feed. Instead, I add the show to my CastSampler list, then I can add only those episodes that I want to my personal feed.

I have plenty of work left to do, but the basic features all work now so I would love to get some feedback.

HappyDoc 3.1

I released HappyDoc version 3.1 this morning. The only changes have to do with file headers and correcting an "assignment to None" error that came up when None changed from a builtin to a keyword.