My impressions of my Mac

February 5, 2010.
Infidelity
February 1, 2010.
An ex-Apple user
August 21, 2009.
Resignation
June 3, 2009.
Staying power II
April 23, 2007.
Staying power
May 12, 2006
Girl features
February 15, 2006.
configd, Kicker.bundle, and me
February 10, 2006.
Reflections of an ex-Linux user.
September 20, 2005.
Crash be gone!
June 4, 2005.
Malware?!
May 15, 2005.
BSOD
April 29, 2005.
Not a serious Unix
March 15, 2005.
Rot in hell, Microsoft
March 8, 2005.
I am a real Linux user
March 4, 2005.
After a trip
Februay 19, 2005.
First impressions
February 19, 2005
First impressions

I finally bought an iBook 12 after threatening to for years. I was experiencing growing frustration with the extremely unfortunate hardware design of my x86 laptop (which is hot, loud, shitty battery life, etc). I learned that the modern incarnation of the G4 iBook 12" has AirPort and a combo drive built in, which makes it exactly the same as my old laptop, and for about the same price. One of those weird horizontal upgrade situations.

When I was lusting after them I was resolved on installing Linux, so I would have my comfortable weird FVWM configuration and all the Debian utilities I so love. I found out a few weeks ago that the AirPort Extreme in these things is a totally proprietary piece of hardware that is almost impossible to write open source drivers for. I decided I could always use some crappy USB 802.11 in Linux until I decide to swap for a pre-Extreme card. Well, I haven't even installed Linux yet, and I've had it for almost a week.

So when I got the thing, the first thing I did was reinstall OS X into a 11GB partition so I'd have lots of space for Linux. It informed me that it would take 8GB. I was incredulous. I told a Mac fiend and he told me I was full of it. Turns out he exists in the lovely pre-iLife world. I think Garage Band is pretty cool (though I probably won't use it much), and I could imagine someday needing to use something like iMovie. But I discovered right off some huge wastage.

For example, iDVD is this program that opens a window that says "you do not have a super drive." A very useful utility, I'm sure, if you like having those sorts of windows floating around. I showed that window to a friend and he immediately wanted me to click that checkbox that says "do not show this warning again", but then...then what would iDVD do? I figured it was harmless until I discovered it eats about 1GB of space! I think it's effectively clip art for the DVD navigation screens you can build. Another 1GB in a really shitty world book encyclopedia (I clicked through to the highlit entries, it had a one-picture and 200-words-of-text entry for the entire 13th century, and all they talked about was arches). Monolingual conveniently eliminated about 500MB in foreign languages.

This deletion festival was frustrating because there is no package management. I was rm -rfing .app files and hoping that's the approved deletion technique. Monolingual is a huge hack that is essentially ``rm `find / -name Spanish.lproj`'' or whatever. There was no way for me to present a screen listing the installed packages, their sizes, and a delete button. I couldn't find a single indication of the existence of the encyclopedia except its icon. A totally unadvertised valueless 1GB add-on with no obvious deletion instructions. Smart, real smart. Did they notice? I have a 30GB hard drive. I thought Mac users GENERATED media, and so, they'll need all the space free that they can get, why include so much useless garbage?

On the other hand, most applications really do exist as just a single huge .app folder. That's pretty cool. Kind of obviates the need for package management.

