Archive for the ‘The Great OS Wars’ Category.

Windows 7

Last Friday, I discovered that I needed a 64-bit version of Windows for development purposes. I had a 64-bit version of Windows XP on a spare machine, but I haven’t set it up since the recent move, and until we get more stuff organized, I frankly don’t have the room. But it occurred to me that I’m running a 64-bit machine now, so at least in theory, I should be able to install a 64-bit version of Windows in a virtual machine under VMware Fusion. So I figure, what the heck, let’s give it a try. And while I’m at it, I might as well finally take a look at Windows 7 too.

MSDN supplied a 64-bit copy of Windows 7 “Ultimate”, and a key for it. When I created a virtual machine for it, VMware Fusion obligingly recognized the downloaded ISO file and installed it for me with no further instruction on my part. After the obligatory round of updates and reboots, I settled down to figure out how to use it.

In any new Windows OS, I have to figure out how to change a few things immediately. The “don’t show hidden files” option has to come off, and especially the “hide extensions on known files types” option — I’m a big boy, I can stand seeing file extensions and files that Microsoft thinks are too dangerous or scary for delicate eyes. I do not want it to automatically reboot if it crashes — I want to see that it has crashed, and any diagnostics that it produces, before I (manually!) reboot it. And turn off those damned animations, I don’t care about them and you’re running in a virtual machine so don’t waste the CPU cycles.

Since Microsoft always moves the settings around between versions, I had to poke around awhile to find them, and I got a good look at the OS as I did so. And I have to say, I’m impressed. The user interface is a lot better than it was before — easier to use, easier to navigate around, and it mostly stays out of your way until you need it. The system is pretty responsive, something that you couldn’t always say about earlier incarnations. It’s using roughly half of the one gigabyte of memory that VMware Fusion allocated to it, leaving half a gigabyte of memory for programs to use without swapping. Even the security stuff didn’t cause me much trouble, I just had to tell it that it was okay to run programs from a network drive without panicking and warning me about them each time.

But it wasn’t until I installed Visual Studio that I really saw the biggest difference. All of my programs compiled 33% to 50% faster! I’d anticipated that the compiler would be a little faster under a 64-bit operating system, despite the fact that it’s only a 32-bit program itself, but that’s a lot more than I’d expected!

All told, it was one of the most painless Windows installs I’ve ever done, and it didn’t take me too long to decide that this was going to be my new development VM. :-) I did run into one minor but baffling glitch, which I still haven’t determined the cause of (could be Windows 7, could be Visual Studio 2005, might even be something else entirely), but I found a work-around for it, so everything is working fine now.

I’m still not going to use Windows for anything Internet-related, only for games and software development. Linux is a lot safer on the ‘net at present. But for the foreseeable future, when I use Windows, I’ll definitely be using Windows 7.

VMware Fusion and Windows Development

I’ve spent the last few days integrating my new math library into the Windows project I started coding it for. Yesterday morning I was ready to try running the integrated copy, but I had some kind of problem starting it up. I couldn’t track it down very easily though, due to how long it took to do a full compile of that project.

As you might remember, I’m now using a MacBook Pro, and doing Windows development under VMware Fusion. I expected that things would be a little slower under VMware Fusion than on a bare-metal machine, and for the most part I didn’t really notice the difference… until I started working with this very large project again. I remembered it taking a long time to compile this one from scratch, but I remembered that “long time” as being closer to ten minutes. It was taking well over an hour now, which was simply ridiculous.

I’m also still running my Linux virtual machine at the same time, for web access and such. I had some trouble getting the two virtual machines to play well together… whenever I started the Windows VM, the Linux one suddenly started losing memory, for reasons I couldn’t understand. I tweaked the memory usage on both of them… it helped, but they still seemed to be fighting over memory at times, even though the system itself had plenty of memory for both of them and itself too, without swapping.

I finally found out the reason for all of that when I went to locate a fix for the slow Windows compiles yesterday. It turns out that VMware Fusion, unbeknownst to me, was sharing memory between the two, allowing the Windows machine to steal the Linux machine’s resources. (Just what I’d expect a Microsoft product to do. ;-) ). On VMware’s site, I discovered a page with a note at the bottom:

Adding the following settings to a virtual machine can reduce the I/O load on the hard disk, however these adjustments require additional memory on the host. Only add these settings if there is sufficient free memory on the host to accommodate all the memory allocated to the virtual machine, otherwise you may cause a memory starvation condition that can reduce performance of all the running virtual machines or possibly affect the host operating system.

