Wallpaper: Une autre gare, un autre voyage

22/09/2011

(Une autre gare, un autre voyage, 1920×1200)

You can find more wallpapers here


Wallpaper: NY

22/09/2011

(NY, 1920×1200)

You can find more wallpapers here


Wallpaper: Time²

22/09/2011

(Time², 1920×1200)

You can find more wallpapers here


Wallpaper: Karlův Most, 4h55

22/09/2011

(Karlův Most, 4h55, 1920×1200)

You can find more wallpapers here


Wallpaper: Karlův Most, 6h15

22/09/2011

(Karlův Most, 6h15, 1920×1200)

You can find more wallpapers here


Wallpaper: Les jardins du roi

22/09/2011

(Les jardins du roi, 1920×1200)

You can find more wallpapers here


Learning Python (II)

20/09/2011

One thing I really like about Python is how it makes manipulating lists quite easily, especially via slices and list comprehensions. List comprehensions, especially in generator notation form, are an easy way to create lists with specific content. Other functional programming languages (such as Mathematica, amongst others) have taught me to use “map” to transform lists. But is it always the clearest and fastest way?


Read the rest of this entry »


Run, Python, Run!

13/09/2011

I still can’t figure out exactly which operations are expensive in Python. My C/C++ can’t help me much because it seems that things aren’t implemented like I’d’ve expected—like lists that aren’t lists, but array lists, leading to O(n) for operations you would otherwise expect to be O(1).

But a friend of mine—Olivier—showed me a simple, basic, yet rather effective tool to profile Python programs (I’m not sure if I should say script or not).

Read the rest of this entry »


/* no comments (part II) */

06/09/2011

In a previous installment, I discussed the quality of English in comments, arguing that the quality of comments influences the reader’s judgment on the quality of the code as well.

That’s not the only thing that can make code harder or easier to understand. Today (anyway, at the time of writing), I was working on something where arbitrary-looking constants would constantly come up. I mean, constants that you wouldn’t know where they’re from unless there’s a comment. A clear comment. Let’s see some of those.

Read the rest of this entry »


Coding Maps (Part I)

30/08/2011

Quite a while ago, I discussed map generation in the classic 80s-era game Tunnels of Doom. After a short correspondence with Kevin Kenney himself (who kindly answered my questions; and I hope he is aware that he contributed to the fascination of great many kids in computer science), I manage to, not exactly reproduce his algorithm, but create a number of fun variations.

Tunnels of Doom Combat Screen.

This raises the question as to how do we encode maps efficiently in the computer’s memory, not only for Tunnels of Doooooom but also for any number of other games.

Read the rest of this entry »