Archive for the ‘Computer’ Category

“Erroring off?”

Wednesday, July 23rd, 2008

Has anyone told you that a program is “erroring off” or that some system “errored off?” Occasionally I have the pleasure of receiving such notices and every time it makes me cringe.

Let me explain something. “Error” is not a verb. You can’t error. It’s not possible. When you type “erroring” it has a red wavy underline for a reason.

You can err. “Erring off” is at least valid English, but I’m not sure what purpose the “off” serves. “Erring” works by itself.

Or you could just use one of the industry-standard terms, like

  • crashed,
  • failed,
  • went down, or
  • is unavailable.

As a bonus, most of these actually convey the nature of the problem. The only information “erroring off” conveys is that you not only don’t know exactly what went wrong, but also have a substandard grasp of the English language.

Three-column CSS layout

Monday, July 7th, 2008

There are many established CSS layouts for doing a three-column website. They seem to work pretty well. Perhaps the most popular is the Faux Columns technique.

At work we are working on an internal site that requires three columns (or to be more precise, up to two sidebars). I have never been completely satisfied with the many existing three-column hacks so I decided to roll my own after laying out some requirements:

  • The unstyled page should look decent (primarily for mobile browsers). This includes having the sidebars come after the main content in the HTML source.
  • The sidebar backgrounds should extend down to the header, without using any background image tricks.
  • IE7 and FF2+ must render the layout correctly. Minor defects are ok in other browsers.

The sidebar backgrounds have always been the tricky part, but I have a non-image solution for IE7 and FF2+. It also works in Safari.

IE6 does not extend the background colors to the footer, but it does correctly position the sidebars at least. After a bit of hackery anyway. Apparently IE6 doesn’t correctly compute the correct X position for absolutely-positioned elements. left:0px was making the left sidebar overlap with the content. I replaced this with float:left and IE6 positioned it like the other browsers, and thankfully the other browsers continued to position it in the same place. So as a bonus, no IE conditional comments were required.

Anyway, here it is. I am releasing the CSS and HTML source to the public domain, but if you reuse the code a link to this post would be appreciated.

Linux Virtualization

Thursday, June 26th, 2008

I’ve been using VirtualBox for some months now. It’s pretty slick and doesn’t get in my way too much. Just for the heck of it I’ve been experimenting with a few other similar systems: OpenVZ, vserver, KVM, and Xen. OpenVZ and KVM are the only two I’ve tinkered with long enough to at least have a clue what’s going on.

I was trying KVM at the suggestion of someone in #debian who seemed to like it a lot better than VirtualBox. After playing with KVM I’m not sure where this opinion came from. Just getting KVM and libvirtd to the point where I could actually run a VM took over a half hour. The virt-manager GUI looked nice but was buggy in some spots, and the lack of guest OS drivers meant that many things were a bit sluggish. On the plus side, networking was much easier to setup — but only sometimes. (If you add a network card *after* creating a VM you cannot choose which mode to run it in and are forced to use usermode NAT.) Another cool feature was emulation of a tablet pointing device in addition to a regular mouse device. This means that KVM doesn’t need any guest drivers for mouse integration, because it set the pointer position using the tablet.

At the end of the day, VirtualBox still wins for desktop virtualization. I’m still keeping KVM on the radar though.

You don’t have signal

Monday, June 9th, 2008

My DSL and phone service is due to be activated today. When I got up I had dialtone, which is a good sign. But a few days ago I had an interesting encounter that was just too humorous not to share.

On Thursday the DSL modem showed up but since I was spending the night at my parents’ house I didn’t tinker with it too much. Friday night I unpacked it and hooked it up. To my surprise it actually found DSL signal, but obviously failed on PPPoE authentication since I did not have my account information. I went out and got a cordless phone to see if I had dialtone, hoping to call AT&T customer service and get my DSL account name and password early. Of course I forgot that I needed to let the handset charge for a day. So I copied my order number and other info down and headed into the back room where I get good enough wireless signal from my neighbors to make Skype calls on my Pocket PC and called them up.

After giving her all the relevant numbers I explained the situation — that I had DSL signal and would like to try to connect. Hilarity ensued. This is a rough paraphrase of the conversation:

Me: My modem says I have DSL signal. Can I get my account info early?
AT&T: Hmm, I see here your line will be set up Monday, correct?
Me: Yes, that is the scheduled date.
AT&T: Do you have a dialtone yet?
Me: I have no way to check that yet. I don’t have a working phone.
AT&T: Well, if you don’t have dialtone then you cannot have a DSL signal.
Me: My modem says I have DSL signal. The DSL light is green and the modem diagnostics report that I have signal.
AT&T: What happened when you plugged the modem in?
Me: The DSL light flashed red for a few seconds, then it flashed green, and now it is solid green.
AT&T: Ok. It was flashing red — that means you don’t have signal.
Me: Well, it changed. It is not flashing red now, it is solid green.
AT&T: Yes, but it was flashing red when you plugged it in, and you don’t have dialtone, so you don’t have signal.
Me: I never said I don’t have dialtone… the modem is telling me that I have signal.
AT&T: That’s not possible, your line is not connected. You don’t have signal. That’s why the modem light was flashing red.

Around this point I gave up. Not so much out of frustration but I just could not believe what I was hearing. I could have understood refusal based on policy or simply that the person responsible for creating accounts had not yet created mine. But blatant denial of information presented to me by my equipment is ridiculous.