I had plenty of memory, so bring it on! After shutting down the Windows VM, I added the four lines that the page suggested to the virtual machine’s vmx file:

    MemTrimRate = "0"
    mainMem.useNamedFile=false
    sched.mem.pshare.enable = "FALSE"
    prefvmx.useRecommendedLockedMemSize = "TRUE"

That helped, a lot. Not only with the speed of the compiles, either — the Windows system was no longer stealing the Linux machine’s memory. :-) But the compiles were still pretty slow, and it took me a while to discover why.

During a compile, I popped up the Windows Task Manager program, to see whether the system was swapping a lot of memory or something. And lo, what do I see, but that there’s another process who’s memory and CPU usage were going up while the compiler was trying to run. It turned out to be Microsoft Security Essentials, the free anti-malware program that I’d installed a little while back because the VPN software that one of the companies I work with uses insisted that I have some kind of virus protection. It was supposed to have no noticeable impact on the machine. Well, it had a very noticeable impact in this case.

After turning off its “real-time protection” option (and ignoring the dire warnings about how my computer was now At Risk!), full compiles were much faster. Still noticeably slower than on a similarly-equipped bare-metal system, but a lot more tolerable. I can’t say exactly how fast yet because I’m still improving it as I work on the code; I’ll run a thorough test once I’m done.

So equipped, I finally tracked down that startup problem — it was an instance of the static initialization order fiasco, which I should have thought of a lot sooner since I’d run into it just last week too. Oh well, live and learn. For now it’s back to the real task, developing the software.

Microsoft Finally Got The Memo

I’ve dealt a lot with software piracy issues, primarily with Project Badger (detecting and preventing piracy is one of its primary purposes). And I didn’t have to learn the hard way that you have to be very careful before calling any user a pirate, or allowing your software to do so — paying customers don’t like being accused of theft. If there’s any chance at all that you could be wrong about it, you have to give the customer the benefit of the doubt.

For some reason, Microsoft did have to learn that the hard way. Their first antipiracy attempt, three or four years ago, was secretly installed onto systems disguised as an “important security update.” And it “caught” far too many of their legitimate, paying customers, baldly and unapologetically calling them thieves. It was clumsy and heavy-handed, too — it essentially made the system unusable until the “caught” person called Microsoft to correct the problem. Even if you didn’t experience it yourself, it’s easy to see how that could royally piss people off.

But by the sound of it, they’ve fixed all of those problems. They’re going out of their way to be open and honest about the process now; the false-detection problems seem to be fixed; and when it does think that it has caught someone, it allows the system to continue working as normal, simply informing the user of the problem.

I still don’t particularly like Windows, but it’s easier to deal with it now.

“Do You Really Need More Than 4GB of RAM?”

The answer, in my case, is probably not. At least for now.

On the get-more-RAM side: I do use a several virtual machines (VMs) regularly. With eight gigabytes, I could open all of them at once, and increase the RAM available to each of them too, and still have plenty of RAM left over for other purposes. I could also run Windows 7 in a VM, something that might be problematic with only 4GB.

On the not-right-now side: in my current setup, so long as I don’t open more than two virtual machines at a time, I don’t run into memory problems. And the current allocation of memory to each VM, while not massive, seems sufficient to prevent most swapping within the VM itself. But the biggest argument against it is the cost: replacing my current 4GB with 8GB on this machine would run about $750 from Newegg.com (the least expensive option I’ve been able to find so far). The advantages aren’t worth that to me.

On the other hand, electronics prices almost always drop over time. If this stuff drops fast enough, or if I find that Project X needs a lot of RAM to operate at full speed (possible, I’m not sure yet), I might end up getting it. We’ll see.

Of course, the answer might be different for you, especially as memory for most computers is a lot cheaper than for mine. Read the article and make your own determination.

Apple, how I wish I could hate thee…

As I’m writing this, I just got off the phone with a customer service representative at a high-tech company.

To anyone with experience in the matter, that sentence probably provokes a sympathetic wince, at the very least. But this was a very different experience. Let me ’splain… no, there is too much, let me sum up.

On Wednesday, August 26th, my trusty Dell XPS m1210 laptop computer died, suddenly and totally unexpectedly. As I must have a computer to do my work, I went out the same day to get a replacement. For various reasons, I ended up with an Apple MacBook Pro.

