I usually don't pirate

I usually don't pirate if there's a convenient way for buying new media. Most of the time it's just the problem that the things you want are either:

  • not available in your area/country
  • not available in the desired language
  • not available online (or only streaming)/restricted in how or when you can access it.

Service problem

It may sound impatient, but why would you not be allowed to control the music, games and videos you bought? - "I want it all, and I want it now".
Steam is an excellent example with no restrictions: You can buy and download games at any time, switch PC and install the games you bought before without any problem. No "You can only install this game on 1 PC", no "Please deactivate previous installations", no "In the USA this game was released three months ago, but in your country it's not available yet.

Gabe Newell from Valve essentially said the same thing some time ago (source):

We think there is a fundamental misconception about piracy. Piracy is almost always a service problem and not a pricing problem

I'm thinking of TV shows. If you're living in Switzerland or Germany you have almost no possibility to watch shows like "The Big Bang Theory" or "Two and a Half Men" in english within a reasonable time after they aired in the USA.

A friend reminded me last friday that there isn't such a service for viewing or buying US-american tv shows, and I admitted that I hadn't thought of that. And he's right, I too would pay to view the newest episodes of my favourite shows, when it would be convenient enough:

  1. I want to download it to watch it on my TV, and
  2. I want to view it in english.

But since such a thing doesn't exist and you have to wait for half a year to view it with a lousy sync, why not pirate it, why not download it on PirateBay? Available a few hours after the original broadcast, download on a NAS-server or simply drop it on a USB-stick, profit.

Automating

Today I recognized how repetitive it is to follow a TV show, especially when you want to stay up-to-date with your favourite shows. It's always something like:

  1. Check if there is a new episode of show X.
  2. Search for missing episodes and download them.

Repetitive work can be automated, so I wrote a script which always downloads the latest episodes for me from PirateBay. Source code is here.

35475318

The only thing you have to do is to specify the shows in series.txt and then just run it. It will create directories for every show and download all episodes from the current season, unless it finds already some existing episodes in the folders.

series

It does exactly what is described above: It checks on the latest episodes for a set of shows, searches for torrent/magnet links, and then opens them in the standard web browser, which should cause your BitTorrent client to open.
In fact it just searches for the links, there is no torrent downloading in the program itself.

Github-Repo: series-downloader

Boggle - finding the best word

I digged out a script which I wrote some months ago, for finding the best words in Boggle / Scramble / Ruzzle etc.
With ca. 210k words in a dictionary, each word is checked if it can be represented on the board. From all possible words, their values are calculated and then printed in descending order.

Sample grid:

grid

My script:

words

 

Any multipliers (double/triple word/letter) are not taken into account.
But at least you should manage to get the "the ultimate move" achievement in Ruzzle :)

2013-01-20 19.24.47

 

You can try it yourself at http://www.kleemans.ch/static_pages, entry "Scramble words".
The code is on Github: scramble-best-words.

Bejeweled Bot

Some weeks ago I got really annoyed playing Bejeweled Blitz on Facebook.

I'm really bad at playing, so I decided to cheat and write a simple bot in Python which plays for me.
Here you can see it in action:

It basically consists of 3 parts (like every bot) which will then be repeated:

  • Analyze board
  • Calculate moves
  • Execute moves on board (by simulating user input)

Autopy was a great help for simulating user input (it's like the robot-class from Java in Python). The bot's really stupid and does every move it sees.

Repo (Github): bejeweled-bot.