21 blog posts from 2009 :

Scenes from a snowy day

December 19, 2009

Taken while walking through Wyman park.

Wyman park in the snow.

 

Wyman Park in the snow

Tagged with: , .

There are 0 comments for this post.

Relaunch, ho!

December 9, 2009

I've entered the final stretch on my site relaunch. Coding and templating are probably about 99% done and the project currently stands at about 3500 lines of code, including HTML templates. I'm a big proponent of TDD and belleville comes with an extensive suite of unit tests. Using Ned Batchelder's excellent coverage.py library, I can measure my test coverage, which currently stands at about 86%. That's pretty good as far as I'm concerned, and although I'll probably be able to improve that soon, it won't be before relaunch.

So besides a few sections of the site that need a little styling love, the final remaining task is migrating content from my old blog to this one. As of this post, mazelife.com contains 26 blog posts with 16 comments using 21 distinct tags. That's a depressingly small amount of content that could well be migrated by hand (e.g. copy-and-paste) but I'll probably dump the existing blog content as JSON data, then write a script that serializes it and puts it into the new system.

Tagged with: .

There are 0 comments for this post.

Site relaunch screenshots

December 3, 2009

Got some screenshots up of the redesigned blog (just filled with test data right now):

Take a look at :

read more »
Tagged with: .

There are 0 comments for this post.

Now this is an interview

December 3, 2009

I’ve had a big blog post floating around in the back of my mind about journalism (particularly print) today and the issues which have brought it to the rather unpleasant state in which it now finds itself. I worked for one of the newsweeklies for a couple of years and that's given me a first-hand look into the problem, and I still follow the issue closely. Maybe one day I’ll get around to to writing that post, but in the mean time: a small scene I found rather revealing:

read more »
Tagged with: .

There are 0 comments for this post.

Site Relanch: Update II

November 30, 2009

Apologies, first off, for this blog being so "meta" lately, but I thought I'd offer an update on the site redesign progress. And the update is: meh. The project currently stands at 1069 lines of python, 170 lines of html and 122 lines of CSS. The blogging and tumblelog apps are completely done, including comments, tagging and the ability to cross-post tumblelog entries to a Twitter account. I've templated all the views and done some basic styling. And I do mean basic. Here's a screenshot of a blog entry detail page:

read more »
Tagged with: , .

There is 1 comment for this post.

Pre-Thanksgiving Relaunch Update

November 21, 2009

Progress on my personal site relaunch for Sitesprint II continues apace. At this point all the work has been on the backend code but my gains there have been good. In my last post I set some ground rules which I have so far kept, including five significant commits to my code repository per week. Admittedly, it’s only been one week, but whatever... The result is Belleville, a blogging CMS written in Django. As I mentioned, this site currently runs in a Django-based CMS I wrote a while ago. Does the world really need yet another django-based blogging CMS? Or another blogging CMS at all? Well, no, probably not; but I do. And my hope is that this one represents a good example of code that is idiomatic to Django, is extensible, offers a nice feature set, and is easy to theme; in other words, I hope other folks might find it useful too. It’s open source and free for the taking.

read more »
Tagged with: .

There are 0 comments for this post.

I require some structure

November 15, 2009

I happened to post about redoing my personal site the same day a coworker pointed me to Sitesprint. The idea behind it is to stop procrastinating and launch or re-launch your personal site by December 15th. The rules are simple:

  1. launch by 12/15
  2. document your process
  3. on launch, share what you did and how you did it

If you followed the progress of my django site-seach module, you'll know I'm the procrastinating type. Definitely. So I signed up and I'm hoping this will give me the kick in the pants I need to knock this thing out. Forthwith a few personal rules:

  • 5 signifigant contribs to the svn repo for my new site CMS per week.
  • One blog post about the prcess per week
  • Feature-complete by 11/25
  • Design (such as it is) done by 12/1
  • Design coded by 12/5
  • Soft launch 12/10

So, we'll see how it goes. The coding part I'm not worried about, to be honest. But design...ugh. I've tried to redesign this site about 5 times since I launched, and I wasn't happy with anything I came up with, which is why the site still looks like it does.

Tagged with: .

There is 1 comment for this post.

Work In Progress

November 15, 2009

This blog is written in Django, as mentioned in other posts. Other than a few minor improvements, it's basically the same code I wrote over year ago. I've decided it's time for a rewrite for two reasons. Firstly, I know a lot more about Django now than I did then and there are some things I'd like to improve and some functionality I'd like to add. Secondly, this format doesn't really fit my life. I like doing longer-form entries but rarely have the time, and as a result, there's not a whole lot going on here. My new blog will have a more-frequently-updated tumbleog feed right alonside the normal blog feed (Simon Willison's blog inspired this idea.) There will be RSS feeds for both, separately and together. You can follow my progress or grab the code for your own use.

