Compiz Cube Not Working?

I just set up Compiz on my machine at work, hoping to be able to take better advantage of virtual desktops given my limited screen real estate. (“Limited” meaning “only two monitors.”)

One of the most oft-discussed effects is the “Cube,” in which you have four desktops and can spin around them like a cube. It was enabled, but didn’t work. I vaguely recalled having this problem when I set it up at least a year ago here at home, but couldn’t remember what it was.

I’ll need to wait until Monday morning to confirm, but I think it’s something silly: enabling the Compiz Cube effect doesn’t give you 4 virtual desktops, or even check if they exist.

gconftool-2 --type int --set /apps/compiz/general/screen0/options/hsize 4
gconftool-2 --type int --set /apps/compiz/general/screen0/options/number_of_desktops 1

That’s being recommend, and seems to work. Both of mine are currently set at 1, so there’s nothing to spin. (BTW: if you set it two, it’s a flat 2D object that spins instead of a cube.)

Yet to be tested is what happens when you do this with dual monitors. Do you get an awesomely-huge cube?

Also: if you’re looking for the Mac Expose equivalent, and are confused when the “Expose” plug-in for Compiz just shows you a zoomed-out view of all your desktops… You really want the Scale plugin, it seems. Shift Switcher gives something somewhere in between Cover Flow what Vista can do; something else to check out.

Really, though, I “lose” windows a lot, when they become buried under others, so I think this is going to be a boost to my productivity.

“Accidents”

It seems that in Ohio, water supply officials accidentally dumped 40 pounds of hydrochloric acid into the city’s water supply. How do you do that accidentally, you might ask?

Apparently, you buy 40 pounds of fluoride, but the vendor instead gives you 40 pounds of hydrochloric acid. This raises a few questions, though:

  • Is the supplier actually so careless in handling 40 pounds of hydrochloric acid that they were able to confuse it with fluoride?
  • As the worker dumped what he thought was fluoride into the water system, he didn’t think, “Man, this really burns my hands?” Or did he just get dissolved by the acid and slowly dissolve into the water supply?
  • We didn’t really get to play with hydrochloric acid in science class, but don’t you get some fairly nasty reactions if you just dump acid into water? Again, no one thought it was strange that the fluoride began hissing furiously?
  • Does this vendor also supply “fluoride” to my dentist?”

25 Things About Other People

I never got into the “25 Things About Me” Facebook meme. I brainstormed maybe half a dozen things, but really didn’t feel like doing it anyway. But instead, I got a great idea: pull in a bunch of other people’s “25 Things About Me” lists and let a Markov chain script munge them a bit. Without further ado, 25 probably-not-true things about other people:

  1. I grew up in a weird mood.
  2. I have a strong knowledge of French and I have chips from about 20 places in 9 different states.
  3. I’m obsessed with managing money and credit… along with all my favorite alcoholic beverages.
  4. I don’t have many regrets, but I love Paula Abdul.
  5. I’m on the floor or in bags. My dresser is empty.
  6. I feel so tingly thinking about Harry. Harry’s my bff.
  7. My Blackberry is my Nana Barbara. She’s like a best friend almost.
  8. I like to throw up all over myself and then get laughed at when I could live without my sister.
  9. I’m so glad I gave up crack.
  10. I have not lived in East Hampton, NY since I was 5 but I get the extended warranty with it.
  11. When I sing, generally I am a raging liberal and believe pot should be legalized.
  12. I miss the BG drama club and all the sushi ladies. Not seeing them frequently makes me want to own 3 dogs, 2 cats, 2 mice, 1 parrot, and 4 parakeets when I buy electronics.
  13. I’m a fat kid, and I’m going to the seminary.
  14. I’ve only dated one person more than a few seconds.
  15. My motivation for doing homework is starving myself.
  16. Whenever I eat cinnamon sticks raw. They are delicious and flavorful.
  17. I cry at the 5th largest public accounting firm.
  18. I have a 5’x3.5′ bookcase in my music folder with the simple fact that there are an awful lot of big city fires.
  19. Three summers ago I sold off my entire life.
  20. I don’t really want kids I could be potentially dying. Its so fun!!!
  21. My parents are terrified that someday I’m going to the beach. The ocean reeks of death…
  22. I have a breakdown. I pretend to be an actuary.
  23. Myspace is wicked creepy but I still choose a version of BASIC as my programming language.
  24. Until I realized that Barack was who I wanted to be deathly afraid of bees and most other bugs.
  25. I make sure people eat their veggies, wear a coat, and watch TLC 24/7.

