A Sunday Project: Ambush Code Review
I spent this past Sunday getting in touch with the Google App Engine after looking at it from the corner of my eye for a couple of months (at least I think its been that long). I ended up going for one of the standard fun but useful projects, a syntax highlighing project. The project is called Ambush Code Review, and has a slightly different aim than most syntax highlighting applications.
I'm hoping to refine Ambush Code Review into a tool for making it easy to post code snippets, and then to easily submit comments and improvements. Certainly it has a ways to go before reaching its sweet spot, but it has the foundation implemented. When viewing a snippet, you can--within that same page--post a response snippet, which will be visible as its own snippet (with a link indicating what snippet it was responding to), and also fully displayed on the page of the snippet being commented upon.
I am torn about whether or not I want to implement explicit comments for the entries. At the moment the encourage way of leaving a non-code comment is to simply select a friendly highlighter and leave comments within the correct syntax. For example you might leave a Python comment like this:
# Wow... this snippet is wack.
# Did Will try programming in Python again?
# That boy needs to stop
Then again, that may not be a particularly friendly way of implementing comments. We'll see, we'll see.
The Pieces
I'm going to write a more in-depth piece on developing for the Google App Engine in the near future, so here I'll just quickly mention the pieces I used.
- Django from SVN: The differences between 0.96 and the current trunk are simply too many to remember easily. Since its easy enough to use trunk, I decided to use it.
- Pygments: The best and simplest of the Python syntax highlighting libraries. I already use in my blog software with Django, so it was a natural choice.
- GAE Django Helper: I used the Django helper library, although I didn't actually make use of much of it. More discussion on this in the full write up.
- A dash of handwritten xhtml and css (the front page validates correctly, haven't really checked elsewhere ;).
- The Google App Engine version of the Django Form library.
The Quick Summary
Writing a Google App Engine application is a lot of fun, and similar enough to normal Django development that a Sunday afternoon is all you need to make the jump. It is also bar none the easiest deployment process, ever (okay, okay, php and static pages are still easier, oh well). Give it a whirl, I think you'll like what you find.