creative


6
Jan 12

Skype Bot for Fun and Profit – Part II – Getting it Running

This is a post from the Skype Bot for Fun and Profit series. This is the second part in the series and if you want to get your bot running you will need to have some prerequisites filled out, see the first part for the list.

Configuring and running

There is a skype-bot project at github. It is written in Java and has support for simple functionality. You can clone it via:

git clone https://github.com/toomasr/skype-bot.git

The project is maven based and once you import the project into your favourite IDE that has maven support it should compile out of the box. Before we can actually run the project we need to make couple of adjustments. First make a copy of the project.properties file and make it personal.properties. Then change the username, password and pemfile attributes in the file. Make sure that the folder that has the pem file also has a der file that has the same name (except the extension of course).
Continue reading →


6
Jan 12

Skype Bot for Fun and Profit – Part I – Getting Started

This is a post from the Skype Bot for Fun and Profit series. This is the first part in the series and for a complete list see the original article.

Join the Skype Developer Program

A lot of necessary documentation and also software is behind a login screen at Skype Developer Program. You will need to join the program to continue and log in. This will cost you 10$. I personally don’t like the monetary fee for documentation and a SDK but I’m happy this is not 100$.
Continue reading →


6
Jan 12

Skype Bot for Fun and Profit

Couple of months ago I was travelling and found myself in a hotel room with many hours to kill. For no particular reason I started hacking on a Java based Skype bot. Couple of weeks later I took the time to polish it and enable it for company wide notification chatroom. Now couple of months later I’m on vacation and will write about how to write a Skype bot in Java.

The Plan


Image by Simon Abrams

The Skype bot needs a bit more work than your average IRC bot because of the proprietary nature of Skype. There is much clicking and downloading of certificate stuff to get you started for example. Also I want to show you how to put the bot into action, so we will go beyond just the bot.
Continue reading →


15
Jun 11

Fling – Detecting Little Fockers Furballs

This piece is the second installment in the series of Fling – Game of Furballs. It has been in the drafts for 6 months because of lack of time and/or interest. I’m on a bus to Tartu and I just might as well finish this.

So in the previous part I gave you an intro of the game and how I stumbled upon the game and how it took over our lunches (now we have recovered and are back to random discussions). In this part we’ll look how to detect the furballs from Fling screenshots.

Abstract

Lets build a web service that accepts screenshots of Fling and sends you back a webpage link of the solution to the image or just bunch of attachments.

Solution

Lets divide and conquer.

  • Image/Color recognition to detect the Furballs (covered in this piece)
  • Algorithm to solve the puzzles (not covered, but code available)
  • Algorithm to draw the 1 step screens (not covered, but code available)
  • Email handling (not covered, but code available)

Continue reading →


27
Dec 10

Fling – Game of Furballs

Couple of months ago a mere 100 lines of Python inspired me to hack on a project for hours and hours from my free time for fun and profit, spend 10 USD on a domain name and play a prank on an investor.

This post is an intro as how this all started out. I sure hope I get around to write the other posts (see the end of the post for a list of potential subjects).

I stumbled upon an iPhone game called Fling that I still play every now and then (I purchased it about a year ago). The game is a puzzle game and your mission (should you choose to accept it) is to fling furballs into each other and the ones closest to the edges are flung off the board.

See the animated GIF for a live demo or check out the video on Youtube. Once the board has just a single furball you’ve won!

As you progress the number of Furballs per level increases and finding a solution takes more time. At certain levels it takes a lot of time. Kind of reminds me of really difficult chess puzzles that can steal an hour or two from you.

The puzzle got so popular amongst colleagues of mine from ZeroTurnaround that during lunch we would place an iPad on the table with one of the levels and who ever found it interesting would give it a shot at some difficult level.

One time over lunch we theorized on how to solve a puzzle of this sort in algorithmic terms. We had different approaches and time estimates but one of the colleagues showed up with a Python solution the next day. Took him less than 90 minutes (apparently attended a not so interesting lecture). And in terms of time complexity we figured that on every move every furball has len(furballs) - 1 furballs to kick out so (n-1)! should be a rough upper bound estimate.

These 100 lines of Python code started a chain reaction of learning more Python, detecting furballs from screenshots, solving the puzzle by outputting images with the moves, email exchange with the author and prank pitching him as an investor, writing an email frontend (you can send in your screenshot), profiling Python, checking out Jython and hopefully some more blog posts on the subject.