WPMU and APC Error

One of the worst types of errors to track down, I think, is one that happens in a blue moon and doesn’t seem to happen in response to anything particular. Here, I’ve been trying to hunt down why, every month or two, WordPress starts serving nothing but blank pages, yet not logging any errors, and why restarting Apache fixes the problem.

The main page isn’t affected, since it doesn’t use WordPress or APC (it’s some custom code I wrote that goes right to the database), but every other page on the site comes up blank. Server-wise, everything is fine: no parameters at all are different. The load’s low, nothing’s been changed, memory usage is fine, and so on. The logs seem to suggest that pages are being served just fine.

I just made a small bit of progress: logging into the APC (Alternative PHP Cache, not the UPS company) console and flushing the opcode cache fixes the problem. I always had a hunch it involved a cache somewhere, but I looked more at WP Super Cache than at APC. I still haven’t solved the problem, but now I know where to look.

Checklists

I came across this article in the New Yorker’s Annals of Medicine column, and found the conclusion to be pretty amazing. The article reminds me a lot of a Malcolm Gladwell piece, in that it’s a bunch of fascinating statistics about a subject that most writers would struggle to make sound interesting, supported by a handful of equally-interesting stories.

It makes the case for checklists in hospitals. I initially assumed that it was like most medical terms, in that the name intuitively elicits imagery of something entirely unrelated to what the term actually describes. But that’s not the case here. It talks about having a five-item checklist for the steps to take while installing a “central line” on a patient, something that’s a cakewalk for trained surgeons. Many doctors protested, finding it demeaning. But the results?

The results were so dramatic that they weren’t sure whether to believe them: the ten-day line-infection rate went from eleven per cent to zero. So they followed patients for fifteen more months. Only two line infections occurred during the entire period. They calculated that, in this one hospital, the checklist had prevented forty-three infections and eight deaths, and saved two million dollars in costs.

I haven’t stolen the article’s thunder, either: it gets better. Maybe it’s just for people like me, who find boring things fascinating, but I can’t help but be struck by how something so ridiculously simple that doctors are offended by it can save so many lives and so many millions in costs.

By the way, this all comes from a silly Ask MetaFilter thread, What are innovative ideas for healthcare to save money, increase efficiency and improve outcomes?

Bad Blogs

When I started blogging many years ago, I started by posting mundane crap. “Today was boring and I had a quiz in Algebra.” I soon realized something, though: no one cares. Heck, even I didn’t care. Yet I still find blogs that are personal journals on the Web, making no effort to be interesting, or even explain who Sally and Freddy are when discussing the drama between them at lunch.

But what I find myself noticing increasingly often is people who share their opinions on evertyhing. I haven’t been shy about my opinion on who was more qualified to govern us, or on what websites are worth visiting. But how about the lady who just had octuplets on top of already having six kids? Yeah, she sounds crazy. But who cares about my opinion about some lady having babies? If she can raise them, great. If not, well, shame on her, but that holds true for any person having any quantity of babies, anywhere. Does anyone care about my opinion on that? For that matter, isn’t it creepy for me to have an opinion about the parenting prowess of a women I’ve never met, and whose name I don’t know, or even care to know?

STORIES BY DAVE SECRETARY

I’m really at a loss to describe the what or how, or the why they’re funny, but these stories by davesecretary are oddly hilarious. The all caps is annoying for a minute, but then you start to get used to it, and it becomes just another entertaining aspect of the stories. I happen to think the first few are so-so, but they quickly get better. I guess you have to be in the right mood to appreciate them.

Maybe not quite as innately hilarious as David Sedaris’ Six to Eight Black Men story, but still, an entertaining read if you’ve got some time to kill.

ISPs and Mirrors

Here’s something I’ve never understood… Why don’t ISPs run mirrors of popular things for their clients? I’m having Debian update its package info, and it’s taking a while because it’s seemingly using a crappy mirror. I can customize it–and will do so later–but I’m left wondering…

From my perspective, it’d be great, because it’d be closer to me and presumably faster. But from my ISP’s perspective, it’d be an even bigger win, because it would be bandwidth that never left their network, lowering their bandwidth bills. I’m sure that work with various Linux distros doesn’t account for that much of Comcast’s (or any other ISP’s) bandwidth, but I’m equally as sure that I’m not the only Comcast user that ran an “apt-get update” today on Debian Lenny. (In fact, Debian and Ubuntu desktops both go out daily to automatically update package listings?)

