Category Archives: Technology

If one were into conspiracies…

Our country is running massive deficits, financed by foreign government purchases of Treasury instruments. It’s not clear how long we can keep finding buyers for our debt while paying virtually zero interest. This is especially so when the stock market is going up, presenting an attractive (at least in theory) return compared to government bonds. In a rising stock market, people are less apt to head for the safety of bonds. So, what’s a government to do? Devalue the stock market. Now that the stock market has gone up for long enough such that companies like Goldman Sachs and Bank of America have been able to recapitalize themselves via trading profits, now might be a good time to crash the market back down and drive up demand for government bonds. A great way to do that would be for somebody in the administration to propose legislation that would ban stock market investments by some of the largest investors in the stock market: commercial banks.

I’m not saying this is one of the intents behind the Volker rule, but it does work out quite well. I’ll also point out that the Volker rule imposes even more restrictions on bank trading than Glass-Steagall ever had. All in all, a very nice way to keep the stock market form overheating without having to raise interest rates, a perfect bit of finesse whereby borrowing costs stay down for the government without having to tighten credit and potentially derail whatever recovery we’ve got going here. While I’m obviously joking about a conspiracy theory, I do believe it’s true that a stock market drop may be necessary to containing borrowing costs for the government. Thus, they may not be so quick to try to take efforts to prop it up.

Request for important Gmail feature

One of the nice things about Gmail is their “labs” feature, where Google engineers can add cool experimental features to which users can opt-in. One of the most useful is a feature that alerts you whenever you send an e-mail that mentions an attachment but for which you forgot to actually attach anything.

Along those lines, I propose to Gmail engineers another, even more important feature: “The Inappropriate Love Sign-off Warner.”This feature would warn you if you sign an e-mail with “Love,” (or any of a list of other ways you wouldn’t want to sign an e-mail to your boss).

I can’t count the number of times I’ve sent an e-mail to my wife, and then almost signed the next e-mail (to somebody other than my wife) “Love, J.” And lord knows how many times I actually did it without noticing. Perhaps another potential labs feature would go through your Sent Mail and count how many times.

Problems with Audible authorizations on Mac OS X?

Recently, after restoring backup from my Time Capsule, I ran into a problem where I’d have to reauthorize my Audible audio books every damn time I opened iTunes. Suspecting the usual culprit of problems on a Mac, messed up permissions (especially given the recent restore), I poked around and found the problem child. If you are having similar problems, I hope this might save you some time.

In Terminal, from an account with administrator priviledges, type the following:

sudo rm /Library/Preferences/com.audible.data.plist

It will ask you for an administrator password. Type it.

Now, after restarting iTunes, you should only have to reenter your Audible password one last time. Note that you have to be running from an administrator-level account for this to work. (Go to Users in System Preferences to enable your account as an Administrator, if need be. You can always switch it back to Standard once you’re done with the fix.)

Mendeley: How NOT to run a beta preview program

One of the (many) influences Google has had on the software industry is the concept of the beta release as product. In some ways, this is a good idea, as it creates a community of early-adopters who can act as a massive beta testing community, giving the company feedback on real world use and making for an even more stable general release. The early adopters benefit from access to early technology, the public benefits from better software, and the company benefits from advance publicity and testing.

It can backfire if not done correctly, however, and Mendeley is providing a good object lesson in that. In theory, Mendeley is a killer app for people in academics. It is a cross-platform (including web), cloud-synced database for papers that handles citations and automatic import from all manner of online journals.

Unfortunately, the beta releases have been so bad that most of the word-of-mouth on Mendeley has been poor. Do a quick Google search on them and you’ll see a lot of complaining. In my experience, the software has tremendous potential but is so poorly implemented that it is currently unusable. Import of any paper with an accented letter in an author name, for example, fails. In my field, it seems half the people have umlauts in their name. Page numbers aren’t imported correctly, either, requiring the user to manually enter them. If you import a PDF for a paper already imported through other avenues, the software is happy to create duplicate entries. And so on…

After the frustration of importing their citation database from other software, only to find Mendeley too buggy to be usable, it’s likely many of the early users will not bother return for more punishment. So, what Mendeley is actually accomplishing with their beta program is the alienation of exactly the kind of people they are supposed to be winning over: technologically-minded members of their target audience. These are the people their collegues will to turn to when they are looking for citation software. Mendeley won’t be their answer.

