This is what they call insanity folks

I have just given into creeping adulthood and actually decided to do something that I’ve been putting off for a year or so on the basis that it is totally insane and obnoxious: I have started scheduling free time, specifically, I am marking weekends in the calendar on which neither Andrew nor I will not commit to doing anything or going anywhere with anyone else. I’m aiming to do this once a month or so, because barring our trip to New Zealand (world’s smallest violin, I know) we haven’t had such a thing since June, and then before that April and only because I was in my post-recompression exercise and travel ban in April. And this is for me, a borderline introvert, and Andrew, who is so introverted that Myers-Briggs cannot distinguish him from a lifelong hermit.

Even sadder: the first weekend I could find to do such a thing is more than a month from now.

Also sad, although again more in a world’s smallest violin kind of way: even on those weekends, we’re talking about squeezing some scuba in, which may not sound like such a big deal, but it’s 90 minutes commute each way to the beach from here, and also I have to re-plan all my diving around DCS first.

Clearly all this is very indulgent, but seriously, I feel like I haven’t really had much of a rest in my life since about the time we started planning our wedding, which was from about February last year. (We married in May last year, but that didn’t help because we just moved onto new time consuming challenges.) Partly it’s because I want to vanish into a PhD thesis pit like I want a whole in the head, but partly it’s because I have problems with saying no. But once a month I intend to practice. ‘NO, NO, NO, NO, NO’. Seems easy, right? I’m on the case.

Women’s geek groups

I’ve been, and am still, a member of various women-in-tech groups aimed at promoting women’s participation in or education about various geeky things. A couple of months back Melissa and I were discussing another of these groups (not one I’m in) which apparently has an IRC channel which is less women talking among themselves and more a place for men to come and talk to women about their personal problems.

We went on to discuss what a common problem this is: frankly it’s the major failure mode of women-in-tech groups that I know of (excepting just not doing anything, which is the major failure mode of every endeavour ever). It’s not so much about actual sex: if nothing else, it’s easier to get agreement among women members that your local supporting-women-in-tech arena is not supposed to be a place to pick up. It’s more about emotional vampirism: that is, people (especially men) who show up in order to have a place to off-load their emotional woes and pick up whatever cuddles they aren’t getting elsewhere. (Or, sometimes, men who don’t need emotional support but just want to hang with their women friends and shoot the breeze… who attract more men who are there to shoot the breeze with the existing men, thus resulting in a place that is called a women’s group but is in fact a bunch of men talking to each other. But at least the core participants will be more sane when you explain the problem.)

In women’s blogs apparently the problem is more reasonably well-meaning men who show up just asking if the women would mind breaking it down for them a little. I mean, please? Men yell stuff about your body in the street? C’mon. How often does that really happen? Is it actually a problem or is there just one guy left in the whole world doing this stuff already? (You can go here and find out more about that, by the way. The answer is: for a lot of women, it’s a hell of a lot. And also, the endless advice given to feminists and various activists about how to make their message friendlier and cuddlier and one day we promise it will be friendly and cuddly enough to be listened to we promise really this time for sure, that’s called concern trolling and I love that it has a name.)

Anyway, the reason this tends to be hard to deal with is that once it sets in many women participants do want to help these guys, occasionally to the point of wanting to explicitly re-purpose the group to do so. I mean, they’re there, they’re on board with the goals, they aren’t horribly rude (it’s depressing how many people have this as their acceptable standard of behaviour for good person worth hanging out with) and they, sometimes, actually are in need of someone to talk to and probably could do something with the love of a good woman, etc. Or, in some cases, they’re actually your friend from work who you invited because he’s a really nice guy and so wants to help. But meanwhile women are showing up wanting help with your C++ API, or to confirm whether or not the guy who has the keys to the ftp server really did say that about his wife and what to do about it and they’re finding a bunch of men all running their own woes past a bunch of women and a lot of them are thinking yeah, you know, I do that for enough men already.

And this inspired me to go out and provide a few resources if you’re thinking of founding a geeky women group, particularly one that is going to have social or semi-social spaces (you will almost never have an IRC channel that is anything else, by the way). I have wikied up a couple of statements of purpose (and codes of behaviour) that your group could hack up for their own purposes. I recommend doing so fairly early on in your group’s history.

Roundup of things in my feed reader

There seems to have been a run of blog recommendations while I was away (Catie, Kirrily, Nicholas, Penny). And Blog Day is tomorrow. The time is ripe, and here are some newer things from my feed reader. If for some reason you want the complete, insane, truth, I can help with that too.

