Caffeinated Bitstream

Bits, bytes, and words.

Posts

Customizing the Mac Dashboard calendar widget

It turns out that it's not too hard to customize the dashboard widgets that come with Mac OS X, since they're implemented in HTML and Javascript. You can just copy the stock widget from /Library/Widgets to ~/Library/Widgets and go to town. In the above picture, you can see how I've hacked the calendar widget to show week numbers.

Update, April 7, 2011: Due to popular demand, I've posted a diff of my changes here, based on the Snow Leopard calendar. Copy the calendar widget into your home directory (~/Library/Widgets) and rename it to wwCal.wdgt.


HTC EVO and background network activity

HTC EVO, shown with the optional extended-life battery.

Earlier this year, I ditched my antiquated Treo 755p for the new hotness in mobile phones—the HTC EVO, an Android phone available from Sprint. Unlike my previous phone, which would last a full week in standby without recharging, the EVO gulps battery like there's no tomorrow. In fact, the limited battery life has been the primary complaint about the phone. Nobody seems to know for certain why the battery life is so poor. Maybe it's the beefy 1Ghz Snapdragon processor, the large LCD screen, or something else entirely.


VFD Clock

I decided I needed a clock in my living room, and remembered I had this Matrix Orbital VFD2041 vacuum fluorescent display in my junk box, so I whipped up a few lines of C code to make it show the current time. The VFD connects to my home theater PC via its RS-232 interface and a USB RS-232 dongle.

Here's the source:


Multimedia and bandwidth

Back in the 1990's, I predicted that all data-oriented utilities — telephone, television, radio, etc. — would eventually become Internet services. Today, the world is rapidly approaching this ideal as people ditch their POTS telephone lines for VoIP and their cable television subscriptions for streaming video. This disruptive technology has created tension in the industry as old-school telecommunications companies cling to their non-Internet services out of fear of their infrastructure turning into “dumb pipes,” while other companies are lining up to provide services over the Internet. Discussion of this disruption usually turns to the subject of bandwidth — the measure of the telecommunications infrastructure's capacity to deliver these services to users.


Firefox Selection Applet

After writing the ffremote.py script to help open links in the correct Firefox instance, I decided that it would be really nifty to develop a simple GNOME Panel applet to manage browser instances. (Again, not browser windows, but browser instances—completely separate Firefox processes running with distinct profiles and settings.)

When you click on the applet's icon, a menu is presented which lists the running browser windows and their associated profiles, as well as profiles which are not currently running. If you click on an item representing a running browser window, the window will be raised to the foreground. If you click on an item representing a non-running profile, a new Firefox instance will be launched with the selected profile.


Opening links in the correct Firefox instance

I'm often running multiple instances of Firefox on my desktop. Not just multiple windows, but multiple instances, with each associated with a different Firefox profile. I do this so I can have one instance running with the default profile for normal web use, and another completely separate instance running in an alternate profile loaded with development tools such as Firebug. This way, I can use different settings for certain development work, and if the development tools go haywire and interfere with the browser, they don't affect the Firefox instance I use for "normal" web browsing. I selected a different theme for the development instance, so I can visually tell them apart on the desktop.


Lowercase hexadecimal hack for GNU bc

I frequently use the command-line GNU bc calculator to do quick arithmetic while debugging C programs. An ongoing annoyance is bc's insistence that the hexadecimal digits A-F must be entered in uppercase. Other software, such as GDB and printf("%p",...), output lowercase hexadecimal digits, which keeps me from cutting and pasting the values into bc. Manually typing the values can be a big time sink when I need to perform a lot of calculations.


Forcing GNOME Terminal to use ugly fonts

I decided to try using GNOME Terminal with ugly fonts — that is, bitmap fonts which are not anti-aliased. The goal of this experiment was to improve terminal performance when scrolling large amounts of information in a big window. At the end of the day, the performance was not improved in my case. (I have my monitor rotated 90° for a portrait display, and I think my use of rotation may be a bottleneck for my graphics throughput.) However, I decided to keep the ugly fonts anyway, since it seems to allow me to use smaller fonts without sacrificing legibility.


GNOME Terminal friendly clipboard patch

The presence of multiple "clipboard" selection buffers in the X Window System has long been a source of irritation with me, and I frequently end up pasting the wrong thing. A few years ago, I hacked the xterm terminal emulator program to always copy into both buffers, and this solved the problem for me. However, I've been playing around with GNOME Terminal lately, so I recently patched its source code to do something similar.


The Java user experience

A friend of mine wrote an interesting blog post advocating the use of Java for rich internet applications, and expressed frustration with its lack of Web 2.0 mind share. This got me to thinking about how a lack of polish often seems to hold Java back, and I wrote the following comment in response. (I'm reposting it here because, yeah, I'm just that desperate for blog material.)

Technically speaking, I think Java could make a killer platform for the sorts of applications you're describing. I quite like Java, and I'm especially looking forward to the improved dynamic language support that Java 7 is supposed to offer.