Unfortunately for Mendeley, they may eventually have a great product, but when that final bug is fixed and they drop “beta” from the name, it may be a tree falling in a forest with nobody to hear.

Benchmark results for Snow Leopard: 32- versus 64-bit kernel

It was recently revealed by ZD Net that Apple’s new Mac OS X release, dubbed Snow Leopard, would default to a 32-bit kernel despite being largely portrayed by Apple as the final step in the Mac’s journey to being a fully 64-bit OS. The reactions, as with anything Apple-related, were sheer polemic. Just check out the comments on the ZD Net article, and you’ll see what I mean. The Apple apologists played it off as if 64-bit code is pointless in the kernel, despite being indispensable in applications. The Microsoft partisans acted as if Apple had just halved the speed of the entire OS.

So, what’s the truth? I ran a few quick benchmarks to find out. To isolate the effects of the kernel from the benchmark software itself, I used a 32 bit benchmark program, XBench, so that the only thing that would be changing between the two runs was the kernel. (My understanding of Mac internals is not great, so I hope I wasn’t making a poor assumption here.) The results were interesting. As one might expect, neither side is entirely right or wrong.

The biggest difference was in memory allocation, where the difference was almost a factor of two. The next biggest difference was in the thread benchmarks, where the 64-bit kernel had a roughly 30% improvement in time. Finally, the 64-bit kernel had over a 10% improvement in large block disk transfer speed. These results seem plausible, as all involve tasks where the kernel plays a relatively large role. The rest of the benchmarks, mainly graphics and computation, had little or no improvement, as one would also expect.

So, it seems that while it’s true Apple isn’t doing a terrible thing by defaulting to the 32-bit kernel, it’s certainly also the case that you’re leaving some speed on the table. This is especially true for the disk transfer benchmarks, which can have a real effect on the perceived responsiveness of the computer.

The complete results for my are below. The test computer was a 2.53 GHz Mid-2009 MacBook Pro.

64-bit Kernel

Results	127.31
CPU Test	180.05
  GCD Loop	285.50	15.05 Mops/sec
  Floating Point Basic	145.63	3.46 Gflop/sec
  vecLib FFT	120.72	3.98 Gflop/sec
  Floating Point Library	280.68	48.88 Mops/sec
Thread Test	331.22
  Computation	500.00	10.13 Mops/sec, 4 threads
  Lock Contention	247.63	10.65 Mlocks/sec, 4 threads
Memory Test	200.62
 System	255.76
  Allocate	618.01	2.27 Malloc/sec
  Fill	185.89	9038.61 MB/sec
Copy	211.31	4364.56 MB/sec
 Stream	165.04
  Copy	157.53	3253.68 MB/sec
  Scale	155.20	3206.42 MB/sec
  Add	175.03	3728.48 MB/sec
  Triad	174.48	3732.49 MB/sec
Quartz Graphics Test	190.82
OpenGL Graphics Test	86.25
User Interface Test	245.26
Disk Test	48.75
 Sequential	101.56
  Uncached Write	120.97	74.27 MB/sec [4K blocks]
  Uncached Write	119.43	67.57 MB/sec [256K blocks]
  Uncached Read	64.63	18.91 MB/sec [4K blocks]
  Uncached Read	137.50	69.11 MB/sec [256K blocks]
 Random	32.07
  Uncached Write	11.66	1.23 MB/sec [4K blocks]
  Uncached Write	77.18	24.71 MB/sec [256K blocks]
  Uncached Read	59.85	0.42 MB/sec [4K blocks]
  Uncached Read	107.70	19.98 MB/sec [256K blocks]

32-bit Kernel

Results	122.67
CPU Test	179.50
  GCD Loop	295.89	15.60 Mops/sec
  Floating Point Basic	141.66	3.37 Gflop/sec
  vecLib FFT	120.19	3.97 Gflop/sec
  Floating Point Library	283.69	49.40 Mops/sec
Thread Test	260.69
  Computation	396.28	8.03 Mops/sec, 4 threads
  Lock Contention	194.23	8.36 Mlocks/sec, 4 threads
