« March 2005 | Main | May 2005 »

April 30, 2005

It's just like riding a bike...

My friend Paul is 34 years old and, for some reason (most likely because he's a wuss), has never learned to ride a bike. I can only imagine that this is a huge badge of shame that sometimes keeps him up at night, not unlike adult illiteracy for other people. Clearly, this is a situation that demands the utmost in empathy and sincerity from his friends.

Well Paul, your day has finally come.

Interestingly, while googling for "adult learn to ride a bike", I came across several adult-education links like this one for those who have never learned. OK, that's not interesting, but the fact that the course is taught in Canada (America's hat!) is, given that Paul is Canadian. Perhaps there's some sort of non-bike-riding epidemic going on up there in our hat.

April 29, 2005

The wonderful thing about Tigers...

Unless you've been living in a cave (or more likely, not using a Mac), you know that today marks the official release of MacOS X 10.4 - "Tiger".

I was lucky enough to get my hands on the GM version yesterday through work and installed it to prepare. So far, so good. I really like Spotlight - it's shockingly good at finding what I want, and some bonus things that I didn't even know I had. I also really like Dashboard. Unlike Expose, I suspect I'll be using Dashboard all the time. Right now, I'm searching for a hex calculator for it - that would r0xxor my b0xxors.

CodeWarrior 9.4 isn't so happy about 10.4, and I hear a CW 9.5 update is pending to address that. Notably, it won't build against the 10.4 BSD headers - you have to force it to use the 10.3.9 SDK for now. Interestingly, the 10.3.9 SDK contains some finally-revised OpenGL headers, including the long-missing VBO stuff. Interestingly, the glext.h headers for 10.4 include defines that hint at possible future extensions, like GL_ARB_texture_non_power_of_two.

One change I appreciate is for Nav Services dialogs. In 10.3, Cocoa apps had the ability to adjust the width of the column view in Nav Services (i.e. file picker) dialogs, but Carbon apps inexplicably did not. This is rectified for 10.4 - all apps now share the same file picker dialog and features.

I use Apple's Mail program, and it got a big facelift in Tiger. Thankfully, the drawer is gone, replaced by a splitter view a la Outlook and Entourage. Not so nice is the new color scheme for the splitter: light blue background with not-quite-light-blue circles containing white text that tells you how many messages are unread. On my 23" display, I can't read the number of unread messages for each folder - it's just a blue blob to my poor eyes.

There are a few other changes that will take some getting used to. I like to command-click on the title bar of windows in the Finder to move up folders in the hierarchy. More specifically, if I option-command-click to do this, the old window closes and the new window opens, which avoids window clutter. In 10.4, this has become a bit more cumbersome. I must command-click, then press option after the menu appears to achieve the same effect. I can't hold down option while command-clicking like I could in 10.3 and earlier.

The other annoyance is actually a bug left over from 10.3 that has become worse in 10.4. I use a USB switchbox to move between my 2 desktop Macs and my PC. Under 10.3, if I switched to another Mac and attempted to immediately use my keyboard or mouse, odds were great that I'd lose all USB devices and would have to force-restart my Mac. I could work around that for the most part by waiting 5 or so seconds after switching. When I forgot or got impatient, I had a second mouse connected directly that I used to attempt a clean restart.

Now under Tiger, the problem seems much worse. I've lost USB control twice today even after waiting the requisite 5 seconds from before. Worse, the mouse I have directly connected becomes inactive too. I may have to either get a better switchbox or find a better workaround, because I move back and forth between Macs constantly. I'd use a software solution like VNC, but it doesn't work with OpenGL windows, and believe it or not, they play a pretty large part of my day. :-)

Anyway, on the whole I'm very impressed with Tiger. I can't wait to see all the new Dashboard widgets and Spotlight plugins that other people develop. I've even had daydreams about writing a MacMAME spotlight plugin!

Distributed compiling in Xcode 1.5

Last year, Apple introduced a feature in Xcode that allowed it to use distributed compiling to spawn many instances of gcc (the compiler used by Xcode) across multiple CPUs and computers on your network. The goal here is to speed up compilation in Xcode and shorten your work cycle.

We do all of our development work on the Mac in CodeWarrior, which is only single-CPU aware and has no distributed option. Last September, I decided to do some benchmarking on a "real world" example, Knights of the Old Republic. Read on to find out how the compile times and performance stack up.

