Petter's blog
Reasons to hate Windows, part N+1
Your hardware has changed significantly since first install,
it informs me, so you have to re-activate Windows. Would you like to do so now?
Sure, I installed some new devices…but they were virtual devices.
USPSTF breast cancer screening deadlines
Doing my part to echo reason in the skeptical blogosphere, I’ll make a brief mention of what I’ve read about the new USPSTF guidelines, which you may have heard of. If not, Dr. David Gorski explains and deconstructs. The short version is, a group belonging to (but not setting policy for) the US government has altered its recommendations for mammographic screening to
- not screen women aged 40–49 anymore (rather, wait until 50)
- screen once every two years, instead of annually
Naturally, a lot of people misunderstand this and some of the less reasonable among them start crying about misogynism and the Obama administration’s death panels. These people miss a lot of obvious points.
These are screening guidelines. They have nothing to do with recommendations for symptomatic women (examining them is not screening, but diagnosis). It also does not apply to women with known risk factors. It’s a change in how they suggest screening of asymptomatic women should happen.
The group was not set up by the Obama administration. The US authorities do not condone these guidelines. In fact, most groups do not, though if Dr. Gorski is right, a gradual shift in this general direction may happen over time. Either way, the USPSTF just makes recommendations; they have no power to dictate policy.
The tricky one: The guidelines actually make a lot of sense. Excessive screening does more harm than good.
It may sound bizarre that more cancer screening could be harmful, but it’s true. Apart from discomfort and angst caused by false positive diagnoses, there’s very real pain and even small danger in performing biopsies on harmless lumps (even good medical interventions are never completely risk free). And, not all cancers will kill you—a few may spontaneously go away, but much more significantly, a lot of cancers are just so slow-growing that they shouldn’t be on your list of worries. With the average life expectancy around 80, a tumour that will absolutely kill you by your 110th birthday is…really nothing to worry about. You’re more likely to live longer without the harsh regimen of surgery, chemotherapy, and radiation necessary to treat the cancer, even though that same regimen is an absolute life-saver if you have the sort of cancer that would kill you before you’re certainly dead by natural causes.
There are also other factors, such as lead time bias (highly recommended reading). It’s easy to say that If we screen 40-year-olds, most diagnosed cancer patients survive on average 15 years; if we only screen 50-year-olds, we find that our average patient only survives 5 years
and think that early screening lets people live longer (15 years versus 5!)…but I’ve just described two scenarios with people dying at age 55; the difference is how long they live with the knowledge that they have cancer. This sort of thing happens, it is significant, and it confounds trials and policy making. Detecting cancers earlier is only helpful if interventions actually turn out to save lives.
I won’t say much further, because this is obviously not my area of expertise, but because a moral panic has sprung up around the internet, I figured I would say something in case you stumble across my blog. If these issues concern you, I highly recommend David Gorski’s write-up, the SkepChick counter to a bad Feministing report, and Orac’s direct deconstruction of the canards and conspiracy theories.
BJJ notes
-
The mats for the new gym will apparently be delivered tomorrow. We may be roughly a week away from moving into the new facility, which will be 2–3 times bigger and have twice the mat space of the current one, plus showers in the men’s and women’s change rooms, compared to the current single, co-ed bathroom with shower.
-
I’m not sure exactly how soon, but the new gym will offer a laundry service, so that for a reasonable fee, I can keep two gis at the gym, rotate them, and never have to worry about laundry. Given how much of a pain laundry is for me right now (to recap: when I get home from training, it’s past laundry hours in my building, which furthermore has only one washer), that’s going to be worth a lot to me.
- There’s at least one guy at the gym who’s a very good rolling partner for me. He’s a bit more skilled than I am (which provides a challenge), but I pretty much offset that with my greater weight. Rolling with people like that is exactly what I need, as it’s challenging but I actually have opportunities to catch submissions now and then. Since being ridiculously over-passive is my single biggest problem, this is helpful. I may be awful at jits and need a size advantage, but damn it, I did catch someone who’s got some skill and experience in a paintbrush tonight…
This is why programmers don’t want to deal with dates
The subject matter is hideously complex. (On top of that quicksand foundation, many of the implementations are rickety in and of themselves.)
Edit: It occurs to me that I just effectively declared that “programmers don’t like dates”. I feel as though I’m channelling some sort of stereotype…
Fairness in the face of inequality
I’m sure we can all agree that gender equality is a good thing and that men and women should compete on individual merits—id est not as “men and women” but as individual persons. I’m sure we can also agree that while women are currently at a disadvantage in our society and should receive a boost, it should not be at the expense of men¹. Generally speaking, I expect this will cause not just moral equality but also a greater tendency toward evenness of distribution, subject to interest and desire, as I believe that men and women are pretty evenly matched in most things that matter.
But what’s the right thing to do when that’s just not the case?
A discussion thread on Bullshido.net has me thinking and rather confused. The thread discusses the merits and demerits of women’s divisions in combat sports (boxing, MMA, and so forth). In this context—as in many other athletic endeavours—the fact is, men and women are not equal. Apart from being larger (a factor mitigated by weight classes), men are stronger pound for pound. Men have significantly more muscle mass measured in proportion to their body mass, and I gather a somewhat different muscle composition to boot. What this all adds up to is that if you make a man and a woman face off in a fight, assuming roughly equal training and skill level, the man will demolish the woman because he’s stronger and faster².
One poster is adamantly opposed to female divisions of anything, arguing for strict meritocracy. I can see the iron fairness in this…but it’s also a somewhat unfortunate scheme because it would eliminate female participation at the elite level of many sports. Consequently, many other participants in the discussion feel very strongly that there should be female divisions, because there’s no reason why women should be prevented from competing at the top levels of sport (poster #1: “It won’t be the top level because you’ve excluded most of the elite, which consists [mostly] of men”). The counter-argument is that while an XX chromosomal configuration is certainly a disadvantage compared to an XY configuration in these sports, it is no more so than other genetic configurations that confer different disadvantages—lack of fast-twitch fiber, less dense bones, or other unathletic tendencies—and yet nobody proposes special divisions for people who just happen to be genetically predisposed not to be athletic.
In this particular context, my tentative conclusion is that because sports—even professional sports—aren’t morally important in terms of outcome (though they can certainly be financially so); they’re nice as they attract people to amateur and recreational levels of those same sports, where true benefits accrue for large numbers of people, viz., the many health benefits of regular exercise, sportsmanship, and plain old fun. Therefore, a scheme that attracts more demographics is better; therefore, separate female divisions are better because they encourage female hopefuls and get more female asses off the couch. (Analogously, I would not be reaping the health benefits of my own sport if Brazilian jiu-jitsu were widely billed as a women-only activity; it is not, which gets my personal male ass off my personal couch.)
In a more general sense, though, the question is a lot more difficult and therefore a lot more important, interesting, and perhaps troubling. Equality is often presented as an argument of the form Members of demographic X are as capable in every respect as members of demographic Y; therefore they should be treated equally
. But sometimes that’s just not the case. Women are not as capable in various athletic endeavours as men are. What we need to develop, as societies and cultures and moral individuals, are answers that allow us to treat people as morally equivalent, and treat them fairly, even when the established facts show us that in some context or other, these demographics are not equivalent. Sports are fairly harmless and a nice introduction to discuss this, but what if it were not something so innocuous? What if (unlike our reality) women were intellectually inferior to men? What if it turns out that some ethnic demographic—Maori, Zulu, Swedish, Yanamamö—is genetically predisposed to a lower IQ score than the human mean?
¹ In the short term, levelling the playing field will hurt some men as they lose unfair advantages. What I’m saying we should agree on is that the playing field should be levelled, not tilted in favour of women as it is now tilted in favour of men.
² This is a generalisation, of course. There certainly exist many women stronger than the average man. (The martial arts world is full of women who could kick my personal ass six ways ’til Sunday.) We should think of it as overlapping bell curves. The fact remains, however, that even after correcting for weight, the average man is stronger than the average woman, and the male elite is similarly ‘superior’ to the female elite.
I’ve had my shots; have you had yours?
Right after my longsword class (which was great), I went to a clinic downtown to get my flu shot. I’ve never had a flu shot before, partly because I never cared enough, and partly because I actually bought that canard (or one of its variations):
I usually never get the flu, but the few tiems I got the flu shot, that gave me the flu. It obviously isn’t worth it.
It is true that the flu vaccinations are not too unlikely to have side effects, viz. mild, flu-like symptoms. However, that’s not the same thing as having a real influenza. A real flu is something that will probably knock you on your ass and confine you in bed for several days, and the physical sensation is variously likened to feeling like you’ve been hit by a truck, or like you’ve slept on a pile of rocks. Flu vaccine side effects ≠ flu symptoms.
Personally, I would much rather take a moderate risk of feeling like crap for a day than a lower risk of being knocked out for a week—especially when the former lets me choose a convenient time to be under the weather.
Additionally, vaccination is not just about you. If you catch a vaccine-preventable disease, you are not merely sick unnecessarily, but also spreading a disease unnecessarily (staying home when sick is good, but doesn’t help much in early stages when you shed a virus but don’t yet show symptoms). Keep in mind that influenza is a potentially lethal disease: On an average year (with no pandemic flu), it kills several hundred thousand people worldwide, including over 40,000 people in the US (as an example of a first-world country). The flu that badly inconveniences you for a week may kill someone you accidentally coughed on in the grocery store queue.
Some people, of course, cannot be vaccinated. They are rare, but some people do have bad reactions to vaccines, and don’t have that option of protection. Some people are immunocompromised, e.g. by AIDS or by cancer or by cancer treatments and aren’t immunocompetent enough to form antibodies in response to a vaccine, so even if they don’t react poorly to it, it won’t help them. Their only protection comes from people like you and me who, if we choose to get vaccinated, are consequently less likely to infect them.
This is called herd immunity and is one of the great victories of mass vaccination campaigns. If almost everyone is vaccinated, then even though no vaccine is 100% effective and someone might catch a disease, because almost everyone else is immune, it can’t spread. Generally, we want more than 90% of the population to be vaccinated against a disease; if the level drops below this, then (as with measles in the UK) a previously manageable disease can become endemic again. Sadly, flu vaccination is not widespread enough to provide herd immunity. If you get the shot, then you are one more small piece in that puzzle—you may not have much of an individual effect, but, well—same logic as voting….
Another objection is that flu vaccines are far from 100% reliable. This is very true: They’re less reliable than any other vaccine I know of, because flu strains vary greatly from year to year, and the vaccines have to be prepared in advance of the flu season. Some years, the health authorities correctly guess which strains will be ‘big’ next flu season, and we get good vaccines. Some years, they guess wrong, and we get vaccines for the wrong strains—they still confer protection, but not nearly as well.
However, while the effectiveness is variable, it’s still substantial. You’ll have to look up exact statistics for yourself, but I believe that as very rough ballpark figures, you are 30%–50% less likely to be hospitalised for the flu if you get vaccinated, and 70%–90% less likely to die. Those numbers are good even in years when the guesses aren’t so good.
In fact, flu vaccines are so effective that they even make noticeable dents in statistics of deaths from all causes during the winter, perhaps because people who catch a flu are more likely than others to die of accidents or secondary infections. (As one blogger put it, if the flu has you nearly unconscious, you’re more likely to swerve off the road en route to the hospital, or fall asleep with a cigarette in bed.)
There are good news if you worry about H1N1. We know what strain is going around, so the H1N1 vaccine is very specific and is very likely to provide very good protection.
I lucked out today. I don’t technically qualify for the H1N1 vaccine: In Canada it’s not yet available to the general public, but only to healthcare workers and at-risk demographics like pregnant women or the chronically ill. However, the doctor I saw had drawn up more doses today then turned out to be needed, so she had a choice of giving them to non-qualifying people, or discarding them at the end of the day. Thus, I’m vaccinated against H1N1 (and for free, to boot).
I chose to get my shots right after my longsword class. One likely side effect is sore arms (plural, because I had two shots, one per arm); it seemed better to do that after swinging a sword. This way, I have tomorrow (Sunday) to feel like crap, and should be feeling OK by the time I have to work on Monday, and odds are good I’ll be in good enough shape to go to jiu-jitsu on Tuesday. Vaccines let me time things this well; diseases, not so much….
Controversy
Clearly a descriptive, not prescriptive law—its use is already widespread.
And today on ziztur.com
Life does not begin at conception.
One anonymous commenter seems to have a major hardon for “Arguments from Natural Law”, which—whatever merit or lack of merit said arguments may have—strike me as a very peculiar name for a form of argument. Natural laws, as I know them, are descriptive rather than proscriptive; if a natural law forbade something, it would mean (by definition) that it was impossible. I have a vague suspicion that the title was given in order to lend the argument itself an air of unassailability (abortion is clearly not in violation of any natural laws, since it is demonstrably possible; and if it weren’t, we wouldn’t be having this discussion).
Meanwhile, at ziztur.com…
…I write about fallacies and lies in the gay marriage debate.
P.S. While you’re over there, you might find it amusing to read the comments to this thread, wherein a Catholic makes desperate attempts to demonstrate that the Catholic Church is not sexist (the fact that only men can hold positions of authority in their church or in their family model is just a matter of different-but-equal roles, you see).
On a less amusing note, Governor Carcieri (obviously Republican) of Rhode Island vetoes the right of domestic partners to make funeral arrangements.
Big fire at Main and Broadway
Specifically, the fire raged on the southwest corner of Main and Broadway. It destroyed several restaurants, one of which I ate at a few times (Kishu Island, a decent Japanese place). If the fire had jumped the street across the intersection
- north, it would have destroyed my favourite café;
- east, it would have threatened my jiu-jitsu club’s current gym;
- northeast, it would have ravaged the block where my jiu-jitsu club is shortly moving.
The real Biblical view on abortion
The one instance where it actually makes any specific reference to abortion or causing a miscarriage in any way: Exodus 21:22
ASV: And if men strive together, and hurt a woman with child, so that her fruit depart, and yet no harm follow; he shall be surely fined, according as the woman's husband shall lay upon him; and he shall pay as the judges determine.
The Bible prescribes a monetary fine as the punishment for abortion. Which is to say, God's word is that abortion is, while not morally good, not as evil as, say, sassing back to your parents (the Biblically-mandated punishment for which is death, as per Leviticus 20:9).
“Malimar”, blog comment
TekSavvy—the problem with “last mile” connections
Original estimate of connection date: November 11.
Revised estimate: December 7.
This is in no way, shape, or form the fault of TekSavvy, who can’t do a thing about it: The lines are owned by Telus, so I need a Telus technician to hook me up. (I would not be very surprised if this consists of little more than some hemming, hawing, and pushing a button somewhere geographically different.) Telus, it seems, are suffering a technician shortage in BC and Alberta—so, whoops, my estimate gets inflated by another month, and I have to wait a total of nearly five weeks instead of just one.
Now I am glad I decided to play it safe and not cancel my Shaw account until the TekSavvy service gets activated.
Hard drive misadventures
I just bought a new, larger hard drive, and today I installed it in my desktop computer. I bought this computer from NCIX and, in a moment of pure indulgent laziness, paid them to assemble it for me rather than assembling it myself. Today I had to open it and move things around—and oh, but my earlier laziness came back to bite me in the ass.
The case has two 3.5" drive cages. In spite of the case manual’s suggestion that one use the lower cage “for optimal cooling and noise reduction” (or something to that effect), both pre-installed drives were in the upper cage, which sits directly in front of the video card. By “directly” I mean that they were so close that the power cord of the lower drive was physically touching the card. By “physically touching” I mean that it was, in fact, blocked by the card, so that I had to remove the video card to unplug the drive. To remove the video card, I had to unplug the system power cord. …And so on.
And of course all the cords were zip-tied together so tightly that the drive cage could not be removed without unplugging the drives, and the lower cage could not be reached without cutting numerous zip ties. And no power connectors were left for expansions, so I had to dig through boxes to find spares; ditto SATA connectors. As a bonus, the upper and lower drive cages use different attachment systems (the upper cage has drive bays, the lower does not), and the necessary screws were of an unusual type, so I had to find those too (this one isn’t the installing tech’s fault, though).
I have never spent so much time just physically installing a hard drive, but on the bright side, I expect that moving all the drives to the lower bay will significantly improve system cooling (since the hard drives were between the front air intake and the video card, sigh), and the case could use the cleaning it got; it was a mite dusty, if you’ll pardon the pun.
Now, of course, grub reports an error, presumably because the drive order has changed, or something (the BIOS setup correctly reports all three HDDs). I don’t know, and I lack the energy to work at it tonight. Hopefully tomorrow night will be a quick fix to get the system running rather than something horribly wrong.
Evince for Windows
If you loathe the Adobe Acrobat reader half as much as I do, you might be happy to learn that Evince, the standard PDF reader for the GNOME platform, now has a Windows version (get it here). I have not used this Windows version myself, but expect good things. (This latest version of Evince also added support for the one feature I was missing: Displaying annotations.)
Evince is what made me stop hating PDF documents—it does nothing fancy, but displays PDF (and Postscript) documents cleanly, quickly and efficiently. Searching for text in a document resembles, well, searching for text in a text document rather than asking your computer to reindex all its documents while attempting to compute a cure for all cancers, or whatever Adobe make their reader do to slow it down to the startling degree I have come to expect. (If—if—this sounds like an exaggeration, it’s because (1) the Adobe reader for Linux is even worse than the Windows version, and/or (2) they have improved the Windows version since I last used it, reversing a long-standing tradition of adding more and more features that nobody uses except your CPU.)
More seriously and less sarcastically, Evince was the first application that really struck me with a “less is more” sort of beauty—an object lesson in UI design, if you will. It’s there to do one thing: Let me view PDF and Postscript files. It has almost no buttons, options, switches, or fiddly bits. And yet, in its stark simplicity, it was so vastly superior to the obvious alternative that it made me view PDFs as a good format for portable documents rather than a plague upon the internet.
SpiderOak: Impressions
I recently decided to try SpiderOak to backup documents that are either too large, or too sensitive to conveniently keep in my subversion repository. I signed up for one month at a cost of $10 to get 100 GiB of space. They offer 2 GiB completely free, and I can highly recommend this for storing smaller amounts of data (I would, except that I have, use, and like subversion for this).
Initial impressions: No problems with the packages¹ or UI. I can only assume that the Windows and Mac versions are identically smooth (with most products, after all, Linux gets the least attention and support). I had some issues where my upload speed would slow to a crawl, then a halt…but I think this is more due to Shaw, whether because the cable network gets overloaded at certain times of day, or because they throttle my connection.² However, this was not immediately obvious, so I asked SpiderOak tech support, just in case. Their response was prompt, friendly, and voiced in a way that didn’t seem to assume I’m an idiot (I’m very sensitive to perceived condescension). Thus, while SpiderOak’s support didn’t solve a problem for me, because there almost certainly was none on their part, their response seemed promising: Based on preliminary data, I like their customer support.
So far, I’ve backed up about 9 GiB of data. Of course, uploading this on a cable connection with a maximum of 0.5 Mbps upload rate, it’s rather painfully slow, but once I have the data uploaded, I won’t have to repeat it… Unlike services like DropBox, SpiderOak lets me specify which directories I want to upload (and exclude subdirectories, if I so desire), so I can keep my files organised how I want them. It also turns out to be trivial to synchronise files between different computers. Their FAQ has all the details. It’s as simple as it sounds, and probably simpler.
As you can probably tell, I’m very happy with the service so far, though I’ve only used it for a few days yet. It’s quick (except for my upload speed…), easy, and I like their security model a very great deal. Based on my limited experience, I would recommend it—especially to those among you who don’t currently have an online backup service. Why not? You can get 2 GiB of safe, automatic backup for free! And if you need more (as I do), $10 a month or $100 a year gets you 100 GiB, while most other services I’ve found charges the same for only 50 GiB of space.
Again, of course, if you decide to sign up, use my referral link and give me some extra space for free…
¹ When I installed it on Ubuntu Karmic, there was no “Ubuntu Karmic” package, but the Jaunty package worked fine. A few days later, a Karmic package was available—this was within perhaps a week of the initial Karmic release, mind. I believe the package was actually the same, though of course it’s reassuring to click a link with the correct legend.
² My solution? I’m switching to TekSavvy, who offer twice the upload speed and about the same download speed at a similar price, never throttle anything, are less likely as an ADSL provider to suffer congestion than cable, and are champions of net neutrality and deserve my money more than Shaw does. On the very remote chance that my upload issue was SpiderOak’s fault rather than Shaw’s, I expect I’ll be happy with TekSavvy. (On the very, very remote chance that I’m not, I’ll just switch back.)
Today in BJJ: Noobs are bad for your health
I am rather irked.
Drilling armbars from knee-on-belly (not rolling, not sparring, just drills) with a rank beginner (no stripes). He cranks some armbars a little too fast for my liking—not enough to injure me, but enough to alarm me, so I give him a little friendly spiel on how he should do it slowly; how the amount of leeway he has for an armbar varies with position so he should always go slowly even if he thinks he has room for more, because the position and how deeply he can sink his hips will change that amount of room.
He nods understanding, we reset, and in his next move, he cranks an armbar from an awkward angle fast and hard enough for me to cry out in pain.
My first reaction—after the initial “Ow”, “Oh shit”, and (unspoken) “You stupid git” had flashed through my mind—was that this is no big deal; I should shrug and keep training. My next thought was that the last time I said “this is no big deal” and kept training, I had a sore elbow that I couldn’t straighten fully for several weeks (dim memory suggests that the initial pain was less that time). Thus, I am now sitting at home with an ice pack and a very foul temper, wishing I were in the advanced class running right now (which is harder, but full of people who know to apply an armbar slowly enough to give you time to tap).
Online backup: SpiderOak
After downloading this morning’s find, my first thought was I must never lose this!—so I spent some time thinking about backup strategies.
Most of my data are backed up by shoving them into a subversion repository containing most of my home directory. This is a techy, nerdy way of doing things that works very well for some data, and gives me the ability to perform very sophisticated change tracking.
It works rather poorly for some data, though. In particular, it’s not ideal for storing large sets of binary data…like an 8.1 GiB repository of scanned books [embedded] in PDF format (or like music, or video files). It also has another weakness, not intrinsic to the mechanism but significant in my usage: Because my subversion repository is housed on the same server and server account as my websites, I’m not 100% comfortable uploading very sensitive data. It’s a shared server (although I have of course disabled read permissions for other users), and it runs, with my user priveleges, my own webapps—which are of course no more secure than I made them.
So I decided it was finally time to look into alternative backup strategies. I’m quite happy with subversion for e.g. text files that I modify, my projects’ source code, and so forth, but for photos, videos, music, and large downloaded collections of RPG supplements that I’ll never edit anyway, I want something else. Having heard the name bandied about, I of course looked into DropBox, which looks quite OK. I did spend some extra time looking around, though, and came across a DropBox competitor I had not heard of: SpiderOak.
Both DropBox and SpiderOak offers a free 2 GiB storage account with paid upgrades to 50 GiB or more. Both offer secure, encrypted transport, synchronisation between multiple computers, etc. However, SpiderOak offers a few features that DropBox does not, some of which are quite interesting.
- Sharing data in place rather than having to stick them in a dedicated directory; I can backup my
documentsdirectory, for instance, instead of having to create and use.DropBox/documents. - “Zero knowledge” security means that data are stored encrypted, and SpiderOak does not store my password. This is fantastic and wonderful (though it does come with the caveat that if my password is lost, it cannot be retrieved). No matter what I upload, encrypted transport means that no one can eavesdrop on it, and encryption means that no one, not even SpiderOak employees, can get at it. I can be as comfortable storing even very sensitive data, like passwords and personal information, in SpiderOak as I can on my local computer (however comfortable you think I should be with that).
- Extra storage at half the price is a pretty obvious advantage. $10/month gets me 50 GiB at DropBox or 100 GiB at SpiderOak.
Client software is available for Linux, Windows, and OS X, so you can share data across platforms. (This is also true of DropBox, of course.) Unlike DropBox, much (though not all) of the client software is open source, and SpiderOak claims that they are moving towards a full OSS client. (They’ve already shared some code.)
On paper, then, SpiderOak is about as close to perfect as it can get for my needs. What remains to be seen is just how smooth and seamless the experience turns out to be when I start using it (it has a reputation in some parts for being a bit of a resource hog; to me, that sounds like a small price). If it’s as good as I’m hoping, I will recommend it to everyone I know.
If this convinces you to sign up, please use this referral link to give me some bonus space in return for my time writing this up. (Pretty please?)
Notes from Jedi Academy
When someone is using the power of the Force to perform a mighty leap across a gaping chasm is an excellent time to use said Force to push him in the other direction, cancelling out horizontal velocity in mid-air.
Contrary to an old Sith belief, it is not in fact possible to platitude a Jedi to death.
Speed in unit tests matters
It’s extremely frustrating to have to wait for over ten minutes when you’re ready to commit some new code, just because you have to wait for a big, slow unit test suite to complete. It’s also frustrating when you’re actively addressing a known bug that’s been exposed by unit tests and, having made a change that will hopefully fix it, sit and twiddle your thumbs as the tests re-run. Efficiency matters, even in unit tests.
I’ve spent a few workdays attacking the test suite for the module I’m working on with the proper tools—a profiler and KCacheGrind, a profiling data visualiser. By figuring out where the test suite spent most of its time and optimising the slow parts (largely by caching data that were recomputed superfluously, caching prepared statements, etc.), I cut down the expected running time for company-wide unit tests by an estimated 10% and my own module’s tests by approximately 80%—an improvement by a factor of 5, from 12:31 to 2:40!
Of course this number is going to creep up as the test suite grows, coverage improves, and setup becomes more involved. However, that’s all the more reason to do this, and just means that it may become relevant to do it again at some point in the future.
As a bonus, the majority of the performance improvements were to business code exercised by the unit tests rather than code exclusive to the test framework, so application performance will be improved as well. I should be cautious in my conclusions here, though: While there will be improvements, some of the code exercised very heavily by unit tests is not run very frequently by users.