I’ll start out as I intend to continue, by flat-out cheating: The Dancing Sausage Web Journal and Gumbaby. Everything old is new again (even things called ‘web journals’) and so Gus cleaned out the spam from the DSWJ and is oiling the joints. People at uni were super impressed that I actually knew the person rescuing end-of-lifed dead trees and I didn’t even have to tell them that I once bought the t-shirt.

You’ll need to have a passing level of serious interest in MediaWiki-enabled Free Culture to enjoy Brianna Laugher’s All The Modern Things, but I have, and so, I do.

It might just be a passing fancy because I’ve found Ubuntu 8.04 LTS (Hardy Heron) such a… interesting experience, but I’ve been not-so-secretly enjoying the Linux Hater’s Blog.

I really do not care very much about Bill O’Reilly, but I started reading Marc Andreessen recently and except for the Bill O’Reilly it’s been pretty interesting. He’s probably the only blogger I read who has ever gone and asked attorneys for help with an article and it was well worth it.

Matthew Paul Thomas writes only very occasionally about software usability but when he does tech bloggers throw him parties.

I used to read Megan at From the Archives, where she begged and pleaded for a new commenting culture of loving kindness, and wrote about exercise, sunshine, dating and engineering. Now I read her with her friend Sherry at Rhubarb Pie, where they’ve given up on comments, and on the idea of addressing their readers directly, and instead are writing letters to each other. Sometimes they’re about exercise, sunshine, dating and engineering. I wish I’d had this idea first. And that I knew either of these women.

A White Bear at Is there no sin in it? thinks and feels subtly differently from me about just about everything: I’m not really used to subtle challenges to my thoughts about research and teaching and relationships.

Julia at Here Be Hippogriffs (and Mom Moment) has three children, two of whom are twins. She was pregnant in total thirteen times. Yeah. Eleven miscarriages. The first thing people ask me when I try and persuade them to read this is whether she’s totally mad. I don’t know her, I have no idea, but they did, for the record, know the cause of the miscarriages and the odds were better than that. Anyway, she had eleven miscarriages and has infant twins and a nerdy six year old, and she still has time to be gently, amusingly dry.

There are basically two feminism things I talk about with the AussieChix these days. One of them is Dorothea Salo’s Grunchy stuff (The sickening grunch: There it was—the sickening grunch as I landed involuntarily back in my body—and not my entire body, either, but specific parts of it.) and the other is Shapely Prose.

See also previous versions of these from me: Australian blog awards (2005) and Blog Day (2006). And PS, Martin, I still miss sourcefrog

Holiday until August 29

Public service announcement: I’m on holidays and effectively unreachable until August 29, unless you’re in the select group of people who I’ve already given emergency personal/technical contact details to. (Yes! The cool kids!)

If there was something I was meant to do for you before I left… to be honest it’s probably already too late to remind me.

Dry July postmortem

I have reason to believe that some people don’t like this new sponsorship era of sponsoring people to do anything before they’ve actually done it (as opposed to just pledging). If you people are out there waiting to give me money for Dry July, I will observe that is is now August.

Quick recap: Dry July, do not drink alcohol in the month of July. Fundraiser for the Prince of Wales hospital. Sponsor me here, it’s a sure thing now that July is actually over.

I sadly can’t regale you with tales of the new perspective on life that doing this gave me, except that opportunities to drink are offered to me more frequently than I realised prior to Dry July. I probably had about eight active offers of a drink during the month (including the Tuesday night drinks I go to every week). Andrew and I almost never drink at home: I don’t think we have had a drink without guests over since New Year, so I hadn’t thought it was so many. In a normal month I would probably have turned down only four or five of those opportunities rather than every one of them. It is an annoying feeling, I remember feeling much the same during linux.conf.au, when I couldn’t drink because of a medication interaction.

I drank more on the weekend than I usually would: one glass of wine Friday, and then 600 mL of beer (it was a Bavarian beer tasting thing, three 200 mL samples) followed by a cocktail on Saturday. My tolerance for alcohol does not appear especially affected by the month of abstinence, which makes sense considering my low exposure anyway.

I intend to change my drinking habits not at all long term as a result of Dry July. But hopefully the hospital is a tiny bit richer.

IRC plugin idea

