Coder’s Block

Logan Koester posted some tips for overcoming Coder’s Block.

I get blocked, once in a while, too. In those situations, it almost
always comes with the feeling that the problem I am trying to solve is
too big. That, in turn, usually stems from not having thought about the
problem enough, rather than the other way around.

The development staff at my company is pretty small, so we are all
involved in each new feature from “front to back”, as it were. I like to
start by thinking about the user interaction aspect of the problem. It
doesn’t make sense to start with the back-end design until you know what
the front-end is supposed to do, right? So I think about what operations
the user needs to perform, then what inputs are needed to handle them.
From there I can work out how many of those inputs should be stored for
re-use.

I like to draw diagrams, since I find they are easier to re-assimilate
when I come back to a problem after some time. So I may sketch out a few
UI screens, or draw a few boxes and arrows to understand the
relationships between objects (I use a sort of pidgin UML for that). I
also make lists of attributes I might need for classes, since those map
to the database schema.

There are plenty of good tools for making such sketches on the
computer, but I guess I’m Old School. I find that sitting down with a
pen and paper, away from the computer, helps clarify my thoughts. Since
I don’t have my text editor, the temptation to write code is reduced and
I can concentrate on the big picture. And once I have the big picture
worked out, the way forward is usually clear.

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.

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.

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.

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.