Cool code of the week

Hats off to pppoeconf. It’s all so simple, post wailing and gnashing of teeth. (You think I speak figuratively? Not so! There’s a reason I’m not employed as a sysadmin.) Put ADSL modem in bridge mode, time expenditure until Eureka: some hours. pppoeconf, time expenditure until pon: 1 minute. Done!

And now that I have returned to the land of broadband, I hope never to have to look at the Whirlpool forums ever again.

The eaters of writing

The eaters of writing

I can now add logjam (segfaults on file save failure or something like it), and the unholy combination of Perspective Broker, Movable Type and Mozilla Firefox (PB loses the connection, Firefox loses a large chunk of the text when I hit ‘Back’ and MT saves using the web connection… yeah, the one that just broke) to the list of products that have now cost me hours of writing which I will never be able to recreate.

So, when answering the question “when doing something like browsing my email [or other text writing], what is it that I use a non-web-based client for?” my answer is “stopping me from having to rewrite pieces of writing I was much happier with the first time, and also from letting out heart-felt yells that wake the entire household.”

I thought losing a long Advogato entry at lca was enough to teach me this lesson but it wasn’t. Here we go again: Never ever write anything you’d be sad to lose in anything other than a text editor written by crazy pedantic hackers with wrist problems, ideally ones who have revisions in their swap files.

Anyone other than crazy pedantic hackers with wrist problems seems a bit cavalier about all that junk that you foolishly left in RAM. Crashes while saving are particularly unforgivable. I write anything longer than a paragraph in web-based clients when hell freezes over or <textarea> entries are considered sacred, whatever happens first.

FTA

Linux Australia has opened their campaign against clauses of the recent US-Australia trade agreement. Relevant issues are Australian anti-circumvention and software patent laws.

If I have time to work up a response for the Senate committee, I’ll probably make it available here.

Perl; PhD

Perl

For me, learning Perl has been like giving up smoking. In fact, until recently they were even more remarkably similar in that I’d never learned Perl and never given up (or taken up) smoking. But the current similarity is that just as it takes many smokers several serious attempts to quit, it took me several attempts to learn Perl.

I’m not sure was I was ever trying to learn it at all. I think I was still, years later, held in the web of How to become a hacker. I always got caught on the rocks of trying to program Perl with my Python idioms which involve rapidly evolved steep class hierachies and heavy reliance on nested data structures and was quickly dashed up against Perl’s references, or references syntax at least.

This time though I was learning Perl for work, which is like giving up smoking for a partner: an added incentive and a position in which it is difficult to admit failure. I’m sure my Perl looks exactly what a Python programmer’s Perl always looks like too.

PhD

I’m told going overseas makes sense. What kind of sense, I’m yet to determine.

Thursday 25 March 2004

SLUG

Just as my formal involvement in SLUG is about to end (a new committee is being elected Friday night, and I’m not standing), I find that I’m putting a lot of time and thought into it again. But… I’m still not standing. I figure that being able to choose my level of involvement will stop me periodically burning out and getting resentful.

Also, I can then focus on helping get hacksig off the ground. I’ve gotten just about everything I need from SLUG in terms of using Linux. I’m not personally interested in advocacy, except possibly in the legal arena. Clearly, a programming group is the next step.

Linux

I’m well past where I ever expected to get with Linux: I’m a competent single machine or home network, small-size, non-critical sysadmin. Finding that out was nearly as big a surprise as finding out that I was confident programming.

But I don’t want to go any further with it. I try not to make decisions like this: I am generally uncomfortable with saying I want no more knowledge. But honestly, I know what I want to know. Need only, not desire, will push me further.

Twisted

Twisted is a whole other kettle of fish. I find that I need to find a four or five hour solid block of time to get writing done, and I only have that time on weekends. But weekends also have the unfortunate side-effect of containing family birthdays, moving days and house cleaning.

To be fair, I’ve spent the last few weeks working (finally! finally!) on the re-write of my website that has been on the drawing board for well over two years. It is somewhere between three and six hours from deployment. During that time, I’ve spent zero hours writing documentation.