MacOS X is an interesting experience, to say the least. Most things "just work." The things that don't, it's usually because Apple decided explicitly to make it not work. It's an interesting contrast. Very frustrating when you discover that the reason iChat AV doesn't work with USB webcams is that there is sufficient competition in the USB webcam market that Apple decided to make their exit (i.e., politics, not technical reason...Apple itself has sold a large number of USB webcams so it's certainly not a shortage of expertise). There's a third party work around, but it's shareware and (for me) it doesn't work.

Most things in MacOS X seem to work like that. Apple has made mostly poor choices, but built a powerful framework for third parties to distribute shareware apps to fix. The hacks are sometimes very good but are mostly a big clusterfuck of "I work with Jaguar but not Panther." Apple seems to have a well-entrenched philosophy of toggling which options you are presented with in every release, even while the core software remains the same. Apple is a very bad company in this respect.

But they also have a philosophy of working. My Mac hasn't crashed once (though once I managed to run a third-party app that took the keyboard over, and I was too lazy to ssh in from somewhere else and kill it). It hasn't filled me with an insane rage like Windows does when it presents an imperceptible screen flicker as a way of saying "incorrect password." The Unix prompt becomes ever more powerful as I learn how it is integrated into the Aqua way of doing things. For example, even though Mozilla.app doesn't appear to let you do an equivalent of ``mozilla -remote "openurl(blah)"'', I can do the same thing in AppleScript, something like ``tell application "Mozilla" to OpenUrl "blah"''.

Right now the list of things I need to do to MacOS X to make it comfortable for me has about a dozen items on it. Things like making keyboard shortcuts work like my old FVWM config, fixing a bug in the cctools linker (!!!), and porting over my home grown audio software. The perception at this point is that if I were to install Linux, I would encounter a similar todo list that would probably be a lot easier to deal with, but no more short, and perhaps more boring because I've done it before. Besides, at the moment I'm liking the Apple+Greg combo network configurator I've got on the Mac a little more than my old just-Greg network configurator on my PC laptop.

There's some paradigm shift here that captivates me that I feel I must grok before I can move on from OS X. In the Unix world if I were to build their configurator, it would be a combination of about 4 unix tools: kismet in daemon mode, iwconfig, my VPN/NFS/etc shell script, and maybe a GUI front end. In Apple world, it's only two parts: MacOS, and my VPN/NFS/etc shell script. The existing configurator I'm certain is built up of many parts expertly layered, probably mostly inside of this 'configd' program. But to me, I have been able to think of it as a large chunk that 'just works.' How eerie.

I am also beginning to understand how I have heard people describe Macs as "having a soul." I spent a morning working on my old PC laptop (because I don't get anything done on the Mac, too busy trying to hack it) and it felt -- I can't describe it -- thin, shallow, hollow, empty. At first I thought it was just some basic animal response to visually bright colors and backgrounds, but WinXP has that and I find it terrifying. Now I think it is a combination between the layered approach that Apple takes and my total unfamiliarity with it.

In the PC world, the computers feel shallow because I understand a little bit of almost every layer. I am familiar with the hardware from a user perspective and also (somewhat) an electronic perspective. I know for the most part exactly which buses are present in my system and what physical chips they connect to. I've read data sheets for a lot of these chips. I know how ACPI works and in concept the BIOS. I've hacked on bootloaders and kernels and system libraries and system utilities and user applications. I've written device drivers. I know exactly what all the layers are and I have a very FORTH-fiend-like response of wanting to therefore rip through all of them and get at the core hardware I know is there. It is reflected in my x86 laptop, which runs a custom /etc/rc script so I know and want every process that is running on it. It runs X in the absolute simplest way, just executes my .xinitrc to load settings and start one of the simplest full-featured window managers, whose features I mostly don't use.

Compare that to the Windows world, where I've known it historically for a long time and even though I do not know their software layers, I have an excellent intuitive grasp of what they must look like because ultimately Windows is still shaped by its compatibility path back to MS-DOS 1.0. It is a pervasive mentality that affects everything about the system.

So when something doesn't work in Windows, it is frustrating because I don't know the layers well enough to work around it. When something doesn't work in Linux, it is time consuming because I know exactly the layers to work around it best (fitting with my aesthetic) and I will not tolerate a clunky work around. But it results in a computer that feels thin, you are exposed to everything, constantly reminded of the existence of each individual layer -- in Linux because I manipulate it directly and in Windows because I'd rather manipulate it directly because their bullshit doesn't work.

But on the Mac I have the barest feel for the layers. The layers are usually better documented, but they're less visible. Compare OpenFirmware to AMIBIOS. A philistine could tell me that OpenFirmware is less visible because it has a graphic boot screen instead of a text diagnostic (to be honest, I don't even know which screens are generated by the BIOS and which by Darwin loaders, which is pretty slick). But it's also less visible because I haven't had to poke my nose in there once. I haven't even run into operating system quirks that are a result of BIOS quirks.

But the Mac is still usable without understanding these layers. To me, even! I guess this is what happens when you have tight integration at every single level.

I am experiencing some difficulty when I am digging into the layers now though. I want to have FVWM's key-remapping power and do some other hacks to make the keyboard less offensive, and I am finding myself eying every layer of keyboard management from ADB to Cocoa trying to decide where this best fits in. How long I put up with OS X probably will mostly be determined by how often I have to dig in like this.

About the hardware quality, I'm finding it to surpass my wildest expectations. I was expecting it to be exactly like my old laptop, but without the crapulence. For the most part, that is exactly what it is. For example, consider cooling. My old laptop has a hot passively-cooled power supply in one corner, and a hot actively-cooled CPU in another. The iBook appears to be completely passively cooled and even if I use it all day it does not get painfully hot. The display is, I think, somewhat better than my old laptop's, but only due to the extreme crapulence of my old laptop. I guess the better screens are reserved for PowerBooks.

The real shock came when I installed Quake on it. I'd always heard how bad Macs were at gaming, but I was much impressed. Quake is not the newest game, but I am not the newest gamer, so I still consider it a reasonable test. Quake was, of course, unfathomably easy to install. There was no mucking around with drivers, settings, whatever. Just click on the little "GLQuake" icon, and then play. And it was fast! Not mindblowingly fast, but a totally playable 100fps at 1024x768@16bpp. It was obvious in hindsight. The Radeon 9200 is no record-setter today, but it is no slouch. Why build in a high-quality gaming video chipset into a passively-cooled laptop? Well it's obvious, go into system prefs -> dock and turn on magnify. Now play with your dock and imagine how intolerable that would be if you had a crappy "AGP shared memory aperture" framebuffer. This overabundance of stupid obnoxious GUI features hasn't made my computer slow, instead it has actually made my computer faster by requiring the manufacturer to be less chintzy. Sweet!

Oh and the wireless is great too. It's a smidge faster than my PC wireless card (beats me), but most importantly it has great range. A good 20 feet further into my backyard than I could go with my shitty Netgear PCMCIA card (the cost of an antenna crammed into PCMCIA, I suppose).

March 4, 2005
After a trip

Well the iBook survived its first business trip. I have to say, its impressive battery life is so phenomenally useful. I pretty much just carried the thing around whenever I wasn't in the hotel room, and never really worried about running out of battery. The great wireless range was constantly being put to use. The wireless configuration in the diverse environments was substantially more convenient than I've seen anywhere else, but my 'clever' Unix-way-of-thinking VPN script was a constant source of mild frustration. But I think that may actually be because I am used to the way Linux does routing tables, not the (inferior) BSD fashion. A little tweaking and I'm sure that'll clean right up.

A particularly pleasant experience was when I hopped on a plane with 95% battery with the backlight on low, "5:40 remaining", watched the end of an episode of TV, saw that it was down to about 4 hours remaining (due to increased battery usage), then watched two more episodes and it still had more than 2 hours remaining. Mind-boggling. If you haven't actually used a PC laptop, you have no idea how remarkable this is.

Overall, using the Mac is just like using a FreeBSD box, except when I am starting up or switching apps. Luckily I pretty much live inside of the 'screen' program, which is the same across all of the platforms I use (at least, the features I use). So I pretty much only notice that sometimes I have to do some bullshit to deal with VPN configuration, bullshit to deal with OS X overriding my defaults or only being able to reasonably auto-launch the Macified version of my apps, etc. It adds a little overhead when I first login, but since I never turn off the computer, it is not really an issue.

I guess overall, I live inside of my applications, and the operating system, even the obnoxious in your face gui elements (the menu bar, dock, and finder) are mostly unused, except to deal with 'system' problems, like network configuration, etc. That's a relatively harmless role for a GUI to play, I suppose. It's not like I spend my day using their GUI.

I had my first experience porting some heavily Linux-dependent code, too. I ran into three major problem spots. CoreAudio, ld/binutils/ld.so, and performance.

CoreAudio is -- while revolutionary and I think ultimately a Good Thing (at least, if anyone else ever picks it up) -- a real un-Unixy solution. It has some sort of event system, functionally similar to signals, but with no obvious Unix way of working. My guess is that it's implemented through some invisible Mach threads. The problem is that if your CoreAudio event handlers hang, it takes out the OS. Easy to solve (just fix the inf. loop in your audio render callback), but an indication of piss-poor design. It never hung completely (but it did stop answering mouse stimulus for ten-plus seconds at a time). After several days of mucking around in audio, suddenly it refused to generate any noise at all (not even the system 'splats' it makes when you change volume). I had to reboot to get it to resume normal functioning. I am sure that my poor API adherence is causing a memory leak somewhere, but, again, that's piss-poor. Maybe once I understand how to interface with their magic hidden event system I'll have a better understanding of how to correct these problems without a restart.

The dynamic linker on OS X is moronic. See, basically, there's this GNU binutils that provides a very powerful, very easy to use, very extensible, and very standard set of tools for linking and loading. FreeBSD seems to use the GNU binutils without reserve. They work 'like magic' with gcc, but they're actually pretty usable on their own too. But no, they had to use some obscure Mach format, and they were too stupid to use the GNU libbfd to integrate it into binutils. So instead they distribute subpar versions of the entire linking world. I've already found bugs in Mac ld (yes, BUGS!), been thwarted by consistently useless renamings of every major linking-related tool or option, and had to work around obvious shortcomings (such as the inability to generate a .so with completely undefined symbols for total runtime resolution ... maybe I just don't 'get' something).

