Hackergotchis, then and now

Andrew and I aren’t singularly iconic, like Jeff:

jdub's hackergotchi

And furthermore, I’ve grown and cut my hair and grown it and cut it again in the last few years, and I cut all of Andrew’s off and have kept cutting it off. So these aren’t us anymore:

Mary's 2005 hackergotchi Andrew's 2005 hackergotchi

In fact, I never looked much like that (although I wish I had), I just lacked photographs of myself at the time and grabbed what was to hand. In any case, welcome our new hackergotchis:

Mary's 2008 hackergotchi Andrew's 2008 hackergotchi

2008 Federal Budget: Laptops

The one single non-standard tax ‘thing’ that many people I know do is to salary sacrifice for a new laptop. Quick review of how this works: normally, you are discouraged from buying yourself stuff out of pre-tax income, because otherwise a sensible financial strategy would go something like: pay for everything, declare small remainder to government, be taxed only on small remainder. The way the government puts a stop to this is by charging Fringe Benefits Tax on things bought from pre-tax income. FBT is a huge amount of money, you’ll pay an insane amount of tax on fringe benefits: better to buy things from your wages after tax was taken out.

There are a few exceptions or partial exceptions to FBT, and one is laptops, at present, more info here (written from an employer’s point of view). Given how many people I know get their employer to let them salary sacrifice for their ‘yearly laptop’, I am surprised to see less commentary on this aspect of the Federal Budget for 2008/2009:

FBT improves tax fairness by taxing non-cash remuneration. Tax planning arrangements and changes in technology have eroded the fairness and integrity of the FBT system, which will be addressed by:

  • removing the FBT exemption for work-related items used mainly for private purposes such as laptops
  • removing the double benefit from employee depreciation deductions on FBT exempt items used mainly for work purposes

Budget Overview 2008–2009 [706K], page 5

What does this mean for you? I am not a tax professional (or financial professional) but my interpretation is:

  • if you are buying yourself a new laptop and it won’t be used mostly for work, you buy it out of post-tax income from now on (and you don’t claim depreciation on it either, you’ve never been allowed to depreciate private possessions like that anyway); or
  • if you are buying yourself a new laptop and it will be used mostly for work, you can either buy it out of pre-tax income, or you can claim depreciation, but not both as you may have done previously.

I assume this applies from July 1 2008 on. My understanding of depreciation is that ‘work purposes’ in the above is something along the lines of ‘assisting in the production of assessable income’, but this is certainly getting into regions where you should consult the ATO and tax professionals.

Update on the tax status of laptops

Michael Davies pointed out in email that the changes to laptop purchases and taxation have already taken effect, there is no window of opportunity to buy a new private-use laptop and still salary sacrifice it. Depreciation on existing laptops purchased via salary sacrifice can be claimed for the 2007/2008 tax year, but that’s the last time.

The Government will tighten the current fringe benefit tax (FBT) exemption for certain work‑related items (including laptop computers, personal digital assistants and tools of trade) by ensuring the exemption only applies where these items are used primarily for work purposes… The measure will apply to items purchased after 7.30 pm (AEST) on 13 May 2008. The measure reduces the FBT concession and tax expenditure for work‑related items…

The Government will also deny employees depreciation deductions for FBT exempt items (that is, items purchased primarily for work purposes) purchased from 7.30 pm (AEST) on 13 May 2008. For items purchased before that time, employees will be denied depreciation deductions for the 2008‑09 and later income years. This measure will ensure that employees are no longer able to gain a double benefit by obtaining an FBT exempt item (such as a laptop computer) from their pre‑tax income, and then claim a deduction for depreciation.

Budget Paper No. 2 > Part 1: Revenue Measures > Treasury

Safe diving practices

Background: I had mild to moderate shoulder pain after SCUBA diving a month ago. I was treated for Decompression Sickness (DCS, the bends) although it’s impossible to confirm the diagnosis for moderate pain, because it feels exactly like a sprain or strain.

I just had my followup appointment about safe diving practices (there’s an Australian standard, in fact). Since these are enormously different to diving practices pretty much anywhere, I thought they’d be of interest. These are the ones they wish they could give to everyone, by the way, not the ones that are only for people who have had DCS. Take the ones that are actually taught in training — slow ascents, safety stops — plus:

  • dive the DCIEM tables with a square profile assumption (no multi-level, no computer algorithms);
  • never do more than 2 dives in a day;
  • never dive more than 4 days in a row; and
  • the fact that everyone do repeated dives on the President Coolidge and in the Truk Lagoon to 50 or 60 metres breathing air and without decompression stops doesn’t mean that everyone isn’t an idiot.