Friday, August 28th, a major new version of the Apple operating system (OS X 10.6, code named “Snow Leopard”) was released. Since I’d just purchased the computer, I was offered a really cheap upgrade, which I ordered that evening (gotta keep up with the latest OS versions for security reasons, you know). I received the shipment notification on Monday the 31st, saying that it should be delivered by Friday, September 4th. I happily went on my way.

The fourth came and went, with no Snow Leopard disk. Monday the seventh was a holiday, so I figured it would be here on Tuesday — no luck. Ditto Wednesday, Thursday, and Friday. On Friday evening I looked up their customer service number and hours — to my surprise, they offered weekend hours too. I was out of town all day Saturday, so I resolved to call on Sunday (i.e. today).

Now, I’ve dealt with customer service at computer companies dozens of times over the last twenty years. They are, without exception, the worst experiences — worse than the phone and cable companies, and they’ve gotten even worse over time. When you finally make your way through their computerized discouragement systems and half-hour hold times (assuming the system doesn’t hang up on you before that), you inevitably find that their customer service lines are manned entirely by minimum-wage people who aren’t allowed to deviate from their prepared scripts, and usually with such heavy accents that I have to ask them to repeat themselves half a dozen times each call. So, bracing myself for a similarly-painful experience, I made the call.

After less than thirty seconds on hold, my call was answered, and by someone I could easily understand. She agreed that the disk should have been delivered by now, and immediately arranged to send a replacement, this time with a tracking number to ensure that it got here.

(I have to say, typing this entry has been difficult… it’s hard to keep my jaw off of the space bar long enough to get a full sentence written.) ;-)

I do not want to become an Apple fanboi. I think it’s ridiculous to be devoted to any publicly-traded company, because the company certainly won’t show any kind of loyalty to you in return. But between the quality of the hardware, the quality of the operating system, and the quality of the customer service… I must admit that I’m finding it very difficult to resist.

The Joys (?) of a New Computer

I have a love/hate relationship with upgrades. On the one hand, it’s exciting to have something new, especially since that something is almost always a major improvement over its predecessor. But on the other, it’s always a major pain to transfer all your data, reinstall all your software, and get used to the new quirks that any upgrade introduces. My unintended new computer is no exception.

As I said in my earlier post, this is the first Apple computer that I’ve ever owned, and I’m very favorably impressed. The hardware is completely awesome… the machine runs absolutely silently, other than the optical drive, so much so that the spinning of a CD or DVD is startlingly loud by comparison. Even in a completely silent room, I can’t hear any noise from the fan(s) that I know are in it, or the hard drive.

It’s also very cool, in both senses of the word. Even with both CPU cores running at full load, the case never gets uncomfortably warm (unlike every other laptop I’ve ever used). And the case itself is the best design I’ve ever seen, and I’ve looked at just about all of them. Everything seems to have been thought out with extreme care, from the placement of the power button and built-in microphone to the lack of any visible cooling vents — they seem to be in the join between the screen and the main body, an obvious improvement in retrospect but something that I’ve never seen done before. The slot-loading optical drive means that there’s no fragile (and, let’s face it, ugly) CD/DVD “drawer” to damage. The magnetically-attached power cord… the back-lit keyboard for use in the dark… the ambient light sensor (so that the screen stays at the proper lighting level for the conditions)… it’s just a truly well-thought-out machine.

(As an added bonus, our cat Oliver is baffled by the upper corners of the screen. They simply aren’t chewable. Unlike the Dell, which had very chewable corners — so much so that he chewed the plastic right off of one when I wasn’t looking.)

And that care extends to the operation as well. When you plug in an external monitor, the system automatically detects it and reconfigures itself to use it — a feature that neither Windows nor Linux has. Disconnect it, and the system reconfigures itself again. Very nice.

And then there are the aesthetics.

I’ve never really understood the argument for aesthetics. To me, computers have always been functional tools, not fashion accessories. You don’t hear about carpenters worrying about the most pleasant-looking saws and drills, and a computer is no different. Or so I thought.

Logos. On your average Windows machine, you’ve got logos everywhere. The optical drive has at least three different logos for supported formats. There are stickers bearing the logos of the CPU manufacturer, the video card manufacturer, and the operating system maker, and often one or two touting the features of that particular model as well. The underside resembles the business end of an industrial tool, with even more stickers, logos, and written information, this time nestled between access panels, ventilation openings, and angular bits of casing. When you first turn it on, you’re confronted with at least half a dozen desktop icons for different pieces of crapware that the manufacturer has “helpfully” been paid to include.

