Posts

Quis experiet ipsas experientiae?

Who will test those tests? A while ago I was invited by the lynch-mob in #twisted to write a post about what I meant when I said that "Unit tests are not real tests", and here it is. Now, recently there has been much said about Unit-testing, and code coverage , and even sensationalist blog post titles , which in retrospect "Unit tests are not real tests" would have been. I won't talk about code test coverage here, because its not relevant, we should strive to get as much coverage as we can. And of course I believe that unit tests are a fundamentally important piece of development. Especially since I tend to use Python , which is prone to disaster if not tested correctly. So, if unit tests are real tests, then why did I say they aren't? I deal mostly with application development. The user of the application is a human being. Now quite simply, the only true test of my application is the user interacting with it. I understand now that this is not really the ca...

Glashammer, an alternative framework on Google AppEngine

In his blog, on Friday, August 29, 2008 , Johnathan talked about Google AppEngine , and said the "you can use any web framework you like, as long as it's django" attitude That may have been true then, it probably isn't true now. Glashammer have been working for the last few weeks on getting the Glashammer framework of Werkzeug and Jinja2 running and easy on Appengine. Firstly this wasn't hard. Glashammer is very free about what kind of data storage you use, so using Appengine's DataStore was straightforward. Some utility functions for running easily, add a few decorators for controlling what happens for authentication form redirection to limit views for certain users and we are pretty much done. They have additionally tried to make it easier to install with a little script to get us started. So (since it seems a good start): gh-admin quickstart_gae This will generate a starter AppEngine + Glashammer application that is ready to go. It will al...

What Twisted could learn from Kamaelia.

Two awesome things: Twisted , and Kamaelia . I will not compare them. They are different, and have different purposes, and as I said. Both are great. I have recently been playing with Kamaelia for the first time. If you don't know what Kamaelia is check out http://www.kamaelia.org/ but I admit it does take some getting my head around. (Just like Twisted did, back in the day when I first came across it.) But persevere. Kamaelia is a library for creating highly concurrent applications. And along the way it has reminded me of: Erlang, Tasklets and Twisted. It has a highly componentized approach where components communicate with eachother using inboxes and message passing. That's all I'll say about it here. I am sure I will blog more as I use it more. Now the first thing I want to do with Kamaelia is be able to hook it up with GTK, and I have managed to do that, but it was incredibly easy. Why? Because Kamaelia is happy to run its scheduler in the background in a non-main thre...

bitbucket.org Dream Project Hosting?

Well, I am always in search of new ways to host and serve code. Recently I have been using bitbucket.org's free service more and more. The benefits as I see them are: Mercurial hosting Ability to branch and publish any number of branches (a la launchpad) Plain web space for hosting generated documentation etc, with built-in wiki User interface entirely geared around source code I don't have to host it myself Responsive and generous developers Now if we were to compare this to some other things, we might have: (and please correct me if I am wrong). Mercurial Publish many branches Web space Wiki Hosted by someone else for free Bitbucket.org Yes Yes Yes Yes Yes Launchpad.net No Yes No No Yes Google code No No No Yes Yes Self-hosted Trac Yes No Yes Yes No There are features that I would still really like, and the great developers are implementing them as we speak. The most exciting is the idea of an API where third-party applications could be written to do just about anything. S...

The problem with jQuery

Ok, I'll start by saying that I love jQuery as much as the next developer, and every contributor has my eternal thanks, but there is a problem. Plugin development goes crazy, in that many similar plugins are released, and often these are just modifications including other sets of modifications. There must be a better way, like isn't this what version control is made for? Here is an excerpt of http://docs.jquery.com/Plugins#Forms * Autocomplete by Dylan Verheul Autocomplete with caching to limit server requests and other options. * jQuery Autocomplete Mod by Dan G. Switzer Modification of Autocomplete plugin with enhancements and bug fixes. * Modified Auto-complete by Anjesh Tuladhar Auto-complete plugin extended for auto-completing multiple words in the same text input * Autocomplete by Jörn Zaefferer Heavily improved Dylan Verheul’s initial plugin, integrating modifications by Dan G. Switzer and Anjesh Tuladhar. * jQuery Autocomplet...

Blogger Comment Spam - Deleting it

It seems over recent months that my blog gets comment spam. I imagine any bloggers out there experience the same thing and it is a bit of a pain. I have three immediate problems with this and blogger.com. 1. Blogger doesn't notify me of all comments at the time they are posted. It notifies me of some, and I have of course configured it to notify me of all comments, but it seems to miss off about 70%. So not only do I not notice the spam, I also miss a bunch of legitimate comments. Please get it together Blogger! Ajax panel configuration is nice, but only if the core functions work. 2. Blogger should/could/might try to stop this spam before it happens. I am not guessing how, but then the company that runs Blogger.com are much brighter than me, and I am sure they have a solution. 3. The interface for browsing comments and deleting many at a time simply does not exist. This would make the task of sifting through, identifying, and delting spam much easier. Now that I have had my grumbl...

CouchDB with YUI Datatable

I am not kidding, this must be the easiest way to get a ajaxy table of results from a database. For those who haven't heard the buzz, CouchDB is a document-based database. I am not an expert in databases so I won't really comment about CouchDB itself. One incredible feature is that the database server is queryable over HTTP (with REST) and responds with JSON, which seems perfect for writing pure Javascript applications. YUI probably needs no introduction. I think its the best JavaScript library for maintainability, and documentation. It sometimes seems a bit verbose, but I like verbose. Note: You will have to get around the fact that you cannot make XHR requests to a server other than the server that the page lives on, either with a reverse proxy setup, or by hosting the files themselves in CouchDB. (I won't explain that here). So, a basic request to a database to return all the documents goes something like this: a GET to: http://myserver/dbname/_all_docs And that will ret...