Filed under ideas I don’t want to forget because I may act on them in the next month or two:

 <mary> I have been seriously tempted to write an irssi plugin that goes something like: <mary> "you have tried to input a URL into a channel, press Ctrl+K to confirm" <mary> and "you have tried to input what looks like copy and pasted IRC into an IRC channel, Ctrl-K to confirm" 

Clean up IMAP folders

Per Matt Palmer’s blog entry OfflineIMAP and Deleting Folders users of any mail sorting recipe that creates new mail folders a lot tend to find that over time they accumulate a lot of mail folders for, eg, email lists they are no longer subscribed to. And most IMAP clients will waste time checking those folders for new mail all the time.

Matt wrote:

Now, of course, someone’s going to point me to a small script that finds all of your local empty folders and deletes them locally then issues an IMAP “delete folder” command on the server. But I had fun working all this out, so it’s not a complete waste.

I haven’t quite done this, I’ve just written a script that detects and deletes empty remote folders. (For me, offlineimap does not have the behaviour of creating new remote folders, so I haven’t bothered cleaning up local folders.)

It’s good: it’s speeding up my mail syncs a whole lot, deleting these old folders I haven’t received mail in for about five years. I’ve got full details and the script available for download (as you’d expect, it’s short): Python script to delete empty IMAP folders.

Version control idea: modified times

I tend to commit almost everything that doesn’t move to version control, but there’s one major exception: the source data for my website puzzling.org, which is mostly text files. So as to avoid various nuisances to do with calculating data I already have and storing it somewhere else and needing to keep that store up to date I keep track of the time that a file was modified by… asking the filesystem when this file was last modified.

So far so good, and tools like Blosxom do likewise, except that file timestamps tend not to be version controlled, which means if I store my files on more than one machine and rely purely on version control to maintain the date the dates don’t end up the same.

So instead I use Unison, which keeps the trees and dates in sync at the expensive of losing all my history (I also have incremental backups for a couple of months, but that’s a recent addition to my data management). As Martin Pool apparently did at some point, although that was some months before he started writing a version control tool.

Thus, plugin idea for version control system: optional version of additional filesystem metadata, especially times.

Starting out with unittests

It’s a big shame because your very first experience of unittesting is unittest.main and your next experience is this brick wall of suck and you think… I’m just not going to use it.

Andrew

Andrew and I have had Jonathan Lange to visit this week while he awaits home Internet, which means there’s been a lot of talk about unit testing.

Coincidently, today I am at the very beginning of a small-ish Python project, one just large enough that I’d like to make sure it’s fairly correct from the beginning, meaning I’d like to make sure it has automated tests, a sensible module layout and that kind of thing. It’s small enough that I bet I could get it working quickly enough without automated tests… and therein lies the trap. In order to do the right thing when starting a scratch project, doing the right thing needs to be either really really easy, or really easy to correct if it was skipped at the junkcode stage of the project.

Consider various aspects of the project. I haven’t worried too much about correct module naming, because at least with Bazaar renaming directories will be easy to do later. But I am trying to do unit testing from the very beginning because adding good testing to an existing codebase of much over 200 lines converges on impossible pretty quickly. And since I create new files in Python the way some other people create functions and some other other people create new lines, I separate my test modules early which results in this brick wall of suck:

 import unittest  tests = [ # list of strings containing test module names ]  def my_import(name): # No love to http://docs.python.org/lib/built-in-funcs.html mod = __import__(name) components = name.split('.') for comp in components[1:]: mod = getattr(mod, comp) return mod  def runAll(): runner = unittest.TextTestRunner() suite = unittest.TestSuite() for testmodulename in tests: testmodule = my_import(testmodulename) print testmodule loader = unittest.TestLoader() suite.addTests(loader.loadTestsFromModule(testmodule)) result = runner.run(suite) 

That is, unittest does not do test discovery, you have to tell it where to find all the test modules, and you run slap-bang into Python’s tedious programmatic interface to its own import mechanisms.

So, unit testing in Python: hard to get right later, but not easy enough to get right at the beginning. (Consider: the code above is currently about three quarters of the codebase in question.) I will watch Jonathan’s pyunit3k with interest. (For my PhD I use Twisted’s trial test runner, but I am not willing to introduce a dependency on Twisted for this project purely for a better test runner.)

In general, it would be excellent if some firm and right person was to write a guide to best practices for Python projects, with regard to starting a project so that it is easy to test, easy to collaborate on, easy to install and (and I think this is somewhat missing too) easy for the distributions to package. And that all these steps be so trivial that they can be carried out at the beginning of almost every project.