This MacBook, on the other hand, is startlingly bare. There is one logo on it — the lit-up Apple logo on the back of the screen. There is one bit of obvious writing on it — it says “MacBook Pro” on the bottom of the screen itself. The palm rests are devoid of any adornment. The left side, with the ports, has only one discreet icon to identify each of them. And the underside is a vast expanse of bare brushed aluminum, with two lines of tiny writing and one line of icons, all legally mandated, along the back edge. When you turn it on, it has one icon on the desktop, for your hard drive.

And the indicator lights! I never thought about it, but my Dell had no less than eight obvious indicator lights: power, disk access, battery-charging status, wi-fi, Bluetooth, caps lock, scroll lock, and num lock. Some of them were multi-purpose: the power light, in addition to being on or off, would slowly pulse when the system was in sleep mode. The battery light showed green when the battery was charging, slowly-blinking green when it was almost full, amber when it was low, and blinking red when it was almost depleted. The wi-fi light, in addition to showing whether it was on or not, would flash whenever data flowed through the wireless card. And the battery had five LEDs on it too, on the underside, to tell you how much juice was left in it.

The MacBook has one obvious indicator light, on the caps lock key itself — it’s only on when the caps lock is, but you can see it when the keyboard backlight is on too. There are a few other ones that I’ve seen, discreet to the point of invisibility when not in use: one to indicate that the camera is on; one at the front that pulses on and off slowly when the system is in sleep mode; and a set of eight tiny ones on the left side that will tell you the amount of charge in the battery when the button next to them is pressed. The battery charging/charged indicator has been banished to the power adapter’s connector, which is on the side where it can easily be seen when connected, and can’t be seen at all when it’s not. There’s no number lock or scroll lock, no separate power light, no wi-fi or Bluetooth lights, no disk-access light. They simply aren’t necessary, and the only one I miss even slightly is the disk-access light (just because I like to know when the system is doing something in the background).

I finally appreciate aesthetics in a computer.

Then there are the things that I’d expect from an upgrade. A noticeably faster processor. A completely ludicrous amount of battery life, without the special extended battery that I had to buy to get even large fraction of it with the Dell (that’s the feature that finally convinced me to go with this machine). The technology improvements that have been made since I bought my last machine: a 64-bit, dual-core CPU (when I bought the Dell, you could choose 64-bit or dual-core, but not both). Gigabit ethernet. 802.11n. SDHC compatibility. The latest Firewire spec.

Then there are the bad parts.

The operating system is unfamiliar: the menus for a program are along the top of the screen, not on the program’s window itself. The hot-key combinations that are trained into my muscle-memory don’t work under Mac OS X. The program-switching behavior is slightly different. On the plus side, it’s all well thought-out and consistent, and quite pretty — I never noticed before, but Linux and Windows apps very clunky-looking by comparison. And virtualization (running my comfortably familiar Linux apps via VMware Fusion) helps smooth things over quite a bit.

The keyboard layout is just unfamiliar enough that I’m constantly tripping over it. The option (“alt”) and command (“Windows”) keys are reversed. There’s no separate home, end, insert, delete, or page-up/page-down keys, though I can emulate all of them with combinations. Fortunately, I only have to deal with that issue when I take the computer out and about; in the office, my comfortable Logitech Bluetooth keyboard works perfectly with it.

The trackpad is extremely large, compared to the ones that I’m used to, and my old habits (like resting my thumb on the lower edge to press the now-nonexistent buttons while my fingers move over it) cause some trouble. Again though, my comfortable old wireless mouse works perfectly with it, and shields me from that most of the time.

Other than some minor teething pains (mostly related to VMware Fusion), those are really the only problems I’ve had with the transition so far. My Linux data transferred to my Linux virtual machine with no trouble, and installing my Linux programs was pretty much a no-brainer — much easier than with Windows, despite the fact that I’ve switched to the 64-bit version of Ubuntu in the process. (The only two programs that I expect to give me trouble are Skype and the Flash player, neither of which provide a 64-bit version. There are work-arounds for that though.)

All in all, it’s a change for the better.

“Google ChromeOS: Have people taken leave of their senses?”

Someone recently asked me what I thought about the Google ChromeOS announcement. I think a lot of things about it, but this article sums them up extremely well, and adds several more that I hadn’t considered too.