OK, that last one comes up in dive training too I admit. But only in the context of your instructor sheepishly admitting to their idiotic profiles. (The relevance of breathing air at 60 metres is that’s a lot of nitrogen, over 5 atmospheres of partial pressure, and nitrogen not only gives you DCS, it makes you rather drunk starting from about 25 metres and steadily getting worse from there.)

In my case there is one extra restriction: take a 3 metre depth penalty and a 3 minute time penalty reading the table. Which is pretty conservative. For reference, I could dive to 27 metres for a grand total of 11 minutes bottom time on that reading of the table. (30 metres for 14 minutes is the standard reading.) Unless I decompress of course, but that has its own risks (equipment failures mean I’m stuck with failed equipment AND a missed compulsory decompression stop). The reason for the penalty is that the scar tissue from the DCS injury to my shoulder (actually, we suspect two, plus the damage from subluxating it six times previously) renders me somewhat more vulnerable again.

For non-divers, to contrast this with diving as it is actually done by pretty much everyone ever, imagine that you are going to a dance party, but need to tell the organisers that for medical reasons you’d really appreciate it if they’d keep the music no louder than 40dB. Cheers, thanks.

Or, to make this about diving, imagine that you are on a dive boat travelling to some great dive site several hours from shore. Your air consumption isn’t amazing, you can’t keep up with the suntanned French couple or the hoary old guys who are coming back after 60 minutes with half a tank left and cursing their computer time limits. But the guy running the boat who has done 1500 dives and your group’s friendly English backpacker dive guide have come up with a plan for your group that gives you 35 minutes of good solid diving to see all kinds of cool things. Now imagine I’m in your dive group. I’m the one whose medical advice is to do a 18 minute dive at the absolute maximum (the clock stops at the beginning of the ascent by the way, so probably about 24 minutes in the water total). The upside of this last scenario, I suppose, is that firstly my air consumption is rather good, so I can always loan the group my tank, and also that because I’m doing 2 dives a day and most liveaboards allow 4 at the very least, it won’t happen every dive because I’ll be on the boat sulking for most of them.

Or, let’s face it, never doing liveaboard trips again.

For divers the obvious question is what about nitrox? (For non-divers still reading, nitrox or enriched air is a tank with less nitrogen and more oxygen than the standard atmospheric ratio.) Well, it doesn’t thrill the dive doctors. They agree that it is much safer on air tables. They don’t so much like the use of separate tables to extend your dive time which, let’s face it, is why I’d want to use nitrox. It also comes with separate risks: the mix can vary wildly from what they claim it is, and you have one more factor to manage, which is oxygen toxicity. (High partial pressures of oxygen are toxic to cells. The first you know of the cell damage is a sudden seizure. So the solution is not to breathe those partial pressures, from about 1.4–1.6 atmospheres up. You shouldn’t go much past 20 metres on 36% oxygen.)

There’s nothing to stop me learning technical diving (adding helium to the mix to offset the risks of high pressures of nitrogen and oxygen) or adding decompression stops to my time, except that no dive boat I’ve ever been on is set up for the latter. (And they’re both complex.) The Pacific is choppy: you can’t really stay at 5.5 metres easily for 5 minutes without a good reference line. And the boats move all the time without warning, taking their good reference line with them.

Lucky I don’t have to take the Driver Qualification Test

In a couple of weeks Andrew will make his first and I hope only attempt at the NSW Driver Qualification Test, the computer exam that separates provisional drivers from fully licenced drivers. (Here’s the NSW car licence pathway.) And may I say that it’s a good thing that I got a full licence back when there was only one test (I did the on-road driving test in 1998, held what is now the P1 licence for twelve months and then just got handed the full licence when it expired) because although it did take me four attempts to pass the on-road test that’s nothing on what it would take to get me through the DQT.

Why? Well, the problem would be that the DQT asks a lot of questions based on the test handbook, and I wouldn’t be able to read the test handbook without smashing a wall down. With my teeth.

Let’s have a look. First we have some dodgy handwaving in which the authors of the handbook are astonished that 90% of their data fits into only five categories:

About 90 per cent of all crashes in NSW involving full licence drivers in their first year fall within only five crash types…

What’s that only doing there, huh? How many crash types are there? Six? Three hundred and twelve? For reference the five crash common types are: rear-ending someone, colliding with a vehicle travelling perpendicular to you (at an intersection), colliding with a vehicle coming from the opposite direction, running off a straight section of road and running off a bend. That does seem to cover a lot of possibilities doesn’t it? Don’t divide your population into five obvious segments plus a catch-all and then act all surprised that most of the population ends up in the five categories.

But the much more annoying problem is this. They note that 25% of provisional driver accidents are rear-enders, 34% of first year full licence accidents are rear-enders and 40% of experienced full licence accidents (‘experienced’ is drivers in the fifth and all subsequent years) are rear-enders. From these numbers they draw this conclusion:

