Category Archives: Programming

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

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

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 “This sounds trivial” I thought, and reached for my simple … Continue reading

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

Visualizing Data Using the Hilbert Curve

Some time ago, a coworker asked me to help him visualize some data. He had a very long series (many millions) of data points, and he thought that plotting a pixel for each one would visualize it well, so he … Continue reading

Posted in Fractals, Graphics, Math, Programming, Python | Tagged , , , | 2 Comments

Open Redirects

In this post I’ll discuss an issue I tackled a short while ago – open redirects. But first, the story of how I got to it. Feel free to skip ahead to the technical discussion. Background Our analytics for … Continue reading

Posted in Programming, Security, web-design | Tagged , , , , , , , | Leave a comment

Pyweb-il Presentation on Optimization Slides

Last Monday I gave a presentation in pywebil on optimization, that’s loosely based on my blog post on the same subject. Here are the slides for that presentation.

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

Javascript Element Creator

Some time ago I was working on optimizing the client side code of my website,, an online trip planner. This website does automatic trip planning, and the problem was that recalculating trips was slow. After profiling, I found out … Continue reading

Posted in Javascript, Optimization, Programming, Projects, startup, web-design | Tagged , , , | 2 Comments

Ethics in Programming

Some time ago I was bothered by the issue of ethics in programming. I heard the question best raised during a “game unconference” I attended. There was a panel about monetary systems for games, and people talked about the issues … Continue reading

Posted in Programming, Programming Philosophy | Tagged , | 7 Comments

Simple SQLObject DB Migration how-to

I’ve been using sqlobject for for quite some time now. So far my experience with it has been positive. Although I’ll probably change ORM when I move to django, for now it stays. While it stays, I need to … Continue reading

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

The mathematics behind the solution for Challenge No. 5

If you take a look at the various solutions people proposed for the last challenge of generating a specific permutation, you’ll see that they are very similar. Most of them are based on some form of div-mod usage. The reason … Continue reading

Posted in Challenges, computer science, Programming, Python | Tagged , , , , | Leave a comment