Testing Equivalence and Boundary Analysis

There were some questions about equivalence classes and boundary
values in a discussion about software testing I was in recently.

I thought I'd attempt to present my understanding, from a somewhat
mathematical perspective.

Black box functions and input partitioning

Think about the function being tested as a black box. It takes inputs
from a discrete but possibly infinite set (for example, all 64 bit floating point
numbers, or all unicode strings) and produces output, again in a
discrete set.

Mac Mail.app and Google two-factor authentication

OK, this is my Arghhhhh! of the day.

Some time ago I enabled two-factor authentication for my Google accounts - this is generally a good idea in this brave new world of Chinese hackers and botnets. In short, a hacker would need not only my password, but also my cellphone (and the password for that) in order to hack my Google accounts.

Git suddenly starts asking for ssh passphrase

Today, I tried a "git pull" from a github repo, and to my surprise, was prompted to enter my SSH passphrase for my key. Normally, I don't have to type anything - that's the beauty of SSH keys.

After mucking about far too long, I finally realized that this meant that the ssh-agent process on my Mac had died. Unfortunately, there seems to be no easy way to restart this from the command line (see this post). So, much to my chagrin, I rebooted my Mac. Damn, it's almost like having to use Windows.

Fortunately, rebooting reset whatever was going on with ssh-agent, and git started working properly again. Whew.

Mac WTF: Could not load Users and Groups preference pane

A few days ago my (brand-spankin-new-top-of-the-line) MacBook Pro Retina 13 started giving me the error "Could not load Users and Groups preference pane." From any of my accounts. With no system changes that I deliberately made.

Macbook Battery

I bought a new battery for my 13" Black Macbook yesterday from BattDepot. The Apple replacement part goes for $159, I've seen third party replacements in stores for $129, but BattDepot lists theirs for $47.99 plus shipping and handling. After taxes, it comes to just under $60, almost $100 less than Apple's suggested retail price.

It seems that BattDepot is a reseller for Dr. Battery, so when I selected the "Pick up from warehouse" option ($5) I was given the address of the Richmond warehouse of Dr. Battery. The battery fits nicely, and is a good though not perfect match for color and texture. It is reported by System Profiler as a 5125 mAh battery at 12566 mV, once fully charged.

Easy and Delicious

The past couple of weeks I've been sampling the recipes from a book my sister gave me (Mes petites papillotes)

The recipes are (almost) all based on cooking "en papillote" which I must confess intimidated me for a couple of months until I actually tried it: you assemble the ingredients for individual portions, place them on an oiled sheet of cooking parchment (available by the roll at supermarkets and cooking stores), fold the parchment closed and staple together, and put the whole thing in the oven for a few minutes. The result is beautifully fresh and delicious - everything steams in the package, and delicate flavours are nicely brought out. You can serve the portions in the parchment, and even very simple recipes acquire a certain excitement - who doesn't like unwrapping presents?

Fixed iPod backup/sync error

I finally sat down and figured out what was behind the errors I was getting every time I tried to sync my iPod. I'd plug my iPod Touch into my Mac, iTunes would pop open as per usual, and the device would start to sync. After a few seconds, I'd get a dialogue window with the message "iTunes could not back up the iPod "iPod" because the backup session failed".

This has been happening for several weeks now, and I started out by hunting through the logs. I spotted the following in /var/log/system.log:

Setting up a Persistent Ramdisk on MacOS X 10.6

Using a ramdisk can significantly improve the performance of many disk-intensive applications. In this post I'll describe how to set up a ramdisk for MacOS X 10.6, which will persist across system sleep and wakeups, and even reboots.

Note: 22-Mar-2011: I've updated this article with some significant improvements.

I was motivated to look into this while running unit tests for Drupal development. This is a very database intensive operation, and running a full suite of tests takes many hours on a typical laptop. This is a perfect situation for deploying a ramdisk.

Setting up a Ramdisk

A little bit of googling led to this page, which describes how to set up a ramdisk for MacOS 10.6 (and 10.4/10.5, which I won't discuss here). This worked beautifully. Here's how to set up the Ramdisk:

New glasses have arrived

I got my new glasses this morning, ordered online at Clearly Contacts. I can see! No more blobs of glue on my frames. The new glasses fit nicely - as my friend Roland mentions in his comment, the key is to supply the dimensions from an existing set of frames. Yay for open standards. Along with the glasses came a hard case (a little too precious for me), two little storage bags of the variety I usually lose within a week and find later under a big stack of books, a cleaning cloth, and a little screwdriver. I was very impressed that I ordered these on Sunday afternoon, and received them Wednesday morning - all for under $90, including high-index lenses and FedEx shipping.

Ordering eyeglasses online

I ordered some glasses online yesterday from Clearly Contacts. I've been wandering around with stereotypical nerd glasses, held together with blobs of epoxy, since last September when my rimless titanium frames gave in to metal fatigue and snapped.

Pages

Subscribe to PureGin.org RSS