psycopg2 and Transactions

Read the manual. What happens when a commit fails? Go on. I'll wait. What's that? That link wasn't very helpful? Try this one. So, how about it? How do you know if your commit attempt failed?

The documentation didn't really tell you, did it? Well, psycopg2 is open-source, so read the code, damn it! What's that? You're a Python programmer? So what? Oh, you aren't intimately familiar with C and the Python/C API? Well, I suppose that would be a problem. Since I'm such a nice guy, I'll tell you. If the attempt to commit fails, commit() throws an exception. Not a CommitFailedException or anything like that. Just an exception. You see, if the underlying PostgreSQL C API call indicates that the commit attempt failed, then conn_commit() in the psycopg2 Python/C glue layer will return NULL, which indicates to Python that an error occurred.

Actually, that "just an exception" bit above is pure speculation on my part. You see, the Python/C API documentation doesn't seem to want to explicitly tell you just what happens if you return NULL. I read something on StackOverflow about returning NULL indicating an error, but exactly what that means wasn't spelled out.

What's the moral of the story? Documentation is important. Don't skimp on it.

Fedora and GNOME: Where Are They Now?

tl;dr: I'll stick with Kubuntu/KDE and Arch/Awesome, thanks.

So, I decided to give Fedora and GNOME another try. It didn't exactly go well. My first attempt, with the Fedora 18 GNOME Live image (the one the Fedora site makes it REALLY easy to download, and so is presumably the recommended one) ended in failure and WTF. Basically, Rhythmbox flat out refused to recognize ANY of my music, not even the stuff that's in Ogg/Vorbis or FLAC format, giving me some BS error about not being able to find the type of the stream. Lovely.

Before I proceed, I will say that the new installer that so many people hate so much is really not that bad. However, I will also say that it takes too many clicks to tell it to completely blow away everything on a drive and install there, and some of the language it uses can induce undue anxiety. All told, though, it's fine. Stop whining about it.

My second attempt used the DVD image. This time, Rhythmbox recognized my free-format music. It whined about my MP3s, but that's to be expected. Stupid patents. Getting that to work was more of a chore than in Ubuntu, but all in all, it wasn't too bad. HOWEVER, whoever designed the software manager's "I want to install a new GPG key" dialog is clearly an idiot, since it doesn't include the key's fingerprint. That's a rather important piece of information for answering that question. Speaking of GPG keys, the very first round of updates after installing the system triggered one of these dialogs. I had made ZERO changes. I just booted the installation for the very first time, opened the software manager, and told it to check for updates. And it asked me if I wanted to trust some GPG key. WTF? Also, at one point, the software manager glitched out and made the "do what I just described" button disappear. It eventually re-appeared, but then I accidentally de-selected some software I wanted and was unable to re-select it no matter how many times I clicked on the checkbox. I ended up just using yum on the command line to install the software I wanted.

While I was copying my music into my new install, some piece of Tracker died. Fedora helpfully attempted to help me report the failure. Remembering my failure-reporting misadventure from Fedora 17, I opted to just let the Fedora developers have the raw core dump instead of producing a backtrace locally. Unfortunately, I did not meet with any more success in this outing. The error reporting tool chewed on something for a very long time (in its defense, my music was still copying, and the CPU on that machine is not exactly fast) and eventually spat out a baffling error message about Bugzilla configuration being bad. Now, Bugzilla is a web application that runs on a server. When I hear "Bugzilla configuration", I think "configuration of an instance of Bugzilla running on a server somewhere". Presumably, in this case, it means "configuration of some software running locally that talks to an instance of Bugzilla", but at this point, I was no longer interested in reporting the error. My patience is limited. As much as I hate Windows, at least error reporting is easy: just click the button and it goes.

One thing I will say in Fedora's defense, though, is that I did not see one single solitary SELinux AVC denial. In my previous adventures with Fedora, I have seen SELinux AVC denials after booting a fresh installation for the first time. Clearly, improvements have been made.

GNOME 3 seemed a bit less asinine this time around, although I can't quite put my finger on why. One thing that definitely DID annoy me, though, was that the Gmail account I added via gnome-online-accounts (a rather nice idea, by the way) is COMPLETELY immutable. That means I can't tell Evolution to keep local copies of all my Gmail emails. Not only does this deprive me of an easy way to make a backup of such emails, but it also makes interacting with my Gmail account via Evolution quite slow, since it has to download each email when I open it, and apparently Google's IMAP server (or whatever gnome-online-accounts uses for Gmail) is not terribly fast. Also, if an application doesn't throw up a window sufficiently quickly after being launched, GNOME Shell apparently decides that it failed to start and puts you back in the Activities view, which means an extra click or keystroke once the program starts. I'm also a bit disappointed by GNOME Boxes. The way it's described, I thought it would let me manage and interact with virtual machines running on remote hosts (like virt-manager), but no. It just lets me manage and interact with virtual machines running on localhost and connect to remote hosts via RDP or VNC. It's slick, but it doesn't do what I thought it said on the tin.