Performance is a very difficult problem for me to quantify now. What I wrote is a real-time software synthesizer which, on my PC, can pretty much keep up with any amount of input I throw at it from a live keyboard without any skipping, and about 3-5% CPU usage per active note. On the Mac, any active notes tend to use about 80% CPU. There is much bizarreness in how this represents in actual usage, but suffice it to say, there is something fishy going on here, and I think I am inclined to either blame G4 optimization/implemention of 64-bit integers or CoreAudio. The complete bizarreness of the symptoms leads me to suspect CoreAudio.

Another weird thing I've noticed is a lot of things have about a .5-2 second response time that comes out of nowhere. Stupid things like the volume app, or when you change a setting through one interface and another interface is displaying it at the same time. Or how osascript takes a second just to load itself, even though you're only going to use it to run a one line applescript. From tracing osascript, I'm inclined to believe that every single app on the system has to load the majority of /Library/Frameworks before it will run. But some of the unresponsiveness may be from polling delays, or even on purpose. It doesn't feel like the 'churning' kind of unresponsiveness that Windows gives you, but that perception may be influenced by this laptop's lack of an HDD light. Reallly, removing the HDD light is one of the less-noticed but most mentally influencing Apple-only innovations.

Some other Apple difficulties involve ethernet networking. I'm not sure what causes it, maybe this is some interaction with my VPN. But every time I mess around with hard-wired ethernet, plugging/unplugging it, messing with network settings, etc., eventually my Mac suddenly becomes slow, basically like someone set off a fork bomb. In fact, exactly like a fork bomb. So probably that's what happens, some automatic network configurator eats itself. But it eats itself so aggressively that I had to reboot, with all 3 fingers. So I've hard-crashed my Mac, twice. Hmm. It still crashes a lot less than my PC Linux laptop, which had seriously flakey hardware.

Another weird behaviour is with my VPN. If I run it over a low-bandwidth (i.e., 802.11B) link, it works great. But at a high bandwidth (802.11G, ethernet), it starts dropping packets quite aggressively. I don't know if this is some sort of timing fluke or if it is a fundamental limit. But my Linux boxes don't have this problem, so I blame some innate shittiness in the BSD networking stack. Certainly a resolvable problem, but a pain in the ass I shouldn't have to deal with.

