Category Archives: Programming

LearnLang – a small chrome extension for learning the German cases

I’ve been learning German for quite some time now. Some months ago, it came to the point where I was stuck – in order to progress I had to learn the German cases by heart. It’s not a lot of … Continue reading

Posted in Programming | Tagged , , , , , , | Leave a comment

Writing a pandemic simulation

Over the last weekend I felt like programming something fun and easy, so I thought, why not write yet another pandemic/epidemic simulation. So between helping a crying child and preparing lunch, I created simpandemic. It’s small, simplistic, but easy to … Continue reading

Posted in Programming | Tagged , , , , | Leave a comment

How I learned to stop worrying and actually use StackOverflow

So apparently almost all of the developers in the world are using stackoverflow. However many developers just use StackOverflow to lookup answers, and rarely to ask their own questions. Answering other people’s questions is of course rarer still. Up until … Continue reading

Posted in Programming | Tagged | Leave a comment

Two bugs don’t make a right

While working on my new startup, we are doing a little bit of reasoning using implications. One of the more curious forms of implications is the negative form: consider the following exaggerated example: a place being kid-friendly implies that it … Continue reading

Posted in Programming | Tagged , , , , , , | 1 Comment

Optimizing Django ORM / Postgres queries using left join

For the latest project I’m working on, we’re using Django with Postgres. I was writing some code that had to find a list of objects that weren’t processed yet. The way they were stored in the DB is like so: … Continue reading

Posted in Databases, Optimization | Tagged , , , , , | 1 Comment

Collision: the story of the random bug

So here I was, trying to write some Django server-side code, when every once in a while, some test would fail. Now, it is important to know that we are using any_model, a cute little library that allows you to … Continue reading

Posted in Python | Tagged , , , , , | 2 Comments

Cheap language detection using NLTK

Some months ago, I was facing a problem of having to deal with large amounts of textual data from an external source. One of the problems was that I wanted only the english elements, but was getting tons of non-english … Continue reading

Posted in Python | Tagged , , , , | 6 Comments

Wikipedia Images

A few days ago a friend (x) of a friend (y) showed me and my friend (y) a small app he was developing, that had photos from flickr and picasa. We suggested adding photos from Wikipedia as well, but he … Continue reading

Posted in Programming | Tagged , , , | 3 Comments

Python Module Usage Stats – Feb 2011

Here are the top 30 “base modules”, ordered by number of PyPI projects importing them. These results are based on 11,204 packages download from PyPI. Explanations, full results and code to generate them are available below. Continue reading

Posted in Python | Tagged , , , | 9 Comments

Small programming challenge No. 6 – nblocks

I came up with this challenge when I had to write a function to divide a sequence to percentiles. I needed this to calculate some statistics over trips for plnnr.com. “This sounds trivial” I thought, and reached for my simple … Continue reading

Posted in Challenges, Programming, Python, Statistics | Tagged , , , , | 22 Comments