More worrying is something that doesn't affect me directly: this. I'm sorry, but I'm going to have to call Bastien Nocera out specifically. Dude, you are complaining about people "slinging insults" after putting out something so condescending as this? Cripes. Why can't the GNOME developers simply accept that some people don't want their laptops to go to sleep when the lid is closed? The baked-in "sleep on lid close" behavior happends to be exactly what I want, so this doesn't affect me directly, but I can't help but be concerned when the developers do things like this in response to fairly widespread user complaints. "I know you don't like the choices we made for you, so here's some janky app you can run every time you need to work around them." This is pretty much the same attitude that greeted the outcry over the removal of screensaver configuration in GNOME 2. People complained that they couldn't do things like change the text displayed in a simple "make some text move around the screen" screensaver, and a developer replied that nobody ever needs to configure a screensaver, despite obvious evidence to the contrary. He didn't even make a janky app, though; he just closed the bug and ignored the users.

Thus, GNOME 3 continues with GNOME's bad habits: removing options and ignoring user outcry. I'm sure it's wonderful to use if your method of interacting with the computer happens to match up with the way the GNOME developers think you should, but for the rest of us, it's an annoying experience that's tantalizingly close to being great. Oh, and having a sufficiently powerful machine helps, too: my puny netbook has a bit of trouble with things like switching between desktops and opening the Activities view (the only way to launch an application). Fedora's biggest problem is QA. The charge that Fedora is a perpetually-broken testing ground for the next release of Red Hat Enterprise Linux is not entirely unfounded. I don't quite agree with Alan Cox, but I definitely see where he's coming from.

The real tragedy in all this is that I WANT to like Fedora and GNOME. GNOME (even GNOME 3) has some rather good ideas (e.g. gnome-online-accounts and color calibration), and it's pretty clear that the people working on it have put a lot of effort into making it simple to use. Also, GNOME and Fedora seem to be where many of the visionaries of the Linux world do their work. I can't help but wonder if they actually use it, though. Fedora just has so many obnoxious little problems that nibble at your shins like a pack of rabid chipmunks, and I find it difficult to imagine using it as my primary OS, and I can't imagine that all these people all just happen to work with their computers in the GNOME-approved way. Since I'm an idiot, I'm going to give Fedora a shot on some servers I have lying around (I've been told that OpenStack can be set up quite easily on Fedora 18); maybe that will go more smoothly. If not, I have an installer image of Ubuntu Server 12.10 ready to go.

What's in a Linux System? (Part 1)

My father recently told me that despite having used Linux for a few years, he's still a bit unclear on the terminology and how all the pieces fit together, so I'm going to explain it all here! I'll also explain a bit about how the pieces work along the way.

I will assume that the reader knows a few things about hardware. If your memory needs refreshing, here are a few facts:

  • Memory or RAM is volatile (the contents disappear when the computer is turned off), speedy storage that is used to hold data that is expected to be operated on soon (or not soon, but on very short notice).
  • The processor or CPU is the part that actually operates on data. It can perform various mathematical operations, load data from RAM into its registers (extremely fast storage for data that is actively being operated on), and store data into RAM, among other things.
  • Disk (either traditional spinning magnetic platters or modern flash-based storage) is non-volatile, being used to store data that needs to stick around when the power is turned off. Disks (even obscenely fast, enterprise-grade flash storage) are quite slow compared to RAM.

The Linux Kernel

First, there's the Linux kernel. It's where the name "Linux" comes from. An operating system kernel is the very heart of the system. Its purpose is to provide an abstraction over the hardware and to provide some low-level management services. Let's go over these one at a time.

Hardware Abstraction

Suppose you want to write a program that makes sounds. In the bad old days of DOS, you would need to write custom code for every single model of sound card you wanted to support. If you wanted to support every sound card on the market, that would be quite a lot of work. If you left one out, then anybody with that sound card would be left high and dry. Games of those days would actually ask the user what sound card the computer had during installation of the game. If yours wasn't on the list, too bad.