The bottom line: like the Chrome browser, I don’t see it as necessary. Neither will put much added pressure on Microsoft; both will likely take more users from the non-Microsoft alternatives that already exist (Apple’s OS X, Linux, Firefox, and Opera), rather than from Microsoft itself.

That said, more competition is always good for the consumer. This should push the Linux developers to improve the Linux experience faster, if nothing else.

(Hm… here’s another take on it. It seems overly cynical, but it might just have some truth to it.)

“Ubuntu aims for ten-second boot time with 10.04″

If they can do it, it’ll be very significant — for one thing, there’s little need to hibernate or suspend a system that boots up essentially instantly.

BTRFS

As you might remember, I wrote an entry on using the ZFS file system for my older network backup drive a while back, and how nice it was to have the protection of block checksums, ensuring that files can’t get silently corrupted. But for various reasons, I was forced to abandon ZFS on my new network storage system. I wasn’t too happy about that, and did some research on other file systems that included the block-checksum feature.

In short, there weren’t many, and the few that there were didn’t look stable enough that I’d trust them with anything of value. But in my research, I kept running across mentions of something called BTRFS (“Butter FS”).

It was hard to find much information on it, but what little I did find sounded very interesting. The good news: it has all of the features that make ZFS such an appealing choice (including block checksumming and several RAID levels), and unlike ZFS it was being built into the Linux kernel. The bad news: there are big capital-letter warnings that it’s still in testing, and that you can’t safely use it on production systems yet. Disappointing, but prudent.

Despite this, I’ve been following the news on it ever since, and today I discovered a recently-published article on it. If you find such things as interesting as I do, go read it.

I’m eager to try it out. As soon as the Linux gurus say that it’s mostly stable, anyway. :-)

Taming the Wild Rodent: Unintended Double-Clicks

You’d think that with three cats in the house, we’d have no problem with mice, but for some reason they completely ignore the kind that plug into the computer. I should fire the lot of them. :-)

I have a really nice wireless Logitech mouse. Just a simple one, but it gets the job done, and I only have to replace the batteries maybe every five or six months. I’m extremely happy with it, except for one thing.

Late last year, I started noticing that left-clicks on it were occasionally being interpreted as double-clicks instead. Only maybe one time out of every twenty or thirty clicks, but enough to be irritating. After installing the latest Ubuntu (9.04, or “Jaunty Jackalope”), I decided to find a fix for it.

[EDIT: If you've got the same problem, read the comments below this article before trying this solution. It helped, but not enough.]

There were several reports of similar problems, and the recommended fix seemed to be to modify /etc/X11/xorg.conf, adding "CorePointer" to one of the mouse-configuration lines. Which would be great — except that this version of Ubuntu moved the handling of mice to a component called HAL (I’m assuming that’s for “Hardware Abstraction Layer”), and completely removed all the configuration lines in xorg.conf.

I’ve spent many hours over the last week, trying to figure out how to translate that option to HAL. And when that failed, trying any other option I could dig up or think of. So far as I can tell, there’s simply nothing you can do through HAL to solve this.

As of last night, I was ready to give up on it, but my stubborn determined nature wouldn’t allow me to. Like it or not, I had to solve it, even if I had to dig into the source code for the mouse driver and change it there — logically the fix is simple enough, if the system sees a double-click that’s too fast for a human to have made, simply ignore it. Enough people seem to have had this problem that somebody must have thought to add that option into a mouse driver, and if it was available anywhere, it would be in Linux.

Well, as the saying goes, it’s always darkest just before the dawn. I had the idea to search for:

linux "minimum double click"

That led me to someone talking about an option in a program called btnx (which apparently didn’t work in the previous version of Ubuntu due to a bug in the X-server, but does in this version). I downloaded it, followed the instructions for setting it up, and configured the left button to be interpreted as the “key combination” BTN_LEFT, with a “repeat delay” of 100 milliseconds. Then I started the btnx daemon, took a deep breath, and started clicking the title bar of one of the Firefox windows on the screen, one click per second, using the faint but audible ticking of my wall-clock to time them.

Not once in five full minutes — that’s three hundred clicks — did the window maximize itself! Previously it would do so after somewhere between five and seventy clicks, as the system saw something it erroneously interpreted as a double-click. Problem solved!

Now if I could just find a similar program for my occasional forays back into Windows… ;-)