At least it makes for a good story…

Banshee, meet OpenVP

Wednesday, April 30th, 2008

OpenVP, Banshee.

A week or two ago I was in #banshee chatting and posted a link to an album of some OpenVP screenshots. The developers were interested and asked me if I would try embedding OpenVP in Banshee. I have since submitted a patch that adds an interface that PlayerEngine classes can implement to become a visualization source, and also implements this interface on the GStreamer backend.

Once OpenVP is library-ized there will be a second patch adding an OpenVP extension, which will make Banshee do something like you see in the above screenshot. Probably not exactly as you see it there, since I’ll probably want to “take over” the Now Playing window and render there instead.

Basically what I’m saying is that all the ugly plumbing is done and right now it works. It just needs polish, and hopefully it’ll be ready when Banshee 1.0 is.

Bluetooth presence detection

Monday, April 14th, 2008

I recently found my USB Bluetooth adapter and have been tinkering with using it to talk to my Palm. I’ve successfully configured Linux to allow PPP connections over Bluetooth, so I can sync my Palm if I don’t have the cradle hooked up.

But a more interesting use for Bluetooth is presence detection. BlueProximity is a project that will establish a connection to a device and use it to trigger Gnome’s screensaver. When you leave the room the screensaver locks, and when you come back it unlocks. Nifty idea in theory, but it renders my Palm useless while I’m in the room — it displays a “Connecting” dialog that blocks use of anything else. While BlueProximity can be disabled with a few mouse clicks, why would I want to go through the hassle of disabling and enabling something that’s supposed to make my life easier? It’s far fewer steps to, say, hit a key combination to lock and enter my password to unlock.

But it’s not always necessary to make a connection. hcitool allows you to, for example, query device names by Bluetooth address. If it can get a response we assume that the device is in range. I’ve employed this technique in a script I’ve been maintaining over some years for myself. I trigger it from cron at certain times and it raises my volume to 90% and loops over a Spin Doctors song — a pretty effective alarm clock. What if I get up early and leave though? My neighbors probably wouldn’t appreciate hearing music that loud that early until I get back (however good the music may be). So last night I added a conditional that checks if my Palm is in range of my computer. It will only continue if it sees my Palm. And since I take my Palm everywhere, leaving my dorm room effectively disables my alarm clock. Neat.

I wonder if BlueProximity could be patched to allow picking between connection-based and name-discovery-based detection. This kind of tool has a lot of cool applications, such as setting Pidgin away when I leave and setting it available when I get back.

Better would be a “presence” D-Bus service that could be configured using a variety of presence-detection systems (such as checking for a Bluetooth device) and would fire an event when the user leaves or returns. Any interested application could be notified of user presence changes.

Chris’ Tasks, now with OpenID goodness

Sunday, March 30th, 2008

My web-based task manager now supports OpenID as a login mechanism. Have at it.

gnome-terminal cursor

Friday, March 28th, 2008

The latest release of gnome-terminal has removed the ability to disable the blinking cursor, which I had previously turned off. The only way to disable it is to disable blinking cursors in all text entry widgets. For some reason I prefer the cursor in text boxes to blink, but cannot stand a blinking terminal cursor. Every blink jars my mind and I lose focus, like someone’s looking at me waving his hands and yelling “hey!” every second.

Blink. Blink. Blink. Arrrgh.

Anyway, since the developers saw fit to remove this feature presumably under the GNOMEism of “keep things simple, users be damned,” I have coded a quick patch to permanently disable cursor blinking in gnome-terminal.

As frustrated as I am at what I think is a stupid decision, at least this is free software.

Chris’ Tasks

Thursday, March 27th, 2008

I’ve started a web-based task manager to get some experience with Prototype. It’s very fast so far and is relatively easy to build upon.

This week

Friday, August 17th, 2007

All in all this was a pretty good week. My new job has been a lot of fun and it feels good to finally have a job where my skills are being used. The team has been very welcoming and are fun to work with.

My computer is back alive too… actually it was sometime before Monday but I don’t recall exactly when. Anyway, it’s quite zippy now. I also got a new 300GB drive at Fry’s, so I now have over a half terabyte of storage.

And on that note, I’ve been thinking today about filesystems. We have some good Linux-native filesystems like ext3 and reiserfs, and Windows has NTFS, but there is only one filesystem that both Windows and Linux can reliably read and write: FAT. But FAT has some irritating limitations, such as a maximum file size of 4GB. This is not optimal for use on a dual-boot system, but it’s the best option right now.

Has anyone looked at the possibility of designing and implementing a filesystem specifically designed to be portable between operating systems? Sure we have ext3 drivers for Windows and NTFS drivers for Linux, but neither of those options are really attractive. I’d like to see someone design a filesystem that works first to the lowest common denominator: store files. After that is finished more features could be added in a multiplatform-sensitive manner. For example, allow file metadata to be stored in some sort of tree dictionary, so each operating system could have its “own” set of metadata. Linux and Windows could store permissions there without clobbering the other’s data.

Even taking an existing filesystem like ext3 and modifying it for this purpose would be really handy, especially if the existing ext3 driver could handle it without destroying the metadata for other operating systems.

Just a thought. Comments welcome as usual.