Modern operating systems like Linux and Windows provide abstractions for things like sound. The operating system kernel defines an API (application programming interface; essentially a collection of names of programming routines) for manipulating sound hardware, and the companies that make sound cards write pieces of code called drivers that implement the functionality behind that API. In other words, the operating system defines what a sound driver "looks" like, and the sound hardware vendors write code that "looks" that way. Thus, your program only needs to use the operating system's sound API, and it will work with any card on the market. It will even work with cards you haven't even heard of and cards that haven't been invented yet.

The exact mechanism by which driver code runs depends on the OS, the subsystem the driver is part of, and the design choices made by the people who wrote the driver. Historically, a "driver" has been code that is loaded into the kernel and runs as part of it, rather than as a separate program. Today, it's less clear-cut. Some drivers may run entirely outside the kernel, while others have multiple components, with some running inside the kernel and some running outside of it. Microkernels try to put all drivers outside of the kernel, although these types of kernel haven't seen much use outside of research. Most drivers in Linux and Windows at least have a component that runs as part of the kernel, though.

Kernel and Drivers


In the bad old days of DOS, you could only run one program at a time. After all, your computer only has one CPU, right? How could more than one program run at once? Well, strictly speaking, you can't have more than one program running at the same time. However, modern operating systems can provide the illusion of such by rapidly switching between multiple programs, letting each one run for a bit before switching to another. (I'm not going to discuss the multi-core chips typically found in modern computers; they don't actually change the situation all that much.) In ye olden days of Windows 3.1, programs were cooperatively multi-tasked. This means the programmer would have to decide where "good stopping points" were in the code and insert "yield" commands at those points. Whenever a program yielded, control would return to the operating system, which would choose a new program to cede control to.

There were a lot of ways this could go very, very wrong. If the programmer didn't choose the yield points well, the program could cause other programs to run unreasonably slowly. If one program went into an infinite loop, it would never yield control, and the entire system would lock up. Modern operating systems preemptively multitask. This means that the kernel tells the CPU to periodically interrupt the running program and run a piece of kernel code that checks if something else should run instead. That means that a program that goes into an infinite loop can't bring the entire system to a halt, as the OS will ensure that other programs get their turn.

Modern operating systems also provide memory protection. For a long time now, CPUs have had virtual memory features, which let the operating system give each running program its own "view" of memory. Each program sees itself as having access to every memory address on the machine, and the hardware reinterprets the addresses behind the program's back (all set up by the operating system). In the days of Windows 3.1, there was no such thing. If Program A was storing an important bit of data at memory address 100 and Program B malfunctioned and wrote garbage over memory address 100, then Program A would crash or behave incorrectly. With virtual memory, Program A's memory address 100 and Program B's memory address 100 are not the same physical memory address, so Program B's malfunction can only harm Program B. Virtual memory systems also enable something that, confusingly, is often referred to as "virtual memory": paging/swapping. This lets the operating system swap chunks of memory (called "pages") out to a file on the hard disk when available RAM is low. Using it makes things very slow, but that can be better than crashing due to lack of available memory.

Virtual Memory

Privilege Levels

There are some CPU instructions that are dangerous. They may fiddle with hardware or provide raw access to memory. To assist in the development of secure and robust operating systems, CPUs have privilege levels. CPUs may provide many privilege levels, but only two are typically used. These two are often referred to as "kernel mode" and "user mode". Kernel mode is the mode in which the kernel and drivers run. In kernel mode, you can do anything. Everything else runs in user mode, where any attempt to use a dangerous instruction will halt execution. This helps limit the damage that can be done by a faulty or malicious program, at the cost of a small performance penalty: if a user mode program asks the kernel to do something, the CPU has to transition out of user mode into kernel mode and then back again.

Privilege Rings (source)