And the last freaky new Mac aspect I've encountered is the social aspect. Everywhere I go, people just walk up to me and talk about my Mac. Everyone knows this is an iBook G4 and wants to know if it's the new (>1GHz, combo drive, wireless) one or the old (<1GHz, pay for extras) one. My old laptop, people would say "that looks fancy," but with the Apple, everywhere I go -- on my porch, to IBM mainframe tradeshows, whatever -- I've constantly got people commenting on my laptop. It is eerie, and it meaningfully increases the odds that this thing will get stolen. I prefer my bikes to have visible rust, and I prefer my laptops to look like shitty Chinese ripoffs of Japanese designs. *sigh*

March 8, 2005
I am a real Linux user

So I was searching for something unrelated and stumbled onto one of those "I'm a Linux user turned Mac addict" stories from a hardware reviewer. I clicked on it out of curiosity, to see if perhaps my story is quite common. And let me tell you, I am again overwhelmed by the Apple mystique. This was no Linux user, this was simply a Windows user who had managed to treat a Linux machine like a Windows machine once or twice and therefore felt obligated to put the word 'linux' in his AIM name. I fear this is who you now think I am.

Let me be clear on this. I am a top-rate Linux expert. I once tracked down a typo in a bootptab file by modifying the kernel to give better error messages. Before I installed Linux for the very first time, I had to recompile my kernel to work around a BIOS bug. I've helped maintain 3c507 (ethernet), MAD16 (sound card), and BTTV (TV tuner) drivers, with patches that have been accepted into the current mainstream kernel. I've been running Debian since 0.93rc6 -- before apt-get. After years of experimentation my fvwm config is essentially 20 keybindings and no decorations or menus. I charge $150/hour for Linux system administration. I got in a flame war with some glibc2 morons on LKML in 1997 about /dev/pts and, when UNIX98 was later adopted, won. My prime joy in life is writing compilers. I've written several assemblers from scratch. I read microcontroller data sheets for fun. I've soldered on motherboards and ISA cards and they still work. I built a flash programmer to save my previous laptop. I'm "the register allocator guy" at work.

So now that you can all smell my balls, I just want to make sure you understand that I am not going to be going on and on about how cool the genie effect is and how great it would be if Linux would implement all of the GUI features that Enlightenment first did 5 years ago. Capice?

On another note, I had to reboot my apple today to make networking work. I had a very satisfying experience of walking to a cafe, ordering food, sitting down, opening my iBook, and finding my ssh sessions working exactly where I left them. Then I came home and everything was just as satisfying, then ten minutes later the network stopped going at all, for no obvious reason. It seems like DHCP broke, but maybe the hardware interface layer broke. Maybe it's my fault for doing the automatic Airport update earlier today and not rebooting like it told me to. Whatever it was, everything I knew to try didn't work, but rebooting did. *sigh*

March 15, 2005
Rot in hell, Microsoft

Not that I need an excuse to rant about Windows, but... My Windows PC, much like my Mac, does some obnoxious stuff out of the box. Like pop up Windows begging you to upgrade (or, in this case, tell it to check for upgrades) to core OS components. My Windows PC, much like my Mac, doesn't necessarily provide any good way to get rid of these sorts of things, you know, no checkboxes saying "don't remind me again." Unlike my Mac, I can't revert to the old standby "if there's no obvious way to accomplish this functionality, it means the solution involves drag and drop" -- I tried it, it doesn't work, it won't let you drag stuff out of systray. I also can't revert to the Windows standby of left-clicking -- I tried it, it just gives me a shortcut to the same obnoxious reminders. I found this infuriating on the Mac because using "drag and drop" for basic functionality is basically offensive. On the Windows PC I found this absolutely head-blowingly call-Bill's-kids-on-the-phone-and-make-sure-they-know-how-the-world-feels-about-their-father infuriating. Because that means there's simply no obvious way to accomplish this task.

April 29, 2005
Not a serious Unix

I keep on running into occasional issues that remind me I'm not using a serious machine, and they are all transparency issues. This is cause for concern about the future of OS X because I would say transparency is its biggest fundamental advantage over Microsoft. Since I am not fuming mad, I have the option of doing the polite thing and beginning with the good aspects of OS X transparency.