And it’s not like it’s huge overhead, either. Set up a single server with a few hundred gig of disks, and it’ll merrily keep everything up to date on its own via rsync. Put one in each of your major POPs and you’re done. Maybe $10,000 invested total.

As long as you’re at it, set them up with ntp. It’s always seemed like something an ISP should do. Those are much more accurate if they’re closer. (Northeast Comcast users should note that Comcast appears to peer with MIT; MIT’s public bonehed.lcs.mit.edu is about 8ms away from me.)

Cruft

I’m a pretty firm believer that, after several years, computers build up enough cruft that you need to start from scratch. With Windows the machine has gotten unbearably slow and there’s never enough disk space. With Linux, you’re running something really old, or just itching to try something new. With any OS, you’ve got a bunch of strange problems that have come up and you’ve just come to accept as normal.

These new installs tend to be great excuses for getting new hardware, too. Might as well hold off for a new hard drive if you’re short on disk space, and that way you don’t have to wipe anything. And you might as well upgrade to 4GB of RAM before you install a new OS.

I’m at a crossroads, though. I live in a UNIX world. I work on Linux at work all day. I come home and my computer runs Linux. I work on my website, running on a Linux machine. I love Linux, but it’s a little bit of a love-hate relationship. It has a few quirks that get under my skin. But going back to Windows would make no sense for me. I suppose I could maintain Linux boxes from a Windows machine, although it’s silly. But I’m way more comfortable in Linux these days anyway.

A lot of my coworkers run Macs, and it’s something I’ve been tempted by for a long time. It’s stable, slick, and it’s based on BSD. What’s not to like? Well, what’s not to like is the price. “OSx86” solves this (although it’s effectively software piracy), but sources say that it’s kind of like trying to install Linux 10 years ago: you’d better know every piece of hardware in your machine, and be comfortable finding and installing drivers for it.

My other battle is whether I want a laptop or a desktop. I love my Thinkpad, but I want a much bigger drive (RAID, really), and a 14.1″ LCD is comically small. And I’d like to start doing more with virtual machines, but this would require some more RAM.

I played with pricing. I can build a quad-core system with a few big SATA disks and onboard RAID (I think RAID 5 is even an option), 8 GB RAM, and a 22″ LCD for under a thousand dollars. That’s less than the cost of an entry-level Mac. (Excluding the Mini…)

But at the same time, I found a few potentially great upgrades to my laptop. A 128 GB SATA disk can be had for $200-300, and it’d cost about $50 to upgrade my Thinkpad to 4GB RAM. (From 2GB.) The jury’s still out on whether a Thinkpad T60 will see the full 4GB; some reports say that something in the BIOS or part of the chipset won’t go past 3, but others seem to suggest that the people saying that are just running OSs that can’t see 4GB on a 32-bit box.

So I’m more confused then ever about what I want. Should I upgrade my laptop or buy a new desktop? And, whatever I do, what is it going to run?

MySQL Replication Lessons Learned

A couple things I ran into today that I want to keep searchable here in case I run into them again, and that I figured might be useful to someone else someday:

Let’s say that you take down a MySQL server that’s a replicated slave to do a memory upgrade, and it takes a really long time to shut down, and then you find that the machine doesn’t like the “new” DIMMs, so you throw the old ones back in and power it up. Just hypothetically. You then restart MySQL and issue the START SLAVE command, but it dies with an error:

090127 14:53:17 [ERROR] Failed to open the relay log './mysqld-relay-bin.000023' (relay_log_pos 23726)
090127 14:53:17 [ERROR] Could not find target log during relay log initialization

The relay log and position were both wholly wrong. I poked around, and found a lot of people who ran into this; it seems to be a data corruption issue, but also happens occasionally on a reboot. There’s a bunch of suggested fixes out there that don’t actually work. One thing that does work, though, is deleting the relay logs on the slave. (Any time someone on the Internet tells you to delete a file, you should, of course, think “move to another directory” instead so you can undo it if need be.) Once I deleted the relay logs, it started right up.

Lesson #2? Now you’re about 6,000 seconds behind the master, and the replication lag counter is going down at a rate of about 1 second per second. You can wait a couple hours. That seems pretty pathetic, though.

If your to-do list reads, “1.) Get slave running, and then 2.) Fine-tune my.cnf, currently stolen from another machine,” there’s a chance that you have sync_binlogs=1 set. This is bad for two reasons: the first is simply because of what it’s designed to do: flush the binlog to disk on every write. This is very safe, but also very slow. But the second reason it’s bad is that it’s apparently especially bad on ext3, so it’s doubly important to not use this option, at least not when write performance is important.