Researchers think that these differences are due to novice drivers getting better at staying on the road but also getting into the habit of driving too close behind other vehicles in traffic. This bad habit seems to continue for full licence holders. As you can see from [a colourful pie chart], full licence drivers with more than five years’ experience have even more rear end crashes. However, they are much less likely to run off the road and hit an object.

Uh-huh. And what an interesting conclusion that would be, if they had first established that they were all having the same number of accidents. If they’ve done this, they do not indicate it, it’s all percentages of crashes within each population. (‘The same number of accidents’ is a little hard to define, but I believe it’s usually number of accidents per driver, number of accidents per driven kilometre, or number of accidents per passenger kilometre. For various reasons, mostly because of a subsequent section about how women have less accidents partly because they drive about half the kilometres men do — half! — I think this booklet is measuring on a per driver basis.) If they’re not, the higher proportion of rear-end accidents among experienced drivers doesn’t suggest that they’re risk-taking: only a higher absolute number of accidents does that. It could be, for example, that rear-end accidents are harder for even experienced drivers to avoid, and thus rise as a proportion of their total accidents just because they don’t drop as much.

In fact, we certainly hope that the same-number-of-accidents premise is false here, because the whole point of the insanely complicated and steadily getting worse NSW licencing system (in which learner drivers now must log one hundred and twenty supervised driving hours before taking the on road test, ie, about twenty minutes every single day for a year) is to reduce the number of accidents among novice solo drivers by making them less novice (and also older and less prone to risk-taking, although NSW hasn’t made this as obvious as in, say, Queensland where novice drivers over 24 get to skip a significant part of the pathway).

So far so good. That brings us to page 12 of the 94 page Driver qualification handbook. I think it’s fairly clear that I’d struggle to get through it. Especially since I can’t argue with a computer examiner.

Tax calculator for PAYG employees

Since I am only of the very few Australian residents I know who haven’t had an employer stuff up their tax withholding, a useful link: the ATO tax withheld calculator for PAYG employees.

It’s in the ‘for employers’ part of the ATO site, but employees can use this to check whether each pay packet they receive has had the correct amount of tax taken out. It doesn’t rule out the possibility of tax refunds or debts because it doesn’t take into account a mountain of stuff, the major one being non-employment income but also private health insurance stuff, deductions, blah blah. But it does mean you can catch the most common payroll mistakes, the big one being an employer forgetting to take out a HELP payment. If a payroll mistake results in you having a tax debt, you’re just as liable for it as in any other circumstances (assuming that the extra money turned up in your pay, which is what a mistake usually means) so unfortunately it is a good idea to double check that your after-tax amounts match the tax table whenever you get a new job or a pay rise.

My X pain

Since it’s very unlikely that I will see an improved X.org a for me in Ubuntu Hardy (only showstopper bugs will be fixed now that the CD images are building and in any case, 4 days seems like an unreasonable timeframe) and Bryce Harrington wrote about filing good X bugs the other day, I thought I’d make some notes on why mine is a pain. Note that Harrington’s timing is good, but he’s not talking directly to me. And none of this will be surprising to people who regularly work with bugs. There’s often one that can only be triggered on a rainy night after moon rise by a user with malaria, and you only have this one guy saying it happens all the time for him and completely and uselessly fails to mention that he lives near a swamp in a tropical country, and besides he can’t see moon rise through the clouds. Plus, the fevers confuse him.

It’s not very good form to blog about a bug without reporting it, but this one does not meet my ‘reportable’ threshold, which is that if someone says does blah fix it? I need to be able to answer in a fashion other than I have no idea.

The form that my bug takes is similar to bug 194214 except that it does not prevent me from using Ctrl+Alt+Backspace to restart X. My system will get into a state where various things happen on some desktops and different things on others (sometimes or perhaps always actually in different windows, since I run them maximised it’s difficult to tell). On one, often the Shift key will be always pressed and the mouse not usable. On another, clicks on the window that appears to be in front will actually go to the window behind it. On one, Alt-Tab will switch windows and it won’t work on another. All of these may happen simulataneously. Normality is restored only by restarting X.

The major problem is that I have no real way of deliberately triggering it. I have the impression that it is something to do with using the mouse and the keyboard together, but I do that all the time and my brain does not appear to be set up to recreate my muscle memory hand movements, not even immediately after. For example, it took me ages to realise that the occasional sudden and annoying appearance of GNOME Help Centres is due to accidently pressing F1. Unusual keyboard triggered events on my system are almost always accompanied by help, what did I press, what did I press?! and frantic peering at my keyboard. (Being a touch typist except for my right little finger sucks here.) I don’t have a chance in hell of intentionally recreating whatever scenario is going on here unless I get Andrew to stand beside me while I type and do nothing but watch. He does have that kind of patience but he chooses when.