So far as I can tell, Apple has done a tremendous job on basic API transparency. There are some things that I would describe as "sketchy" in how implicit Mach threads come and go without any clear description, but I know that Mach is a fairly well-understood platform (to people who aren't me) and if I really wanted to, I could take it apart too. Their many layers from Quartz to device drivers are all open with lots of released source code and documentation. The kernel source is out there for your perusal. There are lots of closed device drivers because of licensing BS and the like, but this is increasingly true of Linux and mostly doesn't matter in the long run so long as the support remains good.

The bad side, as near as I can tell, occurs almost entirely "in userland." The traditional role of a company bundling Unix for the point-and-click crowd is to build up a series of graphical interfaces to control and configure a series of scripts that then interface with your underlying system services (daemons and the kernel). For example, many Linux vendors use tools like GNOME and Linuxconf to accomplish these tasks. A notable Linux failure in this department is Cobalt -- they made a machine that was totally administered through a tremendous byzantine mess of perl scripts interfaced through a web server. So far as I can tell, in terms of overall user experience, Apple has far and away exceeded all Linux attempts at this, but it comes at a price.

For example, to deal with networking configuration, Apple has made a special daemon called configd. There is a commandline tool that allows a limited interface with it, which is used by a bunch of obscure shell scripts stashed mostly in the /System/Library/ tree. It has some sort of event heirarchy which is used to feed whatever programs draw the menu bar along the top of the screen -- i.e., updating the signal strength display, etc. It mostly works, and I've not had to spend too much time working on it to get it to do what I want (namely, almost transparently reconfigure itself and run VPN for whatever wireless environment it happens to encounter). But I still don't totally understand it, and it is definitely a little quirky. Sometimes my laptop stops accepting DHCP responses -- recourse is reboot. Sometimes my laptop appears to suffer a DoS when I plug/unplug an ethernet cable two or three times -- recourse is reboot. Also, I haven't figured out exactly which scripts get executed when a network comes up, resulting in my VPN coming up appropriately only part of the time. I'm certain there is a good solution for all of these problems, but in my brief search I have not found any thorough documentation about how this whole userland networking conflagration is supposed to function.

Or the recent example that fouled me up. I had a DVD in my drive that I was copying files off of with cp. When I was done copying files, the software eject key wasn't working for some reason (it was being passed to my application as if I were just pressing F12), but I had a Unix prompt open so I just "umount /Volumes/NEW", hoping that something would automatically eject at this point. No such luck. So I went into the GUI to eject it. It turns out Finder still thought it was mounted, and ejecting resulted in a "file system in use" sort of error. Re-mounting at the commandline didn't work ("mount /dev/disk1 /mnt" as root generated an unfathomable "permission denied" -- in hindsight it probably just didn't automatically fall back to a read-only mount). Sleep/unsleeping the laptop caused the drive to spin up, but it didn't retrigger the automount sequence. I found the commandline utility (drutil) that is equivalent to the Finder eject button, but it gave the same errors. killall -HUP automount had no obvious effect and killall -9 automount, while satisfying, was totally useless. Restarting automount locked my machine. Clearly, there is another conflagration of custom daemons, scripts, and GUI elements here that I will never understand and which made me reboot.

It really makes me feel like this machine was built by several distinct groups, some of whom are not "cool enough" to develop a really cool system. There is some sort of kernel/OS development group that includes a bunch of programmers with a clear idea of how things ought to work and a very rigorous approach to documentation and sharing. These people have done some odd things, but they have done so transparently and so I can dig it. Then there is another group that does most of the stuff the customers notice when everything is working -- the sort of people who wrote configd and adapted automount, threw a billion shell scripts together for startup and maintenance, built up the UI elements such as the menu bar and system preferences, and then hacked a billion links between these in response to tester comments and feature requirements. This group is most responsible for making this a "Mac OS" instead of yet another niche workstation Unix with a funny windowing library, and they have done their job excellently. But somehow it never occurred to them that they should be subject to the same transparency requirements as the other teams. Oops!

May 15, 2005
BSOD

My Apple just had its first blue screen of death today. I'm irritated that it just arbitrarily killed all my processes and declared the whole system unusable from a simple kernel panic. I'm also irritated that it crashed for no good reason. And I'm a little bit pleased that there is a slightly useful-looking dump saved to disk already that I could, in theory, use to try to find the problem. But mostly I'm just amused that I've owned the computer for 3 months and it wasn't until today that I even knew that the Mac BSOD is gray and antialiased and translucent.

June 4, 2005
Malware?!

A couple days ago I was working on my iBook and this popup appeared asking me if I wanted to update some applications. I keep the update feature enabled (checks once a week) because I want security updates and don't mind QuickTime codec updates. But for the last few weeks it's been nagging me about iTunes and iPod updates, and there haven't been security updates. I figured if I just finally let it install the iTunes/iPod updates, it wouldn't nag me next week unless there's a security update, right?

So I agreed to install updates for iPod, iTunes, and QuickTime. They completed and it asked me to reboot. I consider this bogus (it's not like it updated kernel drivers or anything), so I found the associated Unix process ("Updater.app" or something) and kill -9ed it. The window went away and I considered the process done. Well, about two hours later, my iBook locked up, and appeared to do so the same way that it did last time I killed the update app's reboot screen. Coincidence? Maybe.

But when it rebooted the real surprises began. First a QuickTime window popped up imploring me to watch trailers of popular movies. The latest malware from Hollywood? I quickly closed the window. Then an iTunes window popped up imploring me to buy music from Apple. Wow, RIAA malware? What have I been doing to this computer?

See, I have this philosophy that there are two types of operating systems -- those you run behind a very restrictive firewall because you are scared the computer will invent reasons to display advertisements if you let it out (Windows), and those you use freely as wonderful internet terminals (everything else). Through this philosophy I have never had an unsolicited popup outside of the web browser application. Until now. Thanks Apple, you broke my malware cherry!

September 20, 2005
Crash be gone!

As I've mentioned, my iBook crashes about once a month. It's a bad thing. Also, the VPN software I use (openvpn) drops packets in a weird sort of way -- as if it's overrunning some sort of queue. I tracked it down and determined three places the overrun queue could be (all on the Mac side of things, I successfully ruled out my server), but never isolated it all the way. Mostly because it was extremely timing-dependent -- i.e., running tcpdump or ktrace would foul up the timing to the point where droppage behaviour would change dramatically. The NFS was usable for MP3s, but the dropped packets occasionally caused skippage. Also, video files were totally unsuitable over this crappy link. I decided it was a Problem Worthy of Investigation, then ignored it.

No more! The wonderful author of the tun/tap driver I use, Mattias Nissler tracked it down for me, and fixed it, and now it works! Hip hip hooray!

Lesson: even extraordinarily lazy programmers such as myself benefit from open source.

Things to watch for: does my laptop still crash?

February 10, 2006
Reflections of an ex-Linux user.

I was sitting around and decided I needed my Kitty Cat Dance fix. I happened to be closer to my x86 Linux box than my iBook so I used it. Thankfully this thing still has a Flash player. But that's about all it has. I noticed the mouse has been sitting in the basement for more than a month (even though the computer down there hasn't had a power supply for some weeks). I also noticed it still uses some ancient version of Mozilla with tabbing configured in a pretty unacceptable fashion. Then it dawned on me.

I'm an ex-Linux user.

It's not that I am terribly fond of Mac OS X (hell the only 'Aqua' programs I run are Preview and Firefox), it's just that the iBook is such a compelling workstation that I never actually sit down in front of my stationary computer except to watch video. Linux still handles file storage, firewall/routing, shell server, and so on, but it's just very rarely the machine I am sitting at for many hours at a time.

Or maybe it's just that my eyeglasses prescription is finally aging out and the closest chair to my Linux box is 8 feet away.

But still, it's fairly remarkable that Mac OS X is flexible and stable enough to not frustrate me enough to get me to install Linux on it. It's kind of like the perfect portable information appliance.

The sad part of the story is that my iBook power connector is showing the first signs of a presumably fatal deterioration.

February 15, 2006
configd, Kicker.bundle, and me

As my Apple's 1st anniversary passed, I was reminded of the three things that still piss me off:

The bug in uControl is pretty much just a matter of sitting down and tracing it through. uControl is simply too hacked-on to expect it to work without bugs. Pure laziness on my part.

The power connector is just stupid. Some laptops have power connectors that last 9-18 months, others have power connectors that last for the lifetime of the laptop. It's pretty much a question of lever arms. For some reason, Apple decided to be worst-in-class (i.e., the longest lever arm I've ever seen on a laptop) until the Intel PowerMac came out. It is by far the most visible engineering error on my Apple and I'd like to see some Cupertino beard-stroker homeless over this oversight. But it still works (for the moment), and taking apart my iBook to install a better connector is a lot of work and risk. So until it dies, here I am.

Which brings me to configd. Sometimes when my iBook wakes up from sleep and rediscovers my wireless network, it resets the routing tables. My VPN is still running (so my NFS works and so on), but it is no longer the default route. The effects are that anyone watching the airwaves can watch my web surfing habits and my router inappropriately classifies me as "guest" meaning I get severely-throttled bandwidth.

Apple has this concept called (I believe) Core Foundation System Config. The idea is that dynamic system state is tracked in a daemon called configd. Think of it like a super-duper /var/run. To facilitate its role as state broker, configd loads a bunch of plugins from /System/Library/SystemConfiguration. One of these plugins is called Kicker and is basically a simple hack to execute an arbitrary shell command when various state changes. It reads /System/Library/SystemConfiguration/Kicker.bundle/Contents/Resources/Kicker.xml to determine which programs are run for which events. This Kicker.xml is more or less self-explanatory, and there are lots of web references to how to get it to do exactly what I want (run my VPN-configuring shell script every time the network state changes).

So I followed their instructions and the result was that my script would run when configd starts, but not at any time afterwards. There is a handy shell util scutil which connects to configd and you can just run:

$ scutil
> open
> notify State:/Network/Global/IPv4
and it should wake up Kicker, which will (should) kick my script. It just wasn't going.

So I downloaded Kicker source to make sure that it does what I think it does. Much to my pleasure, it's pretty readable code and I was able to determine exactly how it operates, which still gave no clue as to why it wasn't operating. But it had the email address of Allan Nathanson in comments at the top, so I figured it would be easier to query him than to build a new Kicker binary and use some variant of "printf debugging" to get to the heart of the matter.

His response is so useful I will include it here:

First off, the Kicker bundle is not documented because we don't
consider it to be available for non-Apple usage.   In fact, I've been
working on eliminating the need for the bundle for the past few
releases (and I'm hoping that it will be removed in Leopard).

The xml you included (below) looks fine but here's a few things to
know.

1. The Kicker bundle only reads the Kicker.xml file when it's first
loaded (i.e. only when configd is first launched).

2. Only one instance of a "kickee" can be running at any given time.
In other words, we'll wait for your /var/root/update-network command/
script to exit before processing another notification.

3. The exit status of the "kickee" script/executable determines
whether it gets exec'd again.  Any non-zero exit status will result in
the "kickee" being disabled.

His point 3 was pretty much my problem in a nutshell. The Apple-supplied enable-network Kicker script has an "exit 1" at the end of it because it is only meant to be executed once. At some point in my earlier experimentations with this situation, I must have copied this "exit 1" to the end of my update-network script, because there it was, and that was the problem. Changing it to an "exit 0" made everything work smooth as peaches.

So the answer to my previous musings about whether or not the people who threw together these userspace daemons were cool enough is pretty much answered. Allan Nathanson rules -- his code is simple, the feature that hung me up is the sort of functionality you expect from a Unix-mindset program, and to top it off he answers his email. If there were a Kicker(8) manpage, I'm sure I could have done this whole project in less than an hour and had success on the first try, instead of leaving this as a lingering problem to solve a year later. Sure, they gave me source, but reading "The return code determines whether or not Kicker will ever execute this command again" in a man page is a lot easier than hunting for the "if (!ok) { cleanupKicker(target); }" at the end of booterExit() in kicker.c.

So, Apple, why don't you document these things? You document everything else -- the API that Kicker uses to talk to configd, for example, is totally documented. Why not any of the utilities and plugins?

May 12, 2006
Girl features

When I first got my iBook I hated the trackpad. Really, I still do, but that's just because I hate trackpads. The iBook trackpad was the worst, it was almost sticky somehow. You couldn't make a fine movement because your skin would stick to the trackpad. Some weeks later I happened to get a chance to use my mom's previous-generation iBook, and I noticed that her trackpad was silky-smooth, like the keys on a well-loved keyboard. I theorized that since my mom is female and females are nothing if not covered in disgusting skin products, I could recreate the sensation of a broken-in trackpad using some of those bottles on my girlfriend's (also female) shelves in the bathroom.

That was a year ago. I haven't thought about it since, because it just worked, since then the iBook trackpad is no worse than any other awful laptop pointing device.

In other news, I just looked at what I wrote in February. Now it's obvious who should write the Kicker(8) manpage. I should. I think that Apple's open source developer relationship has succumbed to reality in some manner. When you see a project like Debian and you find a bug or infelicity, you see the path from community to project archive is well-traveled. It's sometimes a little frustrating, but the open source pedigree shines out like a beacon, begging for attention and care from the community. It's so much harder to operate with a company, and I think it's mostly because the open source community takes a while to make itself at home in any project. The result is that Apple hasn't gotten hardly any useful work out of people outside of the company and has pretty much forgotten about us.

On the other hand, it'd be tremendously frustrating to generate documentation for an OS that changes so dramatically and uselessly from one release to the next without even being able to get a copy of the next version without paying some ridiculous upgrade fee.

April 23, 2007
Staying power

I've had my Mac for more than two years now. On an average business day, I use it for about 6 hours. I pick it up and set it down often. I wake/sleep it several times most days. I plug/unplug the power adaptor (which is still original, despite a slow decay) at least once a day. I type thousands of words each day on its keyboard. I run down the battery most of the way about twice a week. I have applied lotion to the trackpad 3 times now.

It still has the basic problems it's had forever:

But other than that, it is pretty much like new. The only thing that is becoming progressively more irritating the longer I use it is Firefox, which can hardly be the laptop's fault. The ink has rubbed off of the home row keys, and it is generally grayer than it used to be. But everything still works. The hinge is still tight. The latch still works. The two rubber feet that survived the first month are still there. The power connector *still* won't die despite some visual damage. I bet the CD-RW/DVD drive has succumbed to cat hair, though. The battery even still holds *at least* 2 hours, and probably more like 4 if you aren't playing videogames.

Compare that to my old Averatec, yow.

The point is not that this iBook is indestructible, but that it has not been destructed despite what can only be described as heavy usage.

Jinx: now it'll fail next week.

June 3, 2009
Staying power II

Yeah, I'm still using my iBook. It is nearly 4 and a half years old. Honestly I am starting to feel a little resentment about its staying power at this point. It has all the flaws it ever had, and some new ones.

I have replaced the battery. It only lasted about 20 or 30 minutes, and Apple power management finally disappointed me, once the battery was mostly dead, the laptop stopped doing the useful suspend-on-low-battery feature. It would instead go directly from 30% battery to 100% off, losing any unsaved data and so on. Very crappy. New cheap chinese knockoff battery (who wants to buy new apple parts for a laptop on the verge of death?). I've had this knockoff for more than a year now and it still gets about 2 hours. Not bad.

The power connector has been slowly decaying for a long time, but the laptop end of it still works fine. The adaptor end of it finally died about a year ago. I repaired it (poorly) a couple times. I finally figured I would take it apart and just replace the cable, but stupid apple glued the fucker together and I damaged the electronics taking it apart. So I bought a cheap chinese knockoff power adaptor. It sucks in a million ways (it is very hot, it doesn't generate enough amperage to charge the battery quickly, and it generates sufficient interference on the power line that it cannot be connected to a GFI and it interferes with X10 and several devices and makes a hum when connected to external speakers). But it still works a year later, whatever, the laptop is about to die right?

The screen's backlight is fading, so the laptop is pretty unusable in anything approaching direct sunlight, even silhouetted by sunlight.

The keyboard got progressively less usable, so I bought a cheap chinese knockoff. Why buy a new Apple keyboard for a laptop that's about to die, right? The chinese knockoff keyboard is astoundingly similar to the Apple one in most regards, but you can kind of tell somehow that it's shitty. One interesting thing is that both the old and new keyboards have a repeat problem just with the g and h keys, often detecting more than one keypress for these keys. I assume it is some sort of design flaw since I've never noticed it with any other keyboard, so it's probably not just an oddity in my typing. Weird.

It doesn't have enough RAM (only 512MB) for twenty-first century applications (like facebook *sigh*). RAM for such an old computer is now very expensive, and it is about to die after all, so I'm just going to live with it until it dies.

The trackpad is starting to flake out. I don't know if some electrical component has somehow decayed or if there is just dirt in some unfortunate location, but sometimes it displays "sticky" movement. The trackpad surface is as smooth as ever (thanks to regular lotioning), but sometimes the cursor tracks the finger only in fits and starts. Replacing it would mean totally dismantling the thing, which just doesn't seem worth it, since it's about to die.

OS X 10.3.8 is also starting to show some signs of age. Pretty much everything from the new version of Firefox to the new version of Adobe Flash requires OS X 10.4 (or even OS X for x86!). So all of the software is slowly going out of date. Whatever, youtube still works.

I still use it all the time (my livingroom PC doesn't even have a modern web browser on it). And I'm not nice to it. In fact, I've taken to throwing it into a pile of clothes every time I'm done using it. As you can tell, I'm pretty excited about when it dies. I'll buy an Asus EEE PC 1000HE, probably. But I'm going to go ahead and let it die all the way. Maybe there will be a better or cheaper netbook by then, and at any rate, I should get a few more months out of it for free. Let's see what I have to say about it in a year. *sigh*

Though, for the record, it is still better in every way than my Averatec laptop (my original x86 the iBook relpaced) was when it was brand new. It still runs cool, the battery still lasts 2 hours, and not a single one of its defects (except possibly the trackpad) is as awful as the stock configuration of the Averatec.

And I just looked, I bought my Averatec May 13, 2003...so it didn't even last 2 years before being dumpstered (I traded it for a used sawzall and I'm pretty sure I got the good end of that deal).

Oh and it's still super stable. My uptime record is 207 days, but even today with its numerous problems (mostly power-related), it has 104 days of uptime as I type this.

August 21, 2009
Resignation

Since the last time I wrote, nothing new has broken. In fact, it's been quite a while since I noticed a new degradation. It's just become ever more frustrating to use as websites have gradually grown in the amount of RAM they consume, so for example youtube almost always causes swapping, now-days. So I have resigned myself to the fact that I'll proabbly own this laptop for another 4 years, and I have ordered a new stick of RAM for it. Last time I checked, RAM for old laptops was still expensive but either demand cratered or some factory ran a batch of it, either way now it's cheap. $42 for an additional gigabyte. Woo.

Now watch it die while the RAM is in the mail, or maybe a week after the RAM gets here everyone will upgrade to needing the new version of flash that will never ever run on PPCs, or something like that. Jinx!

February 1, 2010
An ex-Apple user

My iBook is nearing the end of its second battery, its second keyboard, its first trackpad, its first logic board, its backlight, its left speaker, its heatsink. Some of those are more imminent than others, and none of them are terminal, but they're all obviously happening so I have declared that I am retiring my laptop for our 5th anniversary (Monday Feb 15, 2010).

In this time, Apple has switched from PPC to Intel x86, in the process completely abandoning support for my laptop. Due to the old OS on this laptop, I have not been able to upgrade Flash or Firefox in about 3 years, and the web is slowly leaving me behind. I'm not eager to show loyalty to a company with so little loyalty to its existing customers.

But more importantly, Apple switched from the company of Mac to the company of iPhone. Their lust for the early adopter has become the guiding principle of the company. I'm glad they're doing it, because early adopters bring all sorts of goodies (such as the imminent rise of touchscreens on laptops). But I'm not an early adopter and I don't want a bunch of crap hardware that is meant to be abandoned when the real model comes out.

Also, Apple has become a much more closed company. The iTunes monopoly has given them a taste of the dark side. Looking at the iPhone: the contract with AT&T, the App store, the lack of open cross-development tools, the artificial limitations on everything from VOIP to Flash.

Five years ago nearly the cheapest and smallest 12" laptop (and also approximately the highest quality) happened to be the Apple iBook G4 12". And it happened to come with a passable Unix. Apple doesn't even make a 12" laptop anymore. The PC market is now littered with laptops in this form factor and price range (as much as 60% cheaper).

So let's just hope I don't wind up hating my Lenovo U150 for being hot and loud and buggy.

PC hardware, the game is yours to throw.

February 5, 2010
Infidelity

Today I received a shipping notice from Lenovo -- my new laptop is in the mail. I guess my iBook could tell that I had been disloyal, because today when I was watching a video with my lady friend, it froze up in an unprecedented way. When it finally came to, I searched dmesg for a clue and it indicated hard disk errors. For a long time I've considered hard disk failure to be one of the "buy a new laptop" signs to watch for, and here it's happened the very day they shipped the replacement.

Since end of lifetime is accomplished, I want to make a complete accounting of the cost of this laptop, over 5 years:

So all together this laptop has cost me about $1156.40 over 5 years, or about $19.27/mo or $0.63/day. In some ways, that is very cheap. In other ways, quite expensive. I spend about $0.18/day on my desktop PC. On the other hand, I spend $2/day on Internet and $1/day on cellphone.

It lasted 3 years before it needed any help whatsoever, and it lasted another 2 years after that for only $150.46.

So overall I would say whatever money I threw at the laptop to keep it going paid off extraordinarily well. Knowing now that it would last exactly five years, I regret cheaping out on the generic battery, and I think maybe I should have paid for the proper Apple power adaptor too. But I think that last RAM upgrade (only 6 months ago!) was a waste.

And I still think that this laptop is probably the highest quality portable hardware I will see for a long time, so I do not regret dragging it along for the last 2 years, even as it has been obsolete. But at least it is dying now so I am guaranteed that even if it is crap, my new PC laptop will not sit in the corner, lonely, while I continue to use my iBook.