Japanse New-Girl Monkey Network

Reinventing the Wheel - Part I: Homegrown Blogging

Warning: Geek Speak Ahead

I like doing things my own way, myself. Part of it is because doing things myself helps increase my understanding. Part of it is also I'm a complete control freak.

This explains why, when there are tools out there like Blogger, GreyMatter, Moveable Type, Radio, and so on, ad infinitum, I am still using a bunch of hand written Python scripts to generate a database driven blog. Yep, it's a bit clunky, and sure it doesn't have whiz-bang buttons and RSS feeds and stuff. But it's mine and I love it.

Which is why I'm in the middle of a painstakingly slow rework of my database and my code to produce an all new wonderful pile of hand written Python scripts, which maybe has some whiz-bang and RSS feeds or that "We can't decide on a name" syndication format (personally, I think they should just call it "The Nameless One" which has a nice evil creepy ring to it, instead of boring Atom/Pie/(N)Echo/Whatever).

It's painstakingly slow because a) having a job eats up free time, b) having a boyfriend is pleasantly distracting and has done wonders for my social life, and c) Apple designed a stupid shoddy power supply for its old-skool Clamshell iBooks (one of which I am an owner) and I don't have a wireless home computer to use anymore (well, until the new one gets here, which is hopefully in another couple of weeks or so).

So I thought that posting some of what I've done so far would make it seem like I'm actually getting somewhere. Plus display my mad Python skillz0rs. Woo. Not to mention the pitiable lack of blog entries I've had lately (see a, b, and c, above).

To begin, ladies and gentleman, we have a lovely database model.

Organizing into Projects

When I first made my loveable little jalopy of a weblog backend (back in... 1999? 2000? something like that), it was pretty simple collection of concepts. I had "articles" (like the thing you're reading now) and "categories." (Right now, you're reading the ARJLog category. There's also a Geek Icon category and a JNGM category. Basically "category" ended up defining separate blogs.) Each article had one category, and each category could have as many articles as it wanted. Articles had a title, description, some content (this is the content here!), a timestamp for when it was created, and another one in case I ever updated/made edits to it. Another table for the blogroll links, and voila, it was a weblog! (Well, after some serious Python hacking, it was.)

But now I want to do new things besides just post random stuff on a semi-regular basis. I have a Grand Vision. I want to be a writer. I want to post my writing projects. I want to be able to categorize stuff that I'm working on. I want different drafts of the same thing to be grouped together. So now I've got a project-orientated model.

The Nitty Gritty

Here's the new list of tables that I've implemented in the database.

weblogs
Defines an individual weblog. Potential examples include "The Geek Icon" (what ARJLog will be transmogrified into), "All Things White and Circular" (what I think I will call my writing journal), and anything else that occurs to me, depending on how much brain I have to dump after this. A weblog has: a name; a description; a creation date; a root url.
projects
Defines a group of associated articles and links that all have to do with a particular finished product in mind. A project might be a poem, a program, a short story, or a sock I am knitting and documenting on my blog. A project has: a name, a type, a description, a creation date, and a status.
category
Defines a group of articles or links that are topically similar. For example, my blogroll could be a link category. "Lame Pseudo-Techie Ramblings" could be an article category. Projects could contain articles from a number of different categories. Categories could contain articles from a number of different projects. There's no direct hierarchical link between the two. Categories have: a name, a description, a parent (for categories within categories).
link
A link is just an external url. Like a blogroll link. It has: a url (duh), link text (e.g. the words that get linked), a description (optional additional unlinked text describing what the link is), an annotation (like a mini-editorial about the link, optional also), and a creation date.
article
Defines an individual block of text in which I compose some words that are supposed to mean something. This thing you are reading right now is an article. I think it should be pretty self-evident. An article has: a title, a description, a creation date, an updated date, content, and some keywords. An article can only belong to one blog and one project. It can belong to more than one category.
comment
Text that someone else can write about my article. I think this should be self-evident too. A comment has: commenter's name, commenter's email, the comment itself, a creation date. A comment belongs exclusively to one article only.

Those are the basics. Hopefully by the next post I'll find time to put up a full, formal database spec.

{ link me }

ARJLog is now defunct. For more exciting stuff see: