Category archives: Snaking

Discussions of programming, particularly of programming Python

RSS feed of Snaking

Moving code from C to Python (Maintainability and robustness)


Spent the evening after work on trying to track down why there's a memory leak in the pointer-management functions in PyOpenGL. Problem is, the code there is this grotty low-level stuff that winds up re-creating the reference-counting mechanism in Python just to track whether anything is referencing a pointer.

Decided to rework it as a ...

Continue reading

This getting up early business sure warps the day... (Working before noon is wrong in some way)


Other than some brief over-the-phone debugging, mostly worked on little issues all day, adding links to various pages, refactoring things, adding paging to a long table views, the kind of cleanup you need to do before a project becomes a product.

Still quite a bit to do that way, but that's tomorrow's bugbear. Tonight I'm ...

Continue reading

New TwistedSNMP goodness heading into the world (Happy little SNMP sprite challenges the darkness...)


Only changes are to the BisectOIDStore; allowing it to have sub-OIDStores registered for handling a given table, and allowing it to have callable objects registered to return dynamically calculated values for a given OID.

Those were just features I needed for testing Cinemon, but they should make the writing of test code far simpler in ...

Continue reading

Test fixtures for fun and profit (Extending TwistedSNMP to allow for more complex Agent-side code)


TwistedSNMP is fairly minimal in what it allows on the Agent side, basically static tables mapping OID to value. That's been fine up to now, but I realised as I was trying to track down a bug in Cinemon this afternoon that the reason all of my modems are showing 0-values for their counters in ...

Continue reading

New hierarchy types are fun! (Though we got our collective arses whipped in Cranium...)


Spent the bulk of the day finishing and then debugging the new hierarchy type, and then figuring out why an old hierarchy type seemed to have been messed up (it wasn't, it's always worked like that, I just never noticed it).

After that, went to our cousin's husband's sister's house for dinner and a game ...

Continue reading

Histogram turns out to be useless (So switched to working on "political" hierarchy)


Got the histogram code to the point where it proved it would be largely useless. Need to rethink that now. Interestingly, it proved out some of the wisdom of an "agile" approach. I've actually been bogged down for a while figuring out all of the logic required for the (rather generic) graph-drawing code. Today I ...

Continue reading

Seriously considering not working tomorrow (Could use a week to catch up on everything...)


I've got so much piling up in PyOpenGL (and other projects) that I really should take a day or 5 to catch up. Though I suppose I could just focus on the work remaining for Cinemon. I don't know. This weekend has been a complete wash. Maybe I should just become a monk and spend ...

Continue reading

Sending email in Twisted (This should *not* be so hard to find...)


As D'Arcy was winding down his work on the EFT2 server, he asked the very obvious question "how does one send email in Twisted". It took me something like 30 minutes to track down the proper response. Once you know where the function is, it's trivial, but finding out which module/function to use is a ...

Continue reading

Day disappears in EFT pair-programming (As the cold (or whatever) takes over my poor lil' body...)


Colds suck. Not so much because they're inherently bad, but because they aren't bad enough to stop work, but they're bad enough to make working strikingly unpleasant. Talking all day when you have a cold doesn't really help make it more pleasant. Luckily, colds are bad enough that you're allowed to whine in your blog ...

Continue reading

Dear silly space-users, just convert to tabs and get it over with (Garn that's mildly frustrating...)


Have spent the last two days working with D'Arcy, who uses vi (that's, vi, not even vim). And every 10 or 20 minutes he'll mis-indent something because he uses spaces. It's often subtle, like a closing-bracket being outdented one line too many (which works fine if it's the last line of a function), such ...

Continue reading