In order for the kernel to run, it needs to be loaded into memory, and then the CPU needs to be told to start running it. The bootloader is what does this. Typically, Linux systems use the Grand Unified Bootloader (GRUB). This is simply a piece of code that provides the ability to load a kernel into memory and run it and a menu that can be used to select among multiple operating systems (usually; some of the more simplistic bootloaders don't). It also typically loads a chunk of data called the initrd or initramfs, which provides the kernel with some things it needs very early on in the boot process. For example, if all of your drivers are on a disk, then you need to load the driver for the disk controller before you can load any drivers. Thus, the initrd almost always contains disk controller drivers. As for what loads the bootloader and allows it to load the initrd and kernel without having drivers of its own, well, that's the system's firmware, which is machine-dependent and a very complex topic in its own right (I could write an entire series of articles on firmware and still leave a lot out). Read up on BIOS and UEFI if you're interested.

Windows has a bootloader, too. For Windows XP, it's NTLDR. For Windows Vista and later, it's the Windows Boot Manager and winload.exe. These pieces of software are somewhat more obscure than GRUB; on a typical computer with Windows on it, Windows is the only OS, so the user never sees NTLDR, WBM, or winload.exe. Linux systems tend to share a machine with Windows ("dual boot"), and GRUB is used to let the user decide which operating system to boot. Furthermore, it is fairly common for machines with just a single Linux installation to show the GRUB menu for a few seconds anyway, although Ubuntu has started hiding the menu on single-OS machines unless the user holds down the Shift key while booting.

Boot Process

That's it for part 1. Next time, I'll talk about the userland.

Western Digital Red Hard Disks: Worth It?

I recently purchased a few Western Digital Red hard disks, and I am utterly amazed at how quiet they are. No grunting noises when seeking, no buzzing from vibration, nothing but a quiet hum. The disks are no louder than the fan on the RAID enclosure I mounted them in. I've historically gone with Seagate instead of WD, and I've been fairly satisfied with those drives, but the Seagate drives in my home server make all kinds of grunty noises when in active use. In fact, that's the main reason my server lives in a closet: the fans are pretty darn quiet, but the disks make obnoxious noises at random intervals. If a Raspberry Pi proves sufficient to act as a media center PC, I think I'll just hook up the RAID enclosure to my current media center and make that the home server. If I can get away with not using the fan on that machine (not using its GPU anymore should keep it cooler), then it should be so quiet that I can put it somewhere more convenient than a closet. WIN!

Performance is good, too. See the bonnie++ output below (using btrfs on top of hardware RAID 5 via USB 3). Performance with XFS is similar.

Version  1.96       ------Sequential Output------ --Sequential Input- --Random-
Concurrency   1     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
jekyll       15864M   502  98 122763  19 35330  12  2763  84 171190  29 123.0   6
Latency             52353us     200ms     277ms   60373us     210ms   25013ms
Version  1.96       ------Sequential Create------ --------Random Create--------
jekyll              -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16 17863  27 +++++ +++ 26661  66 27059  46 +++++ +++ 18532  61
Latency               305us    1224us    2712us     330us      47us    1420us

In short, I absolutely recommend WD Red hard disks for NAS-type devices, especially if quiet operation is important. Totally worth the extra money.

Update (2015-09-12): I'm still using those disks, and I still like them.


Next time I need to play around with a possibly messy web app installation, I'm going to skip KVM and fire up LXC. I tried it recently to test a PostgreSQL migration strategy on my laptop, and setting up a container (even with all the software I needed to download) didn't take much time at all, even with the crappy Internet connection I was on. Cloning the container was really quick and easy, too.

I was surprised to see that Ubuntu's LXC packages come with a fairly wide variety of scripts for installing other Linux distributions inside an LXC container: Arch, Fedora, Debian, OpenSuSE, and a customized Ubuntu install designed for doing cloud stuff. Neat!

Since LXC isn't a full virtualization platform, you can't run a custom kernel, and you don't (yet) have as high a degree of isolation, so a malicious root user in a container is (at least theoretically) a threat to the host system, but it's a lot more light-weight, since it basically just uses cgroups to present a constrained view of the system to processes inside the container. Arkose uses LXC in a really neat way: it confines programs to limit the damage they can do. I might try that with Google's music uploader, which I want to use but don't entirely trust. I wonder how well it could confine an application that needs 3D? I'd be inclined to do that with Minecraft, especially if mods are involved.

In short, LXC is a really neat piece of technology, and it's fairly easy to use. If you need to try something messy on a Linux system, I absolutely recommend it.

Facebook Tricks You!

Facebook Deception!

Look at that. That prompt is asking you if you want to authorize the Washingtion Post Social Reader to access your profile and IMPERSONATE YOU ON FACEBOOK! Is that obvious to the average user who sees this? I don't think so! This prompt is designed to get people to give away personal information and let somebody else use their Facebook profiles WITHOUT REALIZING IT.

See, this is why Facebook is evil. They have no compunctions about deceiving their users.

This is part of a broader trend that is especially pronounced online. It seems that advertising these days is all about deception! Not long ago, I saw a Google ad that contained text similar to the following:

I thought this was pretty neat. Check it out!

It's written to sound like a personal recommendation from a friend. It is specifically designed to override the "I should be suspicious of this entity" impulse that many people (most, hopefully) get when somebody tries to sell them something. It's an advertiser masquerading as a friend!

Have the people in advertising simply lost all sense of decency? I don't remember it always being this bad. I hope they don't wonder why people use things like Adblock.


See the story at LWN. "Oh no, our mobile platform didn't corner the market overnight! Better start over from scratch!" What the hell, Intel? I would be glad to see the Linux-on-mobile-devices efforts come together, but they're gutting the platform. Goodbye Qt/QML, hello DOM/JS! If I were a mobile application developer, I wouldn't even consider developing for this platform. Just look at how well it paid off for Tizen's predecessors, Maemo and MeeGo. Heck, MeeGo didn't even reach its second birthday! Bah!

Fedora and GNOME 3: A Tale of Frustration

I typically run Kubuntu with KDE, but I do give other distributions and desktops a try from time to time. One distribution I keep coming back to is Fedora.

I installed Fedora 16 with the GNOME 3 desktop a while back. I had fairly high hopes for it. Fedora has, traditionally, annoyed me. However, the last release I tried (11? 12? Something like that.) was considerably less annoying. I saw this as a sign that things were improving. Sadly, my hopes were quickly dashed.

Fedora (or, "Testing? What's that?")

The first problem I encountered with Fedora itself was that yum and RPM are still slow. Rather obnoxious, but at least it's not something that bites me every day. Also, the fact that I still have to specify a root password seems rather quaint. Again, a fairly minor quibble. The PackageKit-based software installation tool, though, has one quirk that really pisses me off. When you tell it to install some software, it sits around for a while as it figures out the software's dependencies. If it determines that additional software needs to be installed, it will pop up a dialog box to inform you of that. Accept the additional software, and it prompts you for your password. Now, I have a fairly complex password, and I tend to type it quickly, so sometimes, I make a mistake. If you mistype your password in the password prompt, it tells you that you got it wrong AND THEN DISAPPEARS. Yes, you have to start over from the point where you told it to install the software. PackageKit has to calculate the dependencies and tell you about them again before it lets you take a second stab at entering your password. Who the hell thought that was a good idea? Did nobody test it? Oh, and after my first software update, it told me I had to log out and log back in. It offered to log me out. I clicked the "Log Out" button. Nothing happened.

The real frustration started when I tried to upgrade to Fedora 17. I had assumed that Fedora would notice that there was a new release and offer to upgrade. Nope! So, I had to do a Google search for the answer. Apparently, there are three ways to do an upgrade in Fedora:

  1. Burn an install disc for the new version, boot from that, and do an upgrade installation.
  2. INSTALL A NEW PIECE OF SOFTWARE (preupgrade) and run it. After it downloads everything you need, restart and make sure to select the "upgrade" option in the boot menu.
  3. Do a bunch of housekeeping, tell yum to switch to the new repository, and then update. Oh, and pray that it works, because this method is not supported.

Don't believe me? It's all right here.

I decided that the first option had the lowest chance of failing miserably. So, I downloaded a Fedora 17 image and used a tool in Fedora to write it to a USB memory stick. I had to start the tool with a special flag because it didn't like some aspect of the memory stick's MBR. Also, I discovered that the tool can download the Fedora image for me, but it only offers Fedora 16 and earlier. NOT SO HELPFUL. I finally booted the memory stick. I was offered two choices: try Fedora or Install Fedora. OK. Install. It asks me for my disk encryption password, does a bit of poking around, and then it asks me to set my root password. What? I already have a root password! Why do I need to set one? Is it really doing an upgrade, or is it about to blow away my Fedora 16 installation? WTF?

OK, screw that. I decided to use Preupgrade. It didn't give me any BS aside from the part where the "perform upgrade" option in the boot menu wasn't the default. Thankfully, I was paying attention and was able to select it before the menu timed out and booted Fedora 16. After a long time, the upgrade finally finished, and I rebooted into Fedora 17. Yay! Unfortunately, my troubles were not over. The main problem was that the Fedora 17 kernel apparently wasn't installed (see the list of known Fedora 17 installation bugs). Since Fedora 17 consolidates the various binary directories under /usr, running a Fedora 16 kernel means that the system will crash hard when you try to shutdown, since important things like sh aren't where it expects them to be. Apparently, you need to manually enable the Fedora 17 updates repository. Well, I did that, and the Fedora 17 kernel is present, but it's not in the boot menu. On Ubuntu/Kubuntu/Debian, I would run update-grub, but that doesn't exist on Fedora, and I have no clue what the local equivalent is. Oh, and did I mention that I started from a nearly-pristine Fedora 16 install? Well, I did. I didn't install anything "weird". I installed Gwibber, the USB stick tool, and Preupgrade. That's it. Did anybody test this shit? Ever?

Lastly, when a piece of software crashed, I tried to report the crash. Since I'm fairly security-conscious, I tried to extract a stack trace from the core dump myself instead of sending the dump to some server somewhere for trace extraction. The Fedora crash reporter tool claims to do this for you. In reality, its attempt to download and install the debugging symbols failed with an error message that amounted to "It didn't work." Gee, thanks. I gave up on trying to report the crash.


GNOME 3 (or, "Do as you're told.")

So, Fedora itself pissed me off quite a bit. That's not the end, though. Oh, no, not at all. GNOME 3 is a...I don't even know what to call it. Instead, I'll just run through a list of baffling design decisions:

  1. If you use multiple desktops, you will find that they are all in a single column. NO GRID FOR YOU!
  2. Multiple desktops are created by opening at least one application window on the empty desktop. Want to statically define, say, four desktops so you can have an arrangement like "first desktop is for coding, second is for documentation, third is for communications, fourth is for entertainment"? Too bad!
  3. Closed the last window on a desktop other than the first one? GNOME will "helpfully" pop up the "start a new application" overlay...dashboard...thingy. Oh, you didn't want to start a new application? You finished what you were doing and wanted to go back to your other desktop? OK, just press the shortcut key or click on the desktop at the right. Will the overlay/dashboard/whatever now get out of your way now? Nope! You have to manually dismiss it!
  4. Want to shut down? No, you don't. The GNOME developers have decreed that you do not want to shut down. Unless you know the secret (open the menu in the upper right and hold down the ALT key; that will make "Suspend" turn into "Power Off".
  5. Want to change the visual style? Too bad! There's nothing in the control panel that does that. I hope you like digging through GConf! I don't know if this is GNOME's fault or Fedora's fault, but it's quite annoying.
  6. Have a Google account? Great! Just go to "Online Accounts" and log in; GNOME will set up your email, calendar, address book, and chat accounts for you. Neat! Unfortunately, it won't show your Google Calendar in Evolution, nor will it produce reminders for events on your Google Calendar. You have to enable that yourself. Oh, and after a while, Evolution decided that it really needed me to type my Google password in order to fetch email. Why? Because. Also, it won't make Empathy (the GNOME chat client) start at login. You have to do that yourself. Why? Because.
  7. Want to set up Empathy to start at login? Good luck.
  8. At one point, Evolution somehow managed to render the entire GNOME shell unresponsive. After about half an hour, I tried pressing Escape a few times. The greyed-out dialog (hint: greyed-out things generally don't respond to key-presses) disappeared, and all was well again. The event that triggered all this? I enabled reminders for my Google Calendar.

On top of that, I took a look at Planet Gnome today and found this and this. The former is essentially "Stop complaining; it's just a few rough edges." The latter is "I don't find it obnoxious. Therefore, there is nothing wrong with it. QED." Here's the real WTF: in the second one, the guy says that it makes little sense to have a menu entry for "shut down" when there's a hardware button to do that. Guess what happens when I press that button on my netbook? That's right. It goes into suspend mode. *FACEPALM*

It feels like GNOME's attitude is that you are an idiot who doesn't know how to use a computer properly, so you should just shut up and do as you're told. Well, this is what I think of that:

The Finger

In Conclusion...

Fedora's developers don't seem to care, so why should I? GNOME's developers, on the other hand, seem to care too much. Fortunately, there is a solution. I find it quite effective.

C# Bitwise AND WTF

using System;

namespace BitwiseAndWTF
    class MainClass
        public static void Main (string[] args)
            byte b1 = 0x01;
            byte b2 = 0x02;
            byte b3 = b1 & b2;

The above program WILL NOT COMPILE. Why not? Because b3 is of type byte, and you can't assign it the value of an int. That's right. A bitwise AND on two bytes gives you an int.

Why does this happen? I don't know, but I can guess. Section 14.10.1 of the C# specification suggests that the bitwise operators are only defined for int, uint, long, and ulong. Presumably, the byte variables are being automatically promoted to int. Thus, the result is an int.

Bonus WTF: byte is unsigned. int is signed.

Picard Facepalm