Memory Test	190.01
 System	234.38
  Allocate	369.54	1.36 Malloc/sec
  Fill	186.29	9057.73 MB/sec
  Copy	211.60	4370.52 MB/sec
 Stream	159.77
  Copy	153.34	3167.08 MB/sec
  Scale	150.01	3099.22 MB/sec
  Add	169.51	3610.92 MB/sec
  Triad	168.11	3596.34 MB/sec
Quartz Graphics Test	187.39
OpenGL Graphics Test	87.04
User Interface Test	237.42
Disk Test	46.82
Sequential	90.51
Uncached Write	118.31	72.64 MB/sec [4K blocks]
Uncached Write	79.22	44.82 MB/sec [256K blocks]
Uncached Read	60.05	17.57 MB/sec [4K blocks]
Uncached Read	154.69	77.75 MB/sec [256K blocks]
Random	31.58
Uncached Write	11.29	1.20 MB/sec [4K blocks]
Uncached Write	76.69	24.55 MB/sec [256K blocks]
Uncached Read	60.83	0.43 MB/sec [4K blocks]
Uncached Read	116.08	21.54 MB/sec [256K blocks]

Twitter… for men

With recent advent of Woofer, the Twitter clone that requires the use of 1400 characters, I’d like to add my own entry into the foray.

Introducing Twitless: Twitter for Men. “140 Characters. A month.”

You can use your 140 characters any way you want, but if you use ’em up early, you’ll just have to wait until next month, chatty Kathy.

Twitless. Because real men only talk when they have something to say.

New MacBook Pros have hard drive problems

When the new unibody MacBook Pros (MBPs, henceforth) came out, many owners were up in arms over the fact that the new, supposedly high-end models lost SATA 2, and were only capable of 1.5 Gb/s SATA 1 speeds. Some people felt this was fair because Apple only provides SATA 1 drives, but this isn’t entirely true: some of the upgrade drives Apple offers on its online store are drives that would support 3.0 Gb/s speeds if Apple had enabled them.

A few weeks ago, Apple quietly released a firmware upgrade that enabled SATA 2 on the new MBPs. Unfortunately, something is wrong with the hardware, because now people with SATA 2 drives are having problems right and left. Apparently, the SATA bus on the MBP is unable to handle 3.0 Gb/s, and large numbers of transfer errors are occurring. SATA is designed to catch these errors, but since they’re not supposed to happen in the first place the result is not pretty. The system hangs for several seconds as the operating system deals with the errors and the data is reread. This causes the infamous Apple “spinning beach ball,” especially if a lot of processes are competing for disk access.

If I were to speculate (and what fun is a blog if you can’t do that?) I’d say that Apple’s hardware engineers used a cable that isn’t capable of reliably supporting the higher bit rate. Having opened up my MBP to upgrade the hard drive, I’m not surprised that the cable they used would have problems. It’s an unshielded ribbon cable that runs right along the case of the hard drive. It probably has all sorts of parasitic capacitances. I’m guessing their engineers tested it at 1.5 Mb/s and saw no problems, and then somebody rushed the firmware out without adequately testing it.

To make matters worse, this bit of poor hardware engineering triggers an even more egregious bit of software engineering: the ‘spindump’ process. This little piece of Mac OS X kicks on automatically whenever a process hangs, and writes a ridiculous amount of information to the disk so that Apple can diagnose the problem. Of course, if you’re already having a hang because of hard drive problems, the last thing you need is for the system to respond by spewing massive amounts of data at the disk. It’s often enough to take a minor problem and make it a major one that requires a hard shutdown of the computer. Brilliant, Apple. This is my first Apple computer since abandoning Apple in 1997 during the dark years of System 8. So far I’m regretting the decision to come back…

How to tell if you’ve got a problem: If you have a stock MBP configuration, you probably don’t have a problem. However, if you have an upgraded drive (especially one of the 7200 RPM, or solid state drives) and you’ve been having system hangs, this may be the problem. If you’re nerdy enough, you can install smartmon tools and check to see if UDMA_CRC_Error_Count is more than zero.

How to fix: Until Apple gets it’s act together and issues a firmware update (if that’s even possible) to bring it’s “pro” level computers technologically inline with last years low-end models, you’re just going to have to disable SATA 2 on your drive. Whether or not this is possible, and how to do it, will vary by manufacturer. On Seagate Momentus drives, you can short two jumper pins to force the drive to use SATA 1 speeds. Details can be found in the user guide of your specific drive.