Using git-bisect or similar from Harrington’s entry is thus going to be extraordinarily tiresome. I used version such and such for 5 days, and there weren’t problems, so on the balance of probabilities, this version doesn’t have the bug in question, seems unscientific. Well, unless I work out the frequency a little better and where my 95% confidence margin is. Which means I might also want the distribution of the occurences. A slightly better method probably consists of sitting down with the X.org codebase and looking at the diff for each revision for likely looking changes. (Comments like ‘and this is the bit that definitely for sure makes clicks go to the window with focus. FOR SURE!’ would be helpful there.)

PS Standard ‘not really looking for advice’ disclaimer applies. Unless you happen to have an Ubuntu or X.org bug number to hand. Or well, if you happen to know a lot about reproducing input problems in X.

Working with code

Riffing off Jonathan Lange on writing good (and reviewable) code (by the way, the filenames are a bit obscure, as in I didn’t know review comments tended to be passed around in .diff files, but here’s the 121kB review in question), a point I’ve been meaning to make somewhere, anywhere, for a while now: making large codebases grep-friendly is important to me. Specifically, when I enter a large codebase without any intention of becoming familiar with it (ie I’m fixing a bug) I really really really like to be able to grep for function names I’m coming across. (Really, I should probably use slightly more sophisticated tools, but they work on more or less the same principle.)

I was digging around in the Nevow codebase a couple of years for goodness-knows-what (actually, I think I know, and I really should look for it again, but that’s not relevant here) and there were factories, factory-factories and factory-factory-factories, or something like that. It was very difficult to find the implementation of any of the many many objects that were slipping around my hands, because they were implemented with a totally different class name, or several of them, and then sort of assembled from pieces. Damn it’s hard to fix bugs in code like that.

Ubuntu 8.04, status of

I felt a little bad writing this, because, well, Andrew tells me Ubuntu 8.04 (Hardy Heron, release candidate due very shortly and public release on April 24th) is very nice for him and in general I’m not much in the mood to stomp on people’s work. However.

Ubuntu Hardy is really not looking like it will be a good release for me. It contains several serious regressions over the previous release on my hardware. Some of them are likely to make this the least usable Ubuntu release for me ever, on my Dell Latitude 630M. (On my university desktop it’s fine, but I don’t place as many demands on that.)

Major problems:

  • As with the beta, every few days when I am using X, particularly when using my trackpad mouse at the same time as my keyboard, the Ctrl key gets virtually ‘stuck down’ and I have to restart X wtih Ctrl+Alt+Backspace to be able to use my machine again. (There’s not a lot of useful things you can do in X when it thinks that you’re holding Ctrl down.) I thought this was bug 194214 but it probably isn’t, since 194214 is (a) fixed and (b) much more hardcore than my weeny bug. I look for it on Launchpad occasionally, but it’s discouraging because I have no idea what the correct search terms are, and also all bugs about keys getting stuck get marked duplicates of 194214 anyway.
  • The new wireless driver, iwl3945, for Intel 3945 is Free Software, but that seems to be the single good thing that can be said for it. Most of the regressions over the ipw3945 driver have slowly disappeared (although you need to install linux-modules-backports): the LED works again and I can finally use the kill switch. But it’s not very stable. It causes some woes shutting the machine down and it just caused the first ever kernel panic I’ve had on my day-to-day machine. (I didn’t file the bug on this as Andrew thought that probably the details would end up in syslog. They didn’t, and so now I have no details.)
  • Resuming from suspend is broken for me at one time in thirty (thus more than once a week forcing a full reboot, as I suspend like its going out of fashion), which is about ten times worse than Gutsy on this hardware. I reported this as bug 217461 and now I’m trying to find out what the cause is by saving pm_state. (Wow, it’s an annoying debugging process on a user machine: my system really does not like having its time reset to random things a lot. I am not sure I have the constitution to be a kernel hacker, but I guess if I was I wouldn’t be usually debugging kernels on my work machine. Much.)

Between all of those, well, gar. Using Hardy will equate to sudden and necessary reboots more than once a week for me. And I need to muck around with hdparm again to try and sort out my system’s version of bug 59695.

Stuff that’s been or going to be fixed for release (at least enough for me): the wireless kill switch, the ignoring of many fsck errors, the insane timezone selection by the GNOME clock, the incompatibility of Java 1.4 and Gecko (although this was solved by just removing Java, which bothers someone), misnaming some wireless interfaces (this stopped wireless working after suspend for a lot of people) and the wireless LED.

One thing that possibly won’t be: sound problems with programs that do/don’t use PulseAudio, but that is more of a nuisance than a real problem for me, since I mostly use my Squeezebox for sound.