I feel silly in many ways putting so much effort into a website. It’s certainly not something that people seem to admire. I’m putting a negative spin on everyone’s reactions there though. Most people I know are programmers, and a large number of them simply don’t like writing, or don’t like it enough to want to build a house for their writing. I do like it, and building a CMS is a natural consequence. Or so I will maintain from here on in.

Aside from this, while my wrist pain has improved with a better arrangement at work, I do need to be careful about typing when I’m not being paid for it. I need some HTML macros for my editor (stat) because the < and > signs seem to bring on weakness and discomfort quickly.

Travel plans

I’m planning to zip around the world, or parts thereof, starting in September or so. I’d better hurry up, I’m not even at the budgeting stage.

Life plans

It is suddenly horribly clear that I need to decide whether to do a PhD and where to do this hypothetical degree in a hurry. I need to have a supervisor and some kind of topic before I leave Australia in September if I’m to do it here, and I need to think about funding, GREs, applications, interviews, visas and spiv if I want to do it in the UK or US. (If I do it in the US, I also need to think bout all that time.) And if I don’t do it, I should think about what the hell else to do. I envy spiv his attachment to programming as a vocation, I myself am simply part of the indecisive masses.

Sunday 7 March 2004

It’s been at least a couple of years since I really settled into programming. I can take code and change it without understanding the whole thing. I can guess at the function of libraries, or read their source to find what I need. I write some amount of code that ‘just works’.

But it still surprises me, every time.

Monday 23 February 2004

Today the first pain of RSS-as-anything-at-all bit me, with someone on Planet Twisted embedding very wide text in <pre> tags, causing (for most viewers, not for me) the main column to expand to the right to accomodate the rogue <pre>.

I got a nice mail suggesting that the cross browser fix for this is to convert:

 <pre> blah  blahblah blah</pre> 

to:

 <div style="font-family:monospace;"> blah&nbsp;&nbsp;blahblah<br> blah</div> 

(There’s not meant to be a line-wrap in that second example, but I’m being kind to the Planet Twisted readers &mdash oh, rendering HTML in HTML is hard!)

But let’s face it, fixing other people’s HTML for them is nightmarish. Start with <pre> tags, end up with… well, writing a complete HTML parser/sanitiser for Planet. So I’m being a wimp and not doing it. I hope.

Life; FOSS things

Life

Relatively severe wrist/shoulder pain had to bite eventually &mdash I should have expected it now that I’m working in an environment I don’t control. Yes, my immediate supervisor is sympathetic, yes, my employer has Occupational Health and Safety people, yes they’ll probably take action, however the downside of working for an organisation large enough to have organised OHS is that the request needs to travel up three levels and down again.

In the meantime, I need to keep typing because that’s my job.

FOSS things

Even the mildest bug blackmail is driving me insane at the moment: all bug reporters should visualise a wild-eyed harpie with stiff fingers when entering “please document now, you are destroying my life [note: author’s completely exaggerated paraphrase]” bugs.

Friday 6 February 2004

I’ve been playing with Planet (one day our galactic masters will populate that page and take advantage of the links they receive), which meant learning a bit of arch to create my own working copy which I can check revisions into. (I believe this is called a branch if I understand arch’s nesting correctly: archives contain categories which contain branches which contain versions which contain revisions. Revisions correspond to individual checkins, archives to a CVS repository and categories, roughly, to a project.)

So now my Planet variant pings the weblog update sites if the data has changed &mdash although I think the way it detects changes is against the spirit of the feed parser. Doing this has proved an excuse to spend an hour or so coming to grips with arch finally, which I wasn’t motivated to do for its own sake.

I think arch would be a great tool for people like myself who want to get people to double-check changes before checking them into the project’s main branch, and for people like spiv, who has thrown away a lot of changes to Twisted because he’d made a lot of distinct changes in his tree and was a bit anxious about trying to merge them with recent changes in the main tree before isolating each change and checking it in. Distributed repositories are an excellent solution to this: you can check changes into your own repository without effecting the “main” one, and then pick them out, merge and commit to the main one.