KotOR is a C++ based app, and is based on a cross-platform engine. It uses OpenGL natively on both the PC and the Mac. My rough estimate shows that it contains roughly 500 moderately-sized source files, and it uses precompiled headers in both the CodeWarrior and Xcode builds.

So let's establish the baseline time for CodeWarrior on my test Mac, a 2.5GHz G5 with 1 gig of RAM. I used CodeWarrior 9.2 and Xcode 1.5. This is the total build time in CodeWarrior and Xcode (dual-CPU):

Debug build:

CodeWarrior: 6 min, 30 seconds
gcc: 10 minutes

Release build:

CodeWarrior: 11 min, 35 seconds
gcc: 10 minutes, 10 seconds

Interestingly, gcc's compile time for the debug build (i.e. the optimizer turned off) is almost identical to the when the optimizer is turned to the max. Related to that, the performance in gcc's non-optimized build is much better than CodeWarrior's. For KOTOR at least, this means that a debug build in Xcode isn't worth it vs. the release build.

With that baseline in place, let's get to the meat. I had at my disposal a dual-800 MHz G4 Mac, a 1.25 GHz G4 PowerBook, and a sad little 500 MHz G3 iBook. :) I messed around with hosting the Xcode build on various Macs, as well as removing one CPU on the host to see how that affected performance. I had heard that sometimes its best in a distributed setup not to use both CPUs on the host to keep overhead manageable. Here are the results of all the permutations I tested:

800 MHz G4 x 2 (host), 2.5 GHz G5 x 2 (remote) : 12 minutes, 13 seconds.
800 MHz G4 x 1 (host), 2.5 GHz G4 x 2 (remote) : 12m 13s
2.5 GHz G5 x 2 (host), 800 MHz G4 x 2 (remote) : 8m 25s
2.5 GHz G5 x 1 (host), 800 MHz G4 x 2 (remote) : 10m 20s
2.5 GHz G5 x 2 (host), 800 MHz G4 x 2 (remote),
1.25 GHz G4 (remote) : 7m 33s
2.5 GHz G5 x 2 (host), 800 MHz G4 x 2 (remote),
500 MHz G3 (remote), 1.25 GHz G4 (remote) : 8m 20s

As you can see, I was able to start beating the performance of CodeWarrior when I hosted on the 2.5GHz G5 and added in the 800MHz G4. I trimmed a minute off that by adding in the 1.25GHz PowerBook. When I got greedy and threw the iBook into the mix, I lost any gains garnered by adding the PowerBook.

What's interesting about this is the time for the steps to generate the precompiled headers and do the final link. While running these tests, I noticed that these are significantly longer steps in Xcode than CodeWarrior. These steps are also performed solely on the host CPU, so the speed of the host is critical to the overall performance of the distributed build. Here are the times for those 2 steps combined on the 2 Macs I used as hosts:

2.5GHz host - linker/precompiled step time: 1m 45s
800 MHz G4 host - 3m 20s

If you subtract those steps from the aggregate build times above, you get a better feel for how the distributed compile affects things:

2.5 GHz G5 x 2 : 8m 15s
800 MHz G4 x 2 (host), 2.5 GHz G5 x 2 (remote) : 8m 53s
2.5 GHz G5 x 2 (host), 800 MHz G4 x 2 (remote) : 6m 40s
2.5 GHz G5 x 2 (host), 800 MHz G4 x 2 (remote),
1.25 GHz G4 (remote) : 5m 48s

Bottom-line, Xcode's distributed compiling option can beat CodeWarrior in release builds if you have a decent dual-CPU Mac sitting around to throw at things. Although I didn't do tests with the distributed compiler and the debug builds in Xcode, if the times hold fairly closely to the optimized builds, then you'll have to add more CPUs than I had available to approach CodeWarrior's performance. Most of our development turn-around is with the debug builds, and right now, CodeWarrior retains the edge.

For those of you curious about the actual performance of the game between CodeWarrior and Xcode, it's a virtual dead-heat. In my tests here, there is roughly a 1-2 frame per second advantage for CodeWarrior, which is well within the margin of error.

With gcc 4.0/Xcode 2.0 in Tiger, I hope to do these benchmarks again. I'm not expecting compile times to improve a whole lot, although I do hear that the optimizer in gcc 4.0 is much better now.

April 18, 2005

G5 is Alive!

