Uncategorized November 25, 2013 @ 01:14

Docstring-based Type Inference

Some python coders enjoy torturing themselves by using glorified notepads of which the most advanced feature appears to be syntax coloring. Conveniences such as debugging, code hinting and syntax error reporting would be redundant. After all, you can get all that by using the console and running your program, right?

I guess I’m just a slight bit too lazy for that. I’d like to have my potential coding flaws reveal themselves as quickly as possible. The first few lines I probably typed in Nano, because Python is so much nicer than shell scripting, but while writing more, I went for good ol’ Eclipse ‘n’ PyDev. Awesome stuff, it even has rudimentary refactoring capabilities; SHIFT+CTRL+R has become an comfortable hand pose for me.

After the sprint to deliver our last project, down time set in and that means trying out new stuff. PyCharm! It does most (if not all) that PyDev delivers and then some! Refactoring nearly looks as if it actually works, it looks nice (very important) and it is able to infer function argument types from a well-formatted docstring!

It’s almost like using a strongly-typed language again. Well, not really, but at least you don’t have to look up every little type in an api doc in order to see what is available and how to use it.

Consider this:

class Action():
    def jump():

def run():

def walk(v):
    @type v: Action


After that dot is typed in, PyCharm will obediently list jump() in a popup list.

It does in fact not warn you about passing unwanted types into that function, but that would defeat the purpose of using Python, wouldn’t it?

Anyhow, I enjoy working with this language more every day, especially when I’m having my collection of braces and crutches to lean on while digging through unexplored territory (read: libraries).

Uncategorized July 6, 2010 @ 07:15

Coma Looks Beautiful

Check out this here lovely platformer with atmospheric graphics.

Uncategorized May 31, 2010 @ 22:33

Graphic Tattooist

A very unconventional way to decorate one’s body. I would be reluctant to let this guy do my tattoo, but at the same time he’d be one of the first I would go to.

See more of his work on his website: www.yourmeatismine.com