Stavros' Stuff

On programming and other things.

Developing an IRC frontend in Go

I’ve recently been considering an idea for a new project, and I’ve slowly began to code it in my spare time, when I’m not developing Instahero. The basic idea is a bot that will hang out in companies’ channels, giving them useful commands, logging, and lots of other functionality.

There are various open-source solutions which one can use to do the same thing, but I think there’s also need for a hosted solution where you can just register, enter your room details and get a bot in it in one minute. As a developer, I know my life would be much easier if we had deployment commands, conversions, various searches, bug report notifications, etc available right in the channel where our team spends the day. I’m sure other developers feel that way too, so I started developing Instabot.

Continue reading…

Developing a back-scratching robot

As with all men and many cats, I derive particular pleasure from having my back scratched. When I say “particular pleasure”, I mean that I am absolutely crazy for it. I just can’t get enough of it. Unfortunately, it is very tiresome for the person doing the scratching, so I never could get anyone to last very long. Even my girlfriend’s valiant efforts have been woefully inadequate.

When I rea

Continue reading…

How to highlight code in Python

I’ve recently been looking at syntax highlighters, both for this blog and for Instahero, the new product my company is developing. I used to use a JS-based solution for the blog, but it broke with many inputs, it was fiddly to work with, didn’t parse correctly sometimes, and slowed the site down considerably. I especially disliked the fact that you had to include one JS

Continue reading…

The curious case of the range() function

If you’ve ever programmed in Python, you have a 96.2% chance of having used the range() function. As you have a 96.1% chance of knowing, said function returns a list containing an arithmetic progression of integers, exactly as the documentation says. For example, range(4) returns [0, 1 2, 3].

If you’ve ever bothered to look at the docstring, you will see that it goes thus:

Continue reading…

A schemaless layer over SQLite

I’ve been hard at work these days, and to relax I decided to develop a small application/side project. As with many applications, I needed a reliable, persistent store, so I went with the most reliable, easy to set up, performant, and generally awesome store I knew: SQLite.

However, since this was a very experimental prototype, I got tired of the frequent schema changes and wished I had something

Continue reading…

Winning at Puzzle Adventures

A few weeks ago, some friends of mine started playing a Facebook game, Puzzle Adventures. This is a (pretty fun) jigsaw puzzle game, so I played a few levels at some point. The game limits you significantly in many areas (e.g. you can only play three or four games before you have to wait for minutes to play more, or pay). The game is also geared against

Continue reading…

How to handle Python package installation on GAE

As I’ve mentioned many times on this blog, I’m a big fan of Google AppEngine. I like the free tier, the effortless scaling, the zero administration, and how I can run Django almost unmodified and deploy in seconds. It has its downsides, but overall I like it very much.

The one part of deployment I didn’t like was dependency handling. Due to the way GAE works, you need to install all packages in t

Continue reading…

On authentication usability

A few days ago, I tried to log into my alternate Facebook account, one I hadn’t logged into for a while. After the first or second failed attempt at logging in (I couldn’t remember the password), my mail client rang and I saw the following email from Facebook:

Facebook login email

This struck me as a fantastic touch and a great usability boost. It also made m

Continue reading…