A database symbol for GraphViz

Download the source for my GraphViz database symbol featured in this article: DatabaseShape.ps
I have started using the GraphViz application, which accepts a list of nodes and arrows, and figures out how to attractively arrange them in a diagram. For example, you can very nearly produce this output: by supplying this rather modest input file to GraphViz (most of whose length comes from my wanting particular colors)::
 digraph Application {
    rankdir=LR;
    node [shape=box,style=filled,fillcolor="#C0D0C0"];
    subgraph clusterClient {
       label="Client"; style=filled; bgcolor="#D0C0A0";
       "Browser";
    };
    subgraph clusterServer {
       label="Server"; style=filled; bgcolor="#D0C0A0";
       "App";
       "Database" [shape=DatabaseShape,peripheries=0];
    };
    "Browser" -> "App" [label="HTTP"];
    "App" -> "Database" [label="SQL"];
 }
I used the words “very nearly” because, in fact, GraphViz only knows how to draw simple shapes like rectangles, and is ignorant of the standard cylinder-shaped database symbol that I have used here by asking for a DatabaseShape. Submitting the above code to GraphViz will, normally, produce three nodes that are all rectangles. To teach it about the database shape, I had to write some PostScript. (more...)

Posted in Computing, Web Notes | No Comments »

My November Grok Presentation

In this post, I provide the slides and examples from a recent talk that I gave to some fellow software developers at Georgia Tech. Many of them were not familiar with web frameworks, and I wanted to introduce them to two common concepts: the idea of “convention over configuration,” and the practice of passing inert data structures to a page template rather than letting it access live objects directly. But because I am also really enjoying my work with the new Python web framework Grok, I decided to make it the centerpiece of my presentation (more...)

Posted in Computing, Grok, Python, Zope | No Comments »

PyEphem available for Windows!

Over the years I have received many requests from frustrated Windows users, asking for a Windows-native version of my PyEphem astronomy library for Python. For most Windows users, an attempt to build the extension ends abruptly with the terrible and famous message:
error: Python was built with version 7.1 of Visual Studio, and extensions need to be built with the same version of the compiler, but it isn't installed.
And, as I myself do not have Visual Studio on the small Windows machine that I deign to own for the sake of my photo printer, I have never been able to offer my users much help. But earlier this year, a helpful PyEphem user named Jeff Kowalczyk emailed me a link to Philip von Weitershausen's post “Cheap binary Windows eggs”, which describes a method for building Python extensions using a freely available compiler. (more...)

Posted in Computing, PyEphem, Python | No Comments »

Check!

I treated my Facebook account as little more than a curiosity, browsing occasionally for friends of my youth, until discovering the Chess Application! Online chess relieves the game of two horrors for me, of which I had not even been aware until I noticed them during this first online game because of their absence: the horror of a waiting opponent, and the curse of having to wait for them in turn! It turns out that, for a novice like myself who can take upwards of a half-hour to even begin to appreciate the complexity of a given position, to play a live game is only to be rushed through a series of bad decisions. But now, over morning coffee, I can ponder the board for as long as I wish, and can therefore begin — just begin — to glimpse the beauty of the complex possibilies that each move offers. And then, my move complete, I can go about my day without being fixed, inactive, in a chair while my opponent weighs his decision. I will have to thank Ilan for telling me about this — maybe even by playing him in person sometime, like he originally asked!

Posted in Web Notes | No Comments »