I'm also planning to move hosting. I'm using Dreamhost now, which is fine as commodity hosts go, but they really don't handle Django well. They force you to use fast-cgi which is bad for a number of reasons and they also like to kill fast-cgi processes, which causes the occasional 500 error to show up around here (just refresh and you should get the page you want). I understand why they want to do this, but the end result is that this just isn't a good place for Django. I'm looking into webfaction, as I've deployed Django apps there before and liked it, but other suggestions are appreciated.

Finally, I'd like to redesign this. Frankly, though, I'm not a good designer—or a designer at all, really—so it probably won't look much better.

Update: Same day I post this, I see Sitesprint. So I went ahead and signed this site up for it.

Tagged with: , .

There is 1 comment for this post.

Something New

November 12, 2009

I’ve been thinking about learning a new programming language. Python is where I spend the majority of my time now, and while I certainly don’t know every nook and cranny of it, two-and-a-half years of regular use has left me feeling I know it pretty darn well.

Don’t get me wrong: I still love Python and I hope to continue using it for a long while. It’s just that it’s gotten a little...comfortable. I’d like to try something that will expand my horizons and challenge me in different ways than Python has. I figure it takes a good 6 months of regular use to get really comfortable with a language, so I want to be sure I pick one that’s worth it. I’m a web developer, so I’d like a language I can actually use in that context. Based on that, there’s a couple of languages I’ve already decided to cross off my list:

read more »

There are 3 comments for this post.

Towards a django.contrib.site_search (Part 3)

October 28, 2009

OK, so my site_search module is finally done. Or at least it's reached a state where I feel comfortable releasing it. It works, but it's still very alpha in quality and I welcome feedback on it. In my final installment of this post series I'll focus on the mechanics of wiring all the separate pieces together in Django. In fact, part of the reason for the delay between this post and the last one was due to some major re-factoring that I finally got around to, the purpose of which was to bring my search app more in line with packages in django.contrib, like auth or admin. I really would like search to be a drop-in component in the way those other components are, where all that is required is some initial configuration and templating by the user.

read more »
Tagged with: .

There are 0 comments for this post.

Update and Some Music

August 19, 2009

Well, first the update: my django-site_search module is not dead. In fact it's finished...almost. I've even written the final blog post discussing it, but have withheld publishing it until I have the source code ready to go along with it. Right now, the only supported backends are mysql and postgres. I plan to add Oracle and SQL Server to the mix eventually, but in the mean time, I'll really try to get this up within the week. A bit more testing and better documentation is required first.

In the mean time, I've been listening to volume 4 of Teldec's The Ligeti Project. This series offers recordings of the composer György Ligei's complete works (taken up by Teledec after Sony started and then abandoned the project...jerks). Given that this came out in 2003, I'm pretty late to the party. I've acquired about 50% of the series—sporadically and out of order—but they've all been great recordings with really skilled performers. This disk is definitely on of my favorites. It's got:

read more »
Tagged with: , , , , .

There is 1 comment for this post.

Ads on the moon?

July 22, 2009

So I was twittering about this company that claims to want to put advertising on the moon by imprinting patterns in the lunar dust with a rover of some sort. At first I was just shocked and/or pissed that anyone would think this was a good idea. But then I started thinking about whether such an idea was even possible. After all, for something to be visible to the naked eye on the moon, it's got to be really big. For example, the Mare Crisium is a basin on the moon that's usually visible to the naked eye, and it's 176,000 sq. km.

So just how big would we be talking here? Let’s do a little calculation...

read more »
Tagged with: , .

There are 2 comments for this post.

Towards a django.contrib.site_search (Part 2)

June 17, 2009

Search engine indexing is the foundation of search. Although some RDBMS—notably Postgres—allow you to build ad-hoc full text search indices from an arbitrary number of table columns at query time, the best approach both for universality across DB back-ends and for performance is to build an index of relevant content that exists alongside and is updated with that content; in other words: a cache-based search engine. Given that we’re using the capabilities of the supported Django RDBMS to query these indices, it makes sense to store these them in a database table. But where, exactly?

read more »
Tagged with: , .

There are 0 comments for this post.

Towards a django.contrib.site_search (Part 1)

June 3, 2009

Somewhat ambitious, I know, but I’ve become convinced that site search is the next frontier for Django. Let’s face it: users like search. Everyone knows how to use it. It’s usually the first thing people with the goal of information-finding turn to. Before site maps, before content hierarchies, before tags...people turn to search. That’s a good thing, if you have a search for them to use and itt works well.

