Between Giants

03 Apr, 2013

Similar in scale to a gnat between two giants...? ツ


17 Mar, 2013

About the only thing I actually use Google Reader for, is synchronisation between devices. I use both Net News Wire and Feeddler -- neither of which are perfect, but the magazine-style RSS readers (such as Feedly, and the like) don't really suit my usage patterns.

I wonder if the answer (for myself, at least) is a basic web-based reader, which uses dropbox for storing synchronisation data. With about 5MB of localStorage, I could also possibly fix one of my bug bears with the clients I use at the moment - offline download of some content (for those train trips where the connection drops like a yoyo). Using the iPhone's safari browser for the reader itself would fix the other problem I have (specifically with NNW) -- poor download and page rendering performance.

There's my spec ↑... now I just need to find the time to develop it... (before July)


Programmer Humour

13 Mar, 2013

Thanks very much, Randall...

ineffective sorts made me laugh out loud on the train, so now I look like a nutball. ツ


08 Mar, 2013

Rather belatedly... the solution to Puzzle #5 was posted a few days ago. Puzzle #6 is now also available.

Also rather belatedly, Dave Winer has an interesting take on the recent promotional video. Stand out quote:

Primarily you should do it (ed: programming) because you love it, because it's fun -- because it's wonderful to create machines with your mind. Hugely empowering. Emotionally gratifying. Software is math-in-motion. It's a miracle of the mind. And if you can do it, really well, there's absolutely nothing like it.


06 Mar, 2013

While listening to Solace, I can't help be struck by the thought that it would sound brilliant performed by a full symphony orchestra (probably with electric guitar accompaniment). Something I'd pay to listen to...

(via BoingBoing)

PFK Errata

20 Feb, 2013

Piotr Słowik writes:

I'm learning how to code from your book. It's great! First time in my life I'm starting to understand how to write code and make it work ;) You're the first person whose teachings make sense to me!

But I have problem with this example:

>>> v = sys.stdin.readline(13) He who laughs last thinks slowest >>> print(v) He who laughs

Whatever I do I get this error:

readline() takes 1 positional argument but 2 were given

I'm using Python 3.3. Please, help.

Thanks for the email Piotr. It looks like you've found the first 'bug' in the book. That example definitely works -- but it doesn't work in the Python Shell. If you try in the Console, you won't get the error.

The reason for the difference is that the Shell does some magic to replace the stdin object with a version of its own -- and its version of the readline function doesn't have a parameter for the maximum number of characters (hence you get an unexpected error message).

I've added this to the errata page accordingly.

Puzzle Updates

12 Feb, 2013

The solution to Programming Puzzle #4 has been posted, and you can also find a new puzzle added here.

The Front Page

31 Jan, 2013 Very cool. The front page of

Officially geeked out.

Stickman Elevators

25 Jan, 2013

Henry Angeles writes:

I'm not a programmer, so when my kid asked me to make an elevator in the stickman game I totally failed. I can get the platform to move up and down, but when the elevator starts going up with the stickman on it, hilarity ensues.

I guess at the end of the day i'm asking how this can be done. Thanks for your time.

I'm not surprised you found it difficult. It caused a fair amount of head scratching until I realised the trick to getting this working. If you used the code for the horizontal platforms in PythonForKidsSolutions.pdf as the basis for your elevator, your stick figure probably slips through the platform as soon as he touches it (or potentially rockets off up the screen depending upon your code). The elevator moves at a different speed to the stick figure, so you need to match that speed when the figure lands on the platform - and you can't rely on the basic collision detection code as it's written in that example.

A new programming puzzle, for this, has been added to the puzzles page - check back in a week or two for the full solution.

Puzzles 2 and 3

21 Jan, 2013

The solution to Programming Puzzle 2 has just been added to the puzzle's page, and challenge number 3 has been posted.