A while back, I wrote about thermal runaway problems I was having with my then-new 2.5GHz G5. To bring you, the internet, up to speed, I ran a utility that tracked CPU temperature and noted that one of them was getting rather toasty - above 200 degrees F. Once that CPU hit a certain temp (which I can't remember now), the system would force itself to sleep. I was able to work around it by setting my Energy Saver settings for the CPU to "Reduced", which eliminated the problem in the short-term.

The real trick here is that I've come to rely on this Mac to do the bulk of my day-to-day work, since pretty much any game we work on now is a bit too manly for my old 800MHz G4. Several months back, this G5 began exhibiting a new problem - it sometimes wouldn't restart. If I had to install a security update, an OS update or even if the power went off, it was a game of Russian roulette getting the G5 to power back on. Most of the time, I could let it sit for an hour or two and it'd start up cold, so I got to where I'd just avoid cycling the power at any cost. My plan was to take it in for repair when we moved, but because it had been so long since I had to reboot I had forgotten about the issue until after we'd moved and I had to turn it back on (which it did, on the first shot).

Things came to a head 2 weeks ago while I was working on Tiger Woods 2005. I was trying to track down a bug whereby the terrain wasn't rendering on the 8500 card in my G4. I forced the GL profiler in the G5 (which has a Radeon 9600 card) to use the 8500 driver, something I'd done before with mixed success. Unfortunately for me, this caused a kernel panic and I had to reboot. But this time...it was personal!

The G5 would not come back with any amount of coaxing, so I made a very reluctant call to AppleCare to set up an incident. I had a pretty strong feeling that the CPU module was to blame here, since the thermal runaway was the first issue I encountered. However, the AppleCare rep had me go through the usual basic steps first: reset the PRAM ("But this Mac - it doesn't even play the startup chime!"), try to boot into Open FIrmware ("Did I mention no startup chime?"), plug in my original Apple keyboard ("Do you think this will cause it to play the startup chime?"), and unplug my ethernet connection. After humoring the rep, she determined that it was probably a firmware problem with the power manager and determined that it was under warranty and that I should bring it in.

I took it to the local Apple Store and explained the issues. They ordered new parts and 3 days later, I had a working G5 again! Turns out that the inability to start up was a faulty Radeon 9600 card (apparently this is a known issue). It also turns out that thermal runaway was like I suspected - a faulty CPU.

The best news though : this G5 runs far more quietly now than my G4. After really pushing it hard on the highest CPU settings, I can't get the fans to rev up to anywhere near full speed like I could before, and the temperature for both CPUs hovers around 175F at full stress. The difference from before is like night and day, and now I can't wait to retire this G4 and eliminate what is now pretty much the only source of noise in my office.

April 11, 2005

Birthday Bash

This past Friday was my birthday, number 34 in an ongoing series. I'm not the type to make a big deal out of my birthday, and I don't really expect a lot of fanfare. However, I do ask that it not suck completely. ;-)

Case in point: Beth and I went to lunch and then to a local JCPenney Home Store to see what they had. While leaving the parking lot, some jackass t-boned Beth's car while he was backing out of a handicapped space, then proceeded to be a dick about the whole thing: "why didn't you honk first?" (we did - about a second or two beforehand), "why didn't you back up?" (you try stopping and throwing your car into reverse in a split second). Since it was in a parking lot - private property - the police were not involved, which didn't help us. Hopefully we can get this resolved today with his insurance company, because it would otherwise blow to pay a deductible and file a claim through ours.

That kind of set the mood for the rest of the day. When we got home after dinner that evening, we discovered that one of the cats (probably Ian) had peed in the bed. If he didn't sleep at the foot of our bed, I'd consider returning the favor on his birthday.

April 08, 2005

Hee-haw!

People often ask me what games I'd like to see on the Mac. Usually I give some BS answer about another military-themed shooter because lord knows there aren't enough ways for me to practice killing my fellow man in a semi-realistic setting. The current crop simply doesn't slake my seemingly insatiable thirst for death. (Can you imagine what it's like for me to work on Tiger 2K5? I've tried killing the birds with stray golf balls - no dice.)

But that's all in the past. Today I have seen the light. I only wish I could ask Glenda and Ted in person. (Thanks to Bat @ MacAddict for enlightenment.)

April 05, 2005

The Home Front

We closed on our house back on March 10th, and moved in on March 26th. That gave us 2 weekends (and a few long nights) to get some stuff done before moving. Here's a brief list of what we did, mainly so I can reference it in the future when I forget.

First, with the help of Maureen, we de-popcorned the ceilings in the guest room, my office, Beth's office and the master bedroom. This was a very messy job, and we had a casualty during the process - the "good" water sprayer broke halfway through. However, we were helped considerably by gravity and latex paint. The old ceilings had been painted over with a thick latex paint, and for the most part everything fell down in big sheets once it was sufficiently saturated.

