Speed test between django_mongokit and postgresql_psycopg2

March 9, 2010
15 comments Python, Django

Following on from yesterday's blog about How and why to use django-mongokit I extended the exampleproject which is inside the django-mongokit project with another app called exampleapp_sql which does the same thing as the exampleapp but does it with SQL instead. Then I added a very simple benchmarker app in the same project and wrote three functions:

  1. One to create 10/100/500/1000 instances of my class
  2. One to edit one field of all 10/100/500/1000 instances
  3. One to delete each of the 10/100/500/1000 instances

Truncated! Read the rest by clicking the link below.

How and why to use django-mongokit (aka. Django to MongoDB)

March 8, 2010
11 comments Python, Django

How and why to use django-mongokit Here I'm going to explain how to combine Django and MongoDB using MongoKit and django-mongokit.

MongoDB is a document store built for high speed and high concurrency with a very good redundancy story. It's an alternative to relational databases (e.g. MySQL) that is what Django is tightly coupled with in it's ORM (Object Relation Mapping) and what it's called now is ODM (Object Document Mapping) in lack of a better acronym. That's where MongoKit comes in. It's written in Python and it connects to the MongoDB database using a library called pymongo and it turns data from the MongoDB and turns it into instances of classes you have defined. MongoKit has nothing to do with Django. That's where django-mongokit comes in. Written by yours truly.

Truncated! Read the rest by clicking the link below.

Importance of public URLs and how enterprisecarsales.com gets it wrong

March 5, 2010
0 comments Web development

Importance of public URLs and how enterprisecarsales.com f's it up A friend of mine found a nice car she on www.enterprisecarsales.com so she copied the current URL from the address bar and emailed that to me. The URL was: http://www.enterprisecarsales.com/carsales/vehicleDetails.do?carIndex=1&vin=1GCHC24U36E112452 which by the look of it (notice the /vehicleDetails.do part of the URL) takes you to a page that says "Sorry, we are unable to complete your page request since the page you are trying to access no longer is available." How stupid is that? Come on, web developers made those kind of mistakes in 2001. Not 2010.

This means that people can't talk to each other about found matches on the site and this is something people want to do. Especially if you're going to spend $thousands on a car.

Come on Enterprise web team: install Django or something and give users what they want not your excuses.

How girls/guys rate guys/girls

February 27, 2010
1 comment Misc. links

How girls/guys rate guys/girls It's of course a simplification but is it not true? Come on, admit it, isn't there something to it?

What do you think? As a man I must admit that it does feel like that. I don't know about the girls perspective so I'd love to hear what you think (keeping it mind that it's an exaggeration)

Last.fm Tube Tags

February 13, 2010
0 comments Music

Last.fm Tube Tags Last month I marveled over the cute LastGraph which shows you a visualization of what artists you've been listening to on Last.fm lately in a neat way. Today I discovered this cute visualization: Tube Tags

I think it's only for paying Last.fm users since it says "VIP" next to the link. My understanding is that it shows the genres of music you've been listening too recently in a London Underground type of map way. Very neat.

Here's mine (31Kb PDF)

Haiti Earthquake: Who's given what?

February 2, 2010
0 comments Politics

Haiti Earthquake: Who's given what? If I've understood it correctly, this is a mashup made on Guardian's API made by someone not at the Guardian. More photos here

What's interesting about this chart, which I've never seen like this before, is the last one where they show how much money various countries pledged versus how much they actually delivered. It's something I've also wanted to see because it opens up a whole new dimension of truth to the equation. For example, Canada has pledged USD 130m to the Haiti Earthquake but they only delivered 51% of what they pledged to the 2004 Tsunami crisis.

Healing Food Reference

January 27, 2010
0 comments Misc. links

Healing Food Reference Spotted this website called Healing Food Reference which is what the name says; a reference of food and their healing "power". From the home page:

"This site is part of a public education project created by Mike Adams, the Health Ranger, and hosted by Truth Publishing. Its purpose is to educate and empower consumers with information they can use to prevent and even help reverse degenerative disease. There are no commercial sponsors of this site, and neither Mike Adams nor Truth Publishing was paid anything to create this site."

Basically click on a type of food, for example tofu and you get a list of things it can help with such as fever and then from the fever page you can more foods that help.

At first I was a bit taken aback by the home page and huge amounts of text on it but once you're in it is so easy to use. Perhaps the reason the home page is jam packed with content is for his search engine optimization.

Guake, not Yakuake or Yeahconsole

January 23, 2010
4 comments Linux

I've been a big fan of Yakuake for a long time. It's a terminal you have open all the time in Linux that is shown and hidden, over any other windows, by a simply hit on the F12 button.

But as of more recent versions of Yakuake it has become really slow. It sometimes take 2-3 seconds from F12 press till you can type on the terminal. So I uninstalled it and tried Yeahconsole but I uninstalled it equally fast as I understood it was broken and didn't work at all despite being in the Xubuntu apt repositories.

Last but not least I ended up using Guake which not only works but also works really really fast. Screenshots here