I know this might not be quite as worthwhile as my other material (I do not deny that even THAT isn’t very worthwhile), but I’ve stumbled upon something so ingenious that I have to post about it. Actually, it isn’t as amazing as it sounds. It’s just somebody that explained Python decorators on Stack Overflow. And that, he did quite well. I’m writing a little text adventure in Python for fun (and for learning purposes). A simple text adventure allows me to step back from all the API junk and programming techniques I might learn or have to use elsewhere and instead focus on getting my code right and researching new ways. I’m also reading an intrudoctory paper on event-driven programming by Stephen Ferg that has opened my eyes (I’m practically reborn).
Anyway, decorators! Scroll down a bit for the epic explanation. In my case, I wanted to have a simple prompt function which then passes its result to the prompt method for the room/level. Not so easy if you call the prompt function in main(). Hmm…
Thank you e-satis!
PS. I can’t properly paste Python code. Stupid Wordpress…
HAH! You expected comprehensive update, didn’t you? I fooled you well into thinking that, huh? Not yet, you will get your comprehensive update on the matter - not too soon, though.
I recently supported OpenGameArt.org with a few submissions I dug out from the ancient catacombs that is my textures folder - some of which were supposed to get into a CS map called de_southernfrance (hence the sf_ in the beginning of the file name) a friend made, others were supposed to get into a Sauerbraten map I wanted to make or something else. I still have to upload a bunch of other old textures, though. I’m even thinking about subscribing to OGA with 5$/month. What about you?
In other news, I use identi.ca now, kind of… It’s like Twitter, but without the suck. I’ll use it for my FOSS moments I guess.
So imagine you’d have this funk band in some smoky pub playing after a nice midday meal. They’d consist of a keyboard player, who’s kind of new to the whole concept of the band, this bassist, who got a little tipsy now, and the drummer would do his daily job. After having had lunch, they decide to start gently, so they start with the following jam I have titled “Simple Times”.
I finally got around jamming something as a whole with my keyboard, my bass and my drum machine. Just for the record though, I mainly play bass guitar, so the keyboard part sounds a bit clumsy.