Over the next two weeks, I hope to outline an approach to building a site search application that will work well, scale well, be as easy as possible for application builders to implement, and accord with the design goals of Django. And if I’m lucky, perhaps some form of this will make it into django.contrib. There’s certainly no surfeit of requests for such a feature. 

Before we begin, a warning: although I have the architectural approach pretty well laid out in my head, I’m still writing the code. These posts will not lack for code snippets (well, this one will), but I probably won’t be ready to provide the full version of the app until the final post. So, caveat lector—these posts demonstrate a work in progress. That said, if I later reverse course on something I outline in a post, I promise to note that in the next one. 

read more »
Tagged with: , .

There are 0 comments for this post.

On mint juleps

May 1, 2009

Apropos of Nick Kindelsperger's post on the Julep, there's a great quote by H. L. Mencken:

A man who'd put rye in a julep would put scorpions in a baby's bed.

Personally, I dispense with the anachronistic silver cup and omit the simple syrup, just going with shaved ice, good bourbon and plenty of mint. There's one other funny quote which I read in an old book once (now forgotten) that I'll paraphrase:

read more »
Tagged with: .

There are 0 comments for this post.

Things I'd like to see

March 25, 2009

Dear Mr. DeSantis:

Worried about your $742,006.40, eh?

Well, cry me a river.

Edward M. Liddy,
CEO, A.I.G.

Update: Roy Edroso beat me to it, and with his usual panache.

read more »

There are 0 comments for this post.

Not this again

March 6, 2009

For some reason, Jeff Atwood periodically likes to return to the great HTML validate vs. don't validate debate. As it happens, I agree with him: getting all your site's pages to validate is largely pointless. And while validation of XHTML is essential—or will be, when application/xhtml works in all browsers—XHTML also sucks. In fact, it sucks for that very reason.

read more »
Tagged with: .

There are 3 comments for this post.

Better Tools Please

February 6, 2009

I'm kind of behind in my blogging; I promised to finish what I started in my critique of jQuery, but I was busy/lazy and am now just straight up lazy (and on vacation in San Francisco). I will get to that post, but in the mean time I wanted to mention something that occurred to me after reading an amazing article about the new buttons in Gmail and how they were made. In it, Douglas Bowman explains how he and a team of Google engineers created some controls they call custom buttons, user interface elements that, "are designed to look very similar to basic HTML input buttons. But [...] can handle multiple interactions with one basic design."

Clearly, an amazing amount of thought and time went into these and they are impressive. But, after the intial “wow” wore off, I found myself wondering why it’s so hard to make what is, after all, a simple user interface component, and make it work properly in all browsers. I’m a web developer, so the amount of work this took didn’t really surprise me, but I think it should have. It’s the old (and possibly apocryhal) boiling frog story: as the web is used to do more and more, the complexity of interfaces it must provide increase. But the tools we have to use have remained almost unchanged. We didn’t notice as things got more difficult, because it happened slowly, but one day it takes a team of really smart people a hundred hours to build a button, and you wonder: “how the hell did we end up here?”

read more »
Tagged with: , , , .

There are 2 comments for this post.

jQuery followup

January 23, 2009

One point I ought to have made and which a reader pointed out is that jQuery does have plugins—lots of them in fact—which provide some of Protoype's functionality. Also, it's easy enough to write your own plugins if you wish to. I noted the lack of a curry function in my last post, so here's a quick-and-dirty port to jQuery:


jQuery.curry = function(fn) {
    if (arguments.length < 2) return fn;
    args = $.makeArray(arguments).slice(1, arguments.length);
   return function() {
        return fn.apply(this, args.concat($.makeArray(arguments)));
    }
}   
// Use like this:
add = function(n1, n2) { return n1 + n2; }
addThree = $.curry(add, 3);
addThree(2);

The other way of doing this (which I think is more idiomatic) is by modifying Function.prototype directly so you can call a curry method directly on your function. Of course then it's no longer strictly a jQuery plugin.

Tagged with: , , .

There are 0 comments for this post.

jQuery: so close...and yet...

January 22, 2009

So I’m finally, officially making the switch for real this time from Prototype to jQuery. I’d been meaning to learn it anyway, and since it’s the lingua franca of my new job, I figured now is a good time. The experience has been good: documentation is excellent and things are fast, easy and require a minimum of effort. And yet...and yet...I can’t help missing Prototype; or at least some parts of it. Let me draw an analogy with espresso makers:

read more »
Tagged with: , , .

There are 2 comments for this post.

Mmmmm...snowy day

January 19, 2009
Belwo the fold, a shot in Wyman Park, across the street from me.
read more »
Tagged with: .

There are 0 comments for this post.