Category archives: Snaking

Discussions of programming, particularly of programming Python

RSS feed of Snaking

More ctypes goodness (Elegance improves with understanding of ctypes)


I spent this evening working on the ctypes rewrite of PyOpenGL. Mostly I worked on the code for handling single argument functions where that argument is an array (next step being to generalise to all methods where the arrays are anywhere in a multi-argument parameter set (did the machinery for that this evening, just didn't ...

Continue reading

Test-first giveth (Test-first taketh away...)


Spent the bulk of the day testing handling of fairly rare occurences. Found a number of bugs in the new code, no big deal there. Then discovered that the same code in the original code suffers from almost the same problem. Okay, annoying. But now that I've fixed it I seem to be running into ...

Continue reading

Ah the glory of web-site design (IE sucks the lichen off the rocks...)


Day was spent on posters and web-sites and similar things. I'm still thinking that taking that extra day from last week as a flex day would be useful. Do some shopping and laundry before our guests arrive (3 extra people, (two children), in a 2 bedroom apartment for 1 or 2 months... going to be ...

Continue reading

I'm really rusty! (Web-site design doesn't go spectacularly well...)


I couldn't sleep this evening, so I did a bit of work setting up the Cinemon website. The design is quite crude at the moment. I'd intended to have the splash-screen background be 3 images, similar to the poster, but then I realised I'd have to muck about more to do that, so I ...

Continue reading

Run Snake Run (A Python hotshot profile loading/display GUI)


Well, as mentioned earlier (yesterday), it takes far too long to load the HotShot profiler dumps. So, I wrote my own little loader/viewer package. It processes about 70,000 records/second, which lets it load a profile fairly quickly, but it's not blazingly fast by any means.

What makes it useful/cool is that it loads the dump ...

Continue reading

Profile first, then optimise (Surprising what you find with actual measurements...)


Biggest event of the day was discovering that 30% of total work in the system was being done in a __cmp__ method that was doing the equivalent of "if x is y" when everything was said and done. It appears, in the end, to have been the ultimate source of the slowdowns that I've spent ...

Continue reading

Wasn't I supposed to stop working back then (Look ma, hour-per-day discipline falling apart...)


Wanted to add some debugging code to see if I could catch some bugs during the evening's operation... turned into rather a lot of bug-fixing and minor feature implementation work that bring's the day's total to some entirely improper number of hours (sorry hands). I have to stop now or I won't be able to ...

Continue reading

A day of iconic splendour (Mmm graphics!)


Today was spent mostly cleaning up and extending the set of icons available in Cinemon 2.0. Nothing hugely challenging there; create a mechanism to allow for easily registering icon correspondence and another for defining an icon, then plough through and either assign or create-and-assign and icon for each major group-type in the system.

The impact ...

Continue reading

That day was way too long ("Finish the (major) feature" isn't a good plan for a day...)


For some reason (likely lack of sleep and exercise) I'm extremely tense today. My shoulders and upper arms are just masses of knots, which messes up my hands as I type. Did a huge amount of work on 2.0 today, as well as a bunch of administrative stuff for the 1.0 launch (18 days and ...

Continue reading

Parties take a lot of prep-time (Especially when you've been letting the housework get behind...)


Having a birthday party for Shane this evening. Result is that I'm not going to get any more work done on the OpenGL ctypes wrapper. Last night I fixed a few problems with the pointer-setting mechanism, and began breaking out the platform-specific code into separate modules. Spent quite a bit of time trying to figure ...

Continue reading