Once each ceiling was stripped, we then went and smeared on joint compound, giving it a sort of faux-finish look. I dunno if the style has a particular name, but it looks kind of like the venetian plaster style. Additionally, in every room but the master bedroom, we applied the same effect to the walls. The joint compound we used for the texturing took roughly 1-2 days to dry, so it really affected the timing of our schedule for these rooms. The girls did a lot of this, and they started to get a little stir crazy. Maureen even gave names to blobs of joint compound that landed on her shirt. OK, so we had a few more casualties when she washed her shirt and said goodbye to the blobs. Circle of life, man, circle of life.

Anyway, retexturing the walls was more a necessity than for aesthetics, as most of the walls were really beat up. In my office, for example, the door had been kicked in, the frame broken and the wall behind the door punctured by the prior doorknob. They had replaced the door, but apparently during its absence, they must've tacked up a sheet and used it, as there were eighty bajillion tack holes above and around the door frame. Resurfacing the wall made that all go away.

Once the walls and ceilings were retextured, we repainted them. We managed to get two coats in Beth's office, but ran out of time to apply a second coat to the walls of my office. We also still need to finish the trim details in both my and Beth's office.

We had my dad help out for a little bit and managed to remove the old door frame and install a new one for my office. This wasn't nearly as hard as I thought it was going to be. However, I still need to add a few finishing nails, caulk the seams and repaint the frame and door (they are primered, but not painted).

During the last week before moving, we had most of the dirty work done, so it was time to hire professionals. We had a plumber come by and install a water pressure regulator. Our pressure was 110 psi and apparently it shouldn't be above 80. Since this house had a slab leak beforehand, we figured we'd rather not press our luck. We also had him fix one of the handles in the master bathroom vanity (it was completely non-functional). Interestingly, when I called to book the plumber, they wouldn't quote a price over the phone, only when the plumber arrived. Thus, I was a bit surprised to discover that just installing the pressure regulator cost $450. Oy.

After that, the Merry Maids stopped by to give the house a good cleaning. The existing cabinets were pretty nasty, and the bathrooms were in dire need. Plus, we managed to get the tile and carpets crapped up with dust and plaster bits from our wall work. After them, we had carpet cleaners pay us a visit. They did a remarkable job considering the state of the carpet They also offered to clean the saltillo tile scattered throughout, but at a quoted price of $900, we passed. ;-)

Orthogonal to this, we had a landscape guy come by, install sprinklers for the front and back, plant 3 new trees and remove a sandbox on the side of the house that was roughly a foot above the grade of the foundation. We also had an AC guy come by to ostensibly repair the evap, but he basically told us that both the evap and AC units were in scary shape, and the evap was going to be prohibitively expensive to repair. His advice was to run the AC until it breaks, then replace the whole thing with a more efficient unit.

In between all this, there were a few minor handyman tasks that I took care of. First, I had to cut the cabinet above the fridge so ours would fit. In the process, I nearly set the kitchen on fire. I had a Black and Decker mini reciprocating saw which I was using. Turns out that the blade gets pretty hot, and if you keep it in one spot for too long, things start to cook. :-) In my defense, I think it's kind of hard to tell the difference between smoke and sawdust when you're plowing through wood in a cramped space.

I also tried my hand at fixing some cabinet doors that wouldn't close. By using a hammer and hitting the hinges caveman-style, I was able to fix them. I also replaced (or in the case of my office, added) doorknobs and locks for most of the rooms. There are still a few remaining, but the bulk of that is behind me now. We've also replaced the showerhead in the master bathroom, re-orange-peeled a few wall patches, replaced/rehung two shower curtains, and added a window overlay (cut into 18 separate squares) on our front doors.

April 01, 2005

Fooled to tears

Peter has it right about April Fool's day. It'd be one thing if most of the April Fools jokes were understated and/or funny but by and large they're not. Today has seen a massive deluge of some of the worst jokes I've seen in a long time - subtlety is all but lost.

For a textbook example of what not to do, you need only visit slashdot.org today. 56 or so news entries so far today, and the most recent ones are coming in every few minutes so clearly they're favoring quantity over quality. What's most annoying about them in particular is that, because I read them in an RSS aggregator (PulpFiction), it essentially acts like spam does for e-mail.

I'm protesting and calling this April Douchebag's Day. Who's with me? ;-)