Tuesday, December 30, 2008

Fix: InvocationTargetException in Eclipse while using CVS

I ran into an issue while using Eclipse 3.3 today where Eclipse was throwing a java.lang.reflect.InvocationTargetException while trying to get another version of a project using Eclipse's built-in CVS client. I initially encountered the error after pressing the "Refresh Tags" button on the "Replace with Branch or Version" dialog.

InvocationTargetException thrown by Eclipse trying to do a 'Refresh Tags'

Some brief experimentation revealed that I wasn't able to do any CVS operations from within Eclipse. Either I would get the above error, or else the operation would just silently fail.

Checking the Eclipse log file (at workspace\.metadata\.log) showed that a "Connection refused: HTTP/1.1 403 Forbidden" error was occurring whenever I tried to perform a CVS operation.

This error message turned out to be the key; there was an issue with Eclipse's proxy settings. In the Preferences dialog (Window menu | Preferences), under General | Network Connections, in the "No Proxy for" section, I needed to add the hostname of my CVS server.

After adding the hostname of my proxy server in the Network Connections section of the Preferences dialog, CVS operations in Eclipse once again stared working properly.

Thursday, December 04, 2008

Adding a 3rd Monitor to a Laptop

Back in September, I set up about researching how I might be able to add a 3rd monitor to my laptop PC at work, a Lenovo (IBM) ThinkPad T60.

The built-in video card on the laptop PC, an ATI Mobility Radeon X1300, supports only dual monitors.  The card can run the built-in laptop LCD display plus one external monitor, or two external monitors (via the additional DVI port on the machine's docking station), but not two external monitors and the built-in LCD at the same time.

Since simply opening up the case and popping an additional video card into a free PCI-e or PCI slot isn't an option with this laptop machine like it would be with a desktop machine, I considered several alternative solutions:

Docking Station PCI Card

I first considered purchasing a new docking station, the Thinkpad Advanced Dock, which supports adding a standard PCI-e card directly to the dock; then plugging a PCI-e video card into the dock, and running the 3rd monitor off of that. 

However, this solution was cost-prohibitive (around US $380 for the dock -- not including the cost of a PCI-e video card).  I also ran across multiple reports from Thinkpad owners trying and failing to get this solution working on the official Lenovo forums (particularly in this thread).

PCMCIA Video Card

Next, I looked into the possibility of getting a PCMCIA video card for my laptop's free PCMCIA slot, such as the VillageTronic VTBook

However, I was somewhat concerned that the card might "stick out" of the side of my laptop, making the laptop a hassle to carry around with the card installed.  I was also concerned about potential difficulties with docking/undocking the machine (which I do a few times a week) while using the card.  Finally, the VTBook solution was also somewhat cost-prohibitive (around US $250).

My solution: USB Video Card

The solution that I finally settled on was to purchase a USB 2.0 video card.  This is a self-enclosed video card with a USB connection on one end to connect to the PC, and a DVI port on the other for connecting a monitor.  The specific model I picked up was an IOGEAR model GUC2020DW6 external video card.  The price was right (particularly compared to the other available laptop multiple-monitor solutions I considered): the IOGEAR card was on sale for about US $80 when I purchased it back in early October 2008 (and it's even lower now, down to US $68 on Amazon, as I write this post). 

I've had the card for just about two months now, and it's been working great -- better than I expected!  I had been concerned that there might be noticeable display "lag" on the monitor connected by the USB video card, but in practice, there's no noticeable difference when working on the USB-connected monitor or working with one of the others.  The only time that I notice the difference is when dragging a window around on the USB-connected monitor; there is just a bit of "lag" as the window moves around the screen.

Here's the card, connected, behind my PC, along with a penny to help show the size of the device (apologies for the low quality cellphone-cam photo):


And here's the 3-monitor setup at my desk at work, using the external USB video card to drive one of the external monitors:


USB video cards do have known limitations with displaying very rapidly-updating content (e.g. movies, 3D games) due to the limited throughput of USB 2.0, so I wouldn't purchase one of these cards to use on a gaming machine.  However, I knew that I'd only be using this monitor for business use: Writing code, viewing documents, doing email, surfing the web; that type of thing.  Also, in the event that I do want to view some rapidly-changing content that the adapter can't handle well, I can always just put that content on one of my other monitors.


I got some great help in my research on this issue by posing the question of ways to add a 3rd monitor to a laptop over on StackOverflow, a fairly new community-run site for asking and answering programming and programming-related questions.

Sunday, November 30, 2008

Troubleshooting new PC bluescreens

When I first got my custom-built new PC running 64-bit Vista put together a few weeks ago, everything seemed to be running great: It was very fast and responsive, all of the hardware components appeared to be working, and I could play 3D games on the system with no errors.

However, after a few days of using the system, it became clear that there was a problem: On four occasions, after I left the machine running overnight, I woke up in the morning to find that the machine had bluescreened while it was unattended overnight.  Each time, I found that all of my open programs/windows had closed, and a error dialog was open with a message saying that the machine had bluescreened (using that term, "bluescreened"!).  (However, on two occasions, the machine ran ok overnight, without bluescreening.)

Also, on one occasion, the machine bluescreened while I was actively using it, while I was playing a game of Bionic Commando: Rearmed, which was especially aggravating.

I really dislike system instability.  I've always placed a premium on stability on systems I build; while troubleshooting and tracking down problems can sometimes be interesting, I'd much rather be spending my time on my computer to work on a project, or to play a game.  So, I set out to track down and fix the cause of the bluescreens.  (Note: This is the time that having a custom-built machine can be "interesting" -- if I couldn't figure out the cause of the issue, I wouldn't have the fallback option of dialing up a vendor's 1-800 number to get help dealing with the problem!)

Bad RAM?

My first thought was that one of the sticks of RAM in the system might be bad, or maybe that the two sets of two RAM sticks that I had put into the machine -- a set of 2 2GB sticks from Corsair, and a set of 2 2GB sticks from Crucial (8 GB total) -- were incompatible with one another.  I wasn't terribly happy about this prospect, since it would involve additional troubleshooting which stick(s) of RAM were responsible for the problem, and then having to ship the parts back to the store for a replacement or a refund -- something I've never needed to do before.

I decided to use a memory test utility to try and determine whether there really was a RAM issue.  I found a nice blog post by Shivaranjan Bhoopathy detailing Vista's built-in memory diagnostic tool (thanks Shivaranjan!).  I had been previously unaware of this utility; I'd had it in mind that I'd need to find a 3rd-party utility to do the job.

I ran the utility (which was designed to run after a reboot of the machine, and then automatically running the utility on the subsequent boot before Windows loads).  To my relief, the utility reported that all of my RAM was ok!  However, this meant that I needed to continue looking for the cause of the bluescreens.

Heat Issue?

My experience over the years has shown that weird, sometimes-reproducible, sometimes-not, hardware-related issues are often attributable to overheating. 

I found a nice, free utility for Windows, SpeedFan, which gives a readout of CPU temperature (among other features).  SpeedFan reported that my two CPUs were running at a temperature of between 70 and 75 degrees C -- very hot, dangerously so, for the CPU! 

I also rebooted the machine, entered the built-in BIOS utility program as the machine was booting, and checked the temperature there; the BIOS utility program confirmed that the CPU temperature was a very high 70+ degrees C.

So, at this point I thought I'd found the cause of the problem; the only question was how to fix it.  I turned off the machine, opened up the case, and checked the heatsink.  I found that the heatsink was slightly loose -- I was able to wiggle it back and forth slightly with my fingers; if I had installed the heatsink correctly, then I shouldn't have been able to move it at all. 

The problem turned out to be that two of the four "posts" on the corners of the heatsink which bolt the heatsink tightly down against the surface of the CPU were not tightened down all of the way.  As a result, the heatsink wasn't making tight contact against the CPU surface, and consequently wasn't doing a good job of drawing the heat away from the CPU. 

I properly tightened down the heatsink, and confirmed that it was now tightly bolted down against the CPU surface, and couldn't be "wiggled."  I turned the machine back on, and monitored the temperature with SpeedFan.  This time, the CPU temperature never rose above 40-45 degrees C, even after the machine had been on for a while.  Much better!

Unfortunately, after I left the machine on overnight once again, I came back to it in the morning to find that it had, once again, bluescreened while it was unattended overnight.  This meant that I needed to continue looking for the cause of the issue. 

BIOS and Network Driver Update

At this point, I was running out of ideas of things to check.  I had been doing some large file copies over the network while the machine was unattended overnight (copying photos and music files from my old PC to the new one); I thought that maybe a problem with the network driver or the machine BIOS might be responsible for the bluescreening problems.

I visited the Foxconn downloads site (my motherboard manufacturer's site), and downloaded a new Network driver and installed that; then (unfortunately violating the troubleshooting principle of "only change one thing at a time between tests"), I also downloaded and installed an updated BIOS, using the Foxconn LiveUpdate utility, also from the Foxconn site.

After the BIOS update, I was afraid momentarily that I had "bricked" my motherboard when, after the machine rebooted following the update, I was presented with a scary-looking error message following the machine's power-on self-tests:

CMOS Checksum Bad

However, after some hurried research via Google search (on another machine), this error message turned out only to represent a notification that the machine's BIOS had been updated.  I was able to just bypass the error and continue to boot into Windows, and the machine was fine.

This notification is a good thing, in the case that I might have had a virus that had performed a BIOS update (for who-knows-what purposes).  However, (1) the error message was somewhat unnecessarily scary/unhelpful, and (2) it might have been nice if the Foxconn update utility would have warned me about the message in advance, so I didn't have to get so worried upon seeing it! 

The same "CMOS Checksum Bad" error message appeared again upon a subsequent boot, but I was (apparently) able to clear it simply by going into the machine's boot-time BIOS utility, and then doing a save-and-exit from the utility (without changing anything).


In any event, after installing the BIOS and Network driver updates, I've had no further bluescreening problems!  The machine has been rock-solid stable ever since -- just the way I like it.

I can conclude that either or both of the BIOS and Network driver updates was responsible for fixing the problem -- although as I noted earlier, it would have been nice if I'd performed the updates one at a time, so I could better conclude what the specific solution to the problem was.

I'm also happy in retrospect that the bluescreens occurred, since it led me to discovering the heat issue with the machine and the improperly-installed heatsink; if I hadn't noticed that, letting the machine run for a long period of time at 70+ degrees C might have had a significant negative impact on the life of the CPU.  I also got to discover a couple of cool utilities that I hadn't been previously aware of, namely, the built-in Vista memory diagnostic tool, and the SpeedFan temperature-monitoring utility.

Fix: Front Audio Panel doesn't work on Foxconn P45A-S Motherboard

After recently building my new PC, one of the few problems I had is that the front audio connection on the PC wasn't working.  The PC case (a XION II XON-101) included an audio jack on the front panel of the case, and the motherboard (a Foxconn P45A-series) supported that front audio connection, but when I would plug in headphones to the front audio jack, nothing would happen; sound would continue playing through the speakers (connected via the PC's back panel audio jack), and no sound would come through the speakers connected to the front audio jack.

I opened up the case and double-checked that the audio cables from the front panel of the case were properly connected to the motherboard, but everything appeared to be fine.

After some Google searching, I ended up finding the clue to the solution in a post near the bottom of this forums.whirlpool.net.au forum thread: A manufacturer-specific audio driver needed to be installed, instead of the default Microsoft driver provided with Vista. 

Checking my motherboard manual, I found that the onboard audio was provided by Realtek. I downloaded the Realtek audio driver from the Foxconn support site, installed it, and the problem was solved!  Audio now plays properly through the headphones when headphones are plugged into the front audio jack.

Thursday, November 20, 2008

New PC 2008! Budget: Sub-$700

Earlier this month, I built a new PC to use as my primary home desktop machine.  It was the 3rd PC build I've done, with the earlier builds having been in 2004 and in 2000. 

One of my goals for this build was to keep the budget under $700 (not including a monitor).  This is the parts list that I ended up with:

Motherboard Foxconn P45A-S LGA 775 Intel ATX $110 newegg.com
Processor Intel Core 2 Duo E7200 Wolfdale 2.53GHz $80 frys.com (on sale)
RAM Corsair 4 GB (2x 2GB) DDR2-800 (PC2 6400) TWIN2X4096-6400C5DHX $26 frys.com (on sale)
  Crucial 4 GB (2x 2GB) DDR2-800 (PC2 6400) $30 frys.com (on sale)
Hard Drive Western Digital 1 TB SATA2 16 MB Cache $120 newegg.com
Video Card XFX GeForce 9800 GT 512 MB $110 newegg.com
DVD-RW Drive LG|GH20NS15 20X SATA $23 newegg.com (on sale)
OS Vista 64-bit Home Premium (OEM) $100 newegg.com
Case + PSU XION II Black Steel ATX Mid Tower $60 newegg.com

Total cost of all parts and software: $659

Everything else that I needed either came integrated on the motherboard (sound, network) or else was "recycled" from my previous machine (monitor, mouse, keyboard, UPS, XBox 360 USB gamepad).

Here are the assembled goods, just prior to the build:


I was able to snag the good deals (at least as of this month, 11/2008!) on the processor and RAM via my RSS subscription to slickdeals.net; I knew that I was going to be building the machine in November, so when those deals came across Slickdeals in October, I snapped them up.

I also was able to save some money on the cost of the system by putting all of the individual parts on my birthday wish list; I got some of the components for my birthday, saving me from having to buy them.  (Thanks very much Dad, Dad-in-law K., and Jeremy!)

I snapped a few more pics during the early stages of assembling the machine.  The empty case:


The motherboard (Foxconn P45A-S), fresh out of the box, with no parts inserted yet:


The motherboard with the CPU (Intel Core 2 Duo E7200) and heatsink mounted, in the case:


So far, I'm really enjoying 64-bit Vista.  With the 8 GB of RAM and the other parts I put into the system, it runs very smoothly -- as fast, if not faster, than XP ran on my old 2004 machine that was built on a similar budget.  In particular, Vista seems to start up (from a cold boot) noticeably faster than XP used to.  Based on my experience so far, I'd recommend Vista over XP for anyone purchasing a new desktop machine, at least for any machine with better than low-range specs.

I did have an initial issue with the machine bluescreening on a few occasions when I left it running overnight, which I've since resolved; I'll detail my experiences in troubleshooting that issue, and the eventual solution, in a future post.

With the set of hardware in this build, I have a Vista Windows Experience Index score of 5.4 overall:

  • 5.4 Processor
  • 5.9 RAM
  • 5.9 Graphics
  • 5.9 Gaming Graphics
  • 5.9 Hard Disk

This is pretty much in line with my expectations; the nice thing is that I picked out a motherboard which will allow me to upgrade to a faster, quad core, processor in a couple of years should I feel the need to do so.  (With the good deal that I got on the processor that I bought, upgrading from the 2.54 GHz processor I bought to even a 3.0 GHz would have run me around an additional $80 -- double the price of what I paid -- so I'm happy with the deal I got, even if the processor is slightly "underpowered" compared to the rest of the machine.)

In practice, the machine has run very smoothly with several of my older games that I've tried out on it that chugged a bit on my older system, such as Oblivion and Titan Quest; I was also pleasantly surprised to find that the machine also runs Call of Duty 4, a fairly new game which was included with the GeForce 9800 that I bought, very smoothly as well, even on "high" settings.  Hopefully this computer will turn out to be serviceable for use as a gaming machine for at least a few years (in addition to its roles as a hobbyist development machine, and general household use PC)!

Wednesday, October 29, 2008

Fix: Can't connect to any sites with a 64.x.x.x IP address

Yesterday, my wife Melissa noticed a problem with our home Internet connection: certain websites, including my own jonschneider.com, would not load. The browser would get past the "looking up..." step (so DNS resolution was working fine), but the website would simply never respond to the HTTP request, and the browser would eventually give a "Network Timeout - The server at [site] is taking too long to respond" error.
Timeout screen cap
Troubleshooting the issue this evening, I started to notice a pattern in the sites that were working, versus those that were not working:

Working Sites

SiteIP Address

Non-Working Sites

SiteIP Address
Did you spot the pattern? (If not, take a closer look at the IP addresses.) Once I started looking at the IP addresses of the working sites versus the non-working sites, it quickly became obvious: Attempts to connect to sites with 64.x.x.x IP addresses were not working, whereas all other sites that I tried worked just fine. I had never heard of an issue like this before. I initially didn't really have a good idea where along the pipeline of [Client PC] - [Router] - [Cable Modem] - [ISP] - [Internet] - [Web Server] the problem was likely to be.

It wasn't just http requests that were failing; I couldn't successfully ping, tracert, or connect via ftp to any of the "non-working" sites, either. I was able to successfully connect to some of the sites from work; plus, given that if a site like the google.com homepage had any significant downtime at all it was likely to immediately be big news, and there had been no such news, I was able to rule out the web server as the problem. I was able to reproduce the problem on a couple of different client machines and different web browsers from home, so that (most likely) ruled out the client PC as the issue. My suspicion at this point was some kind of problem at the ISP level; I figured that since I was able to browse some websites with no problem at all, my router and cable modem must be ok.

This turned out to be a bad assumption. I had tried "rebooting" the cable modem (by disconnecting the power, waiting a couple of minutes, and then reconnecting) early in the troubleshooting process, but that step had had no effect. Throughout the process, I had assumed my router was ok. However, when I used the router's browser-based administration application to try and perform a release/renew on its Internet IP address, and the application simply stopped responding after the new request, I immediately (and to my chagrin, for the first time) suspected some kind of problem with the router. I cycled the power on the router (unplug, wait briefly, plug back in), and that turned out to be the solution! Immediately, all of the 64.x.x.x sites were working fine once again.

I'm still not sure why cycling the power on the router was the solution to the issue, except that to guess that apparently, after weeks (or maybe even months) of uptime, the router had managed to get itself into a bad state, and cycling the power was enough to refresh whatever internal memory the router has back into a good state. Hopefully, this post will be a time saver for anyone else out there who manages to run across this issue -- at least, so long as this blog doesn't get changed to have a 64.x.x.x IP address! :-) I have had various problems with this router -- a Linksys BEFW11S4 Wireless-B that's now over a couple of years old -- before (1, 2, 3). I think it may be time to start keeping my eyes open for a sale, and jump on a deal to replace this router when the right deal presents itself.

Wednesday, October 15, 2008

Jon's Top 8 Windows XP Customizations

Although I am currently in the process of building a new PC for home, which will run 64-bit Vista and will become my new primary home PC, as of now (October 2008), I am still running Windows XP as my primary operating system both at home and at work. In recent years, I've accumulated a collection of software that in one way or another enhances the basic, low-level Windows XP user experience, and allows me to be more productive (or to just enjoy using my machines more!)

This post details my Top 8 Windows XP customizations. Some of these may apply to Vista as well; once I have my new machine up and running with Vista for a while, I'll reprise this post and report which of these customizations are still useful under Vista, and which ones are no longer needed. There might also be some new additions to the list; time will tell!

Note: Large applications such as Firefox are outside the scope of this list; I'm focusing in here on items that modify the behavior of Windows itself, or are otherwise basic utilities or tools that tweak the way that I use Windows.

#8: WindowSpace

Homepage: http://www.ntwind.com/software/windowspace.html
Author: Alexander Avdonin
Supported Operating Systems: Vista, XP, 2000; 32-bit and 64-bit versions available
Price: US $34.90 (30-day free trial available)

WindowSpace provides the cool feature of having windows "snap" to the edges of the screen, and to other windows, as you drag or resize windows using the mouse as you normally would. This is nice for taking advantage of the real estate of your screen area; before using WindowSpace, I would typically leave "dead space" between the borders of my non-maximized windows and the edges of my screen, because it was a nuisance to try to position a window exactly against an edge of the screen. Alexander really nailed the feel of how the "snap" behavior works; it feels very natural and intuitive. It also works just fine with multiple monitors.

WindowSpace also provides some handy global hotkeys for resizing a window via the keyboard such that it is positioned against a desired edge of the current screen, and for other functionality related to window positioning and sizing, which can be remappend, and enabled or disabled.

#7: Windows Search 4

Homepage: http://www.microsoft.com/windows/products/winfamily/desktopsearch/default.mspx
Author: Microsoft
Supported Operating Systems: 2003, XP
Price: Free

This is essentially the nice, fast desktop search built into Vista, back-ported to Windows XP.

I have had an occasional issue with Windows Search 4 not finding an item that I know is present on my local hard drive (including items that have been around for a while, so it isn't an issue of the Windows Search indexer just not yet having added a newly-created document to its index); but for the most part, this is a great (and free!) improvement over the default local search functionality that ships with Windows XP.

Note: Windows Search 4 does by default add a somewhat unsightly, screen-real-estate-consuming search field to the Windows Taskbar; I posted previously about how to hide the search field. I use the Win+F ("find") shortcut key to bring up Windows Search when I need it.

#6: XP Black ("Zune") Style/Theme

Homepage: None; direct download link: http://go.microsoft.com/fwlink/?LinkID=75078
Author: Microsoft
Supported Operating Systems: XP
Price: Free

Rather than a utility or functionality enhancement, this just plain makes Windows XP look cooler. This Black (or "Zune") style gives you another alternative to the default blue XP style (and the built-in silver and olive alternative styles) and the gray "classic" style. It was apparently developed by Microsoft to promote their Zune portable media player (hence the name). Even if you're not a Zune fan (I'm not a Zune owner, myself), this black style makes Windows XP look a lot sharper.

Zune Theme

The theme doesn't currently seem to have a homepage anywhere on the Microsoft site, but you can still download the file directly from the Microsoft site, here: http://go.microsoft.com/fwlink/?LinkID=75078 (ZuneDesktopTheme.msi; 1.6 MB)

#5: ClipPath

Author: Suresh Online
Supported Operating Systems: XP, 2000, NT, ME, 98, 95
Price: Freeware

ClipPath adds an option to the right-click menu of Windows Explorer when a file or folder is clicked: "Clip Path" (to the clipboard). This is very useful to essentially get a reference to a filesystem file on the clipboard, which you can then paste directly into the "File | Open" dialog of another application (rather than using the dialog's GUI to drill all the way back through the filesystem to the file's location).

I previously discussed ClipPath in a Utility of the Day post.

#4: TaskSwitchXP

Homepage: http://www.ntwind.com/software/taskswitchxp.html
Author: Alexander Avdonin
Supported Operating Systems: 2003, XP
Price: Freeware

TaskSwitchXP is a great improvement to the default Alt+Tab interface provided in Windows XP. It supports several nice enhancements over the basic XP Alt+Tab interface:

  • Display of the full Titlebar text of all applications (not just the selected one), in addition to the application's icon;
  • A preview of the appearance of the selected application's window;
  • Allows an application to be selected via a mouse click (instead of only via Alt+Tab and Alt+Shift+Tab);
  • Better support for many (22 or more) open applications.

#3: Ditto

Homepage: http://ditto-cp.sourceforge.net/
Author: Open Source (project admin: Maloney)
Supported Operating Systems: Vista(?), XP, 2000, NT, 98, 95
Price: Freeware

Ditto enhances the Windows clipboard such that when an item is placed on the clipboard, whatever was on the clipboard previously isn't lost, but is instead saved into a persistent storage area. A global Ditto Paste hotkey (I use Ctrl+Alt+V) can be set up to bring up Ditto's paste interface, which allows you to quickly paste an item that was stored to the clipboard recently, or even to do a search on older clipboard items and paste one of those. I didn't use Ditto heavily right after I installed it, but I've found that over time, I've come to rely on and take advantage of the productivity benefits of old clipboard items not being erased when something new gets saved to the clipboad.

I previously posted about Ditto in a Utility of the Day post.

#2: Taskbar Shuffle

Homepage: http://nerdcave.webs.com/
Author: Jay E.
Supported Operating Systems: Vista, XP, 2000, NT, 98, 95; 32-bit versions only
Price: Freeware

I originally downloaded this utility for one reason: I wanted the ability to close applications from the Windows Taskbar by middle-clicking them (just like you can do in Firefox and other tabbed applications); after all, what is the Windows Taskbar if not a tabbed view of the system's open Windows applications? Taskbar Shuffle enables this middle-click-to-close behavior for taskbar tabs. Much easier than doing right-click | Close on many open applications (especially for those applications that put the "Close" option somewhere non-standard on the right-click menu).

I've since started also Taskbar Shuffle for its primary purpose: Moving taskbar buttons around on the taskbar via drag-drop. The most obvious use case for this is moving my mail client back to its position at the top-left corner of the taskbar (where I always expect it to be!) after it crashes and I re-open it.

Unfortunately, Taskbar Shuffle doesn't currenly support 64-bit versions of Windows. Taskix is an alternative which apparently has very similar functionality to Taskbar Shuffle and does support 64-bit Windows (including Vista), but I haven't tried it out yet myself.

Update 7/1/2009: A 64-bit version is now available! Nice! Go check it out.

I previously covered Taskbar Shuffle in a Utility of the Day post.

#1: PureText

Homepage: http://www.stevemiller.net/puretext/
Author: Steve Miller
Supported Operating Systems: Vista, 2003, XP, 2000, NT, ME, 98, 95
Price: Freeware

PureText does just one thing, and does it very well: It sets up a global hotkey for "Paste unformatted text."  It takes the text that you previously copied to the clipboard and pastes it into the current application, but without any rich text markup that might be stored in the clipboard along with the text. 

I typically use this at least on a daily basis, sometimes many times per day. For example:

  • Paste some code from Visual Studio or Eclipse into MS Word, without getting the font and background color from the IDE.
  • Paste text from Word into another document (such as an email, a Powerpoint presentation slide, or a cell in an Excel sheet) in the current font of the target document, instead of the font from the Word document.

PureText allows you to assign the hotkey that will be used for this operation.  I use the default of Win+V.

The net result of the operation is like pasting the text into a plain notepad.exe window, and then re-copying and pasting it from Notepad into the target document; or like the MS Office menu option Edit | Paste Special | As Unformatted Text; but in a single, easy, step.  Also, unlike the MS Office solution, PureText works regardless of the target application of the Paste is.


In my experience with these utilities, each of them has been rock-solid stable. I place a premium on stability of my system, and have had nothing but good experiences with each one of these customizations.

I hope this list of utilities is useful; if a utility on this list is new to you and sounds interesting, I'd encourage you to "be bold" and go ahead and give it a try. If you end up seeing a net productivity benefit, great! If not, the uninstallers are there for a reason. :-)

Monday, September 08, 2008

How to: Get Firefox to discard a cached set of basic authentication credentials

While using Firefox 3 to work with a web application that uses basic authentication for access control earlier today, I wanted to be able to log in to the application as a different user account without needing to close and restart Firefox in order to get it to stop automatically resending the authentication data from my original login.  (After logging in to a site via basic authentication, Firefox will automatically continue to resend the credentials from that login on any subsequent requests to that same site, until the browser is shut down.)

After hunting around for a while looking for a Firefox extension that would do this, I discovered a way to do this built into Firefox itself: In the Tools menu, select Clear Private Data; then in the Clear Private Data dialog that appears, check the Authenticated Sessions checkbox, clear all other checkboxes, and click the Clear Private Data Now button.


This will get Firefox to "throw away" its saved basic authentication credentials from the current session, and allow you to log in as another user, without having to close Firefox.  I've found this to be handy when I have a lot of Firefox tabs open, and don't want to shut down Firefox (and close all of my open tabs in the process) just to "log out" of the basic authentication session that I have open in a particular tab.

Thursday, August 28, 2008

UI Annoyance: Unselectable text in a disabled form field

A usability annoyance that I've encountered on a few occasions is a disabled field on an desktop or web application form which doesn't allow text in the field to be selected, and therefore, prevents the value in the field from being copy & pasted to another location.  (This side-effect of not allowing a clipboard copy of the field's value may or may not be above and beyond the developer's intention of simply not allowing the contents of the field to be modified).

For example, the web application server WebLogic Server 9 (WLS9) includes a web-based administrative console where database connection strings and other settings for hosted applications can be defined.  In the WLS9 console, one user at a time can obtain a lock on the console, preventing other users from concurrently making conflicting changes; when the current user does not have the lock, all editable fields are disabled.  In this state, field values can't be selected and copied to the clipboard.  This effectively prevents the user from doing things like copying settings from admin console form fields to another WebLogic instance, or copying a hosted application's settings from the console to document them in the application's internal documentation. 

There's no reason that the WLS9 console needed to be coded to prevent clipboard copying of values in this way; after all, the disabled field values are still visible, and the user can always just manually read and retype them elsewhere.  It's just an annoyance for the user to have to do manual retyping of values (such as long, complex database connection strings) when they could be using a clipboard copy to get the values.

HTML form fields: Disabled vs. Readonly

In HTML, an input type="text" field can be set with the attributes disabled or readonly.  The attributes have similar behavior; both prevent the field contents from being modified.  One key difference, though, is that the readonly attribute still allows the value in the field to be selected (and copied to the clipboard); the disabled attribute may prevent the value from being selected and clipboard copied, depending on the client browser's implementation.  (For example, Firefox 3 prevents the value from being selected; Internet Explorer 6 does allow the value to be selected.)

Try dragging with the mouse inside each of these fields, to see what behavior your browser allows:

<input type="text" value="Try selecting this text" readonly> :

<input type="text" value="Try selecting this text" disabled> :


Web application developers, before using the disabled attribute on a text input field on a web form, consider whether your users may ever want to clipboard copy the value in cases when the field is disabled.  If so, consider using the readonly attribute instead.

The same principle holds true for desktop application developers as well.  Consider whether your users will ever want to clipboard copy values from your disabled form fields when defining the behavior of whether the field values can be selected or not while disabled.

Tuesday, August 19, 2008

Workaround: Windows Media Player sound cuts out when Cisco VPN client v4.x is active

I had the opportunity to work from home today.  It was nice to change up my routine and get a good bit of mostly-uninterrupted work done.  The best part was probably getting to spend a full hour at lunchtime having lunch with my wife Melissa and my kids!

I did run into two issues during the course of day, though.  One was that the Charter cable modem service decided to go out for an hour or so in the afternoon (and the VOIP phone service along with it); there wasn't much I could do about that aside from work offline and wait it out.

The other issue was a strange one; while listening to mp3s on my local C: drive in Windows Media Player 11 (WMP), the playback would work fine for a minute or two, but then the sound would cut out.  The song would still apparently be playing (as evidenced by the track position slider continuing to advance), but I'd get only silence from my speakers or earphones.  Sounds from other Windows apps would still play as normal.  If I clicked Stop and then Play in WMP, or Previous Track / Next Track, the sound would come back for another minute or two, and then cut out again.  This behavior happened regardless of whether WMP was minimized or not, or whether it was in full mode or skin mode. 

I also noticed that when the sound playback cut out, the wmplayer.exe process (the Windows Media Player process) would peg the CPU it was running on; I could see in Task Manager that one of the two CPUs (on my dual-core machine) would go to 100% utilization, with wmplayer.exe accounting for 50% of my overall CPU usage (100% of 1 of the 2 CPUs).  If I stopped the playback or brought the sound back by clicking Previous Track / Next Track, the CPU utilization would go back to normal (less than 5%).  I tried pointing SysInternals' Process Monitor at wmplayer.exe while WMP was in the "pegged" state, but it didn't turn up any errors or any behavior that I could readily identify as unusual.

Since I use Windows Media Player on my laptop docked at my desk at work every day, I figured that the problem was probably related either to working with the laptop undocked, or else had something to do with my VPN connection to my office's intranet.  I ended up just getting out my iPod and listening to my music on that instead as a workaround.

At the end of the day, though, I came back and investigated the issue.  (It just bugs me when something on my machine isn't working the way it should be!)  Various Google web searches for combinations of terms including "windows media player", "100% cpu", "sound cuts out", and "vpn" didn't turn up anything useful, but when I searched for "vpn" on the microsoft.public.windowsmedia.player newsgroup, I came across what turned out for me to be the key to the solution: a 2005 post by "bsmaloney" describing nearly-identical behavior to what I was seeing.  bsmaloney didn't post a solution, but he mentioned that he was using a version 4.x Cisco VPN client.  This is what I was using as well!  It hadn't occurred to me up to that point that the problem might be attributable to a specific vendor's VPN implementation, rather than the fact that I was connected via a VPN in general.

I went back to Google and searched on "windows media player" vpn cisco, and sure enough, the #1 result was a Cisco VPN client release notes page listing that an issue related to Windows Media Player playback had been fixed in version of the Cisco client.  The release notes also mentioned that the problem would occur when either the SRS WOW or Graphic Equalizer were enabled.

It wasn't an option for me to upgrade to version 5 of the Cisco VPN client, since the standard at my office is still the 4.x version.  However, I checked in WMP, and I did in fact have the Graphic Equalizer enabled.  I turned that off (View menu | Enhancements | Graphic Equalizer), and playback has been working fine since then!

As a side note, the Cisco release notes page refers to the bugs it describes as "caveats."  I thought that was kind of cute.  "Defects" and "issues" I've heard of before, but the using term "caveats" to describe software bugs was a new one on me!

Tuesday, August 12, 2008

Really impressive live Internet-delivered Olympics video

I just watched the most impressive (quality-wise) Internet-delivered video I've yet seen -- and live video, at that! It's the coverage of the 2008 Olympics over at nbcolympics.com. To watch, follow that link and pick one of the events on the left column of the homepage with a red "live" tag next to it. (Video on the site might be available to USA-based visitors only -- I'm not sure.) The video is very high-quality for browser-delivered video -- both large size and high resolution. Much nicer than the typical YouTube fare (small size, grainy quality) that I would normally associate with watching video on the Web. There was no audio commentary for the event I was watching (Judo), but there was a text-based commentary, plus a live scoring summary. The video also included instant replay of the action, just like you'd expect in the coverage of any sporting event. Really impressive overall presentation. Kudos to the NBC team for pulling this together, and to Microsoft for providing the Silverlight technology that the video is running on. If you haven't seen it yet, I would suggest making it a point to head over to the NBC site and watching for at least a few minutes at some point before the Olympics are over!

Tuesday, August 05, 2008

Excel tip: Shift+F2 = Edit Cell Comment

A quick tip for Microsoft Excel that I've just found, and is currently making my life easier: Shift+F2 jumps to editing the cell comment (note / annotation) for the current cell.

This is a lot nicer than having to go over to the mouse and right-click on a cell, then choose "Edit Comment" (or "Insert Comment" in the case of a cell that doesn't have a comment yet) from the context menu when doing heavy editing work on an Excel sheet.

This works in Excel 2003; it might also work in other Excel versions as well.

Bonus tip: F2 alone (without holding Shift) edits the existing value in the current cell.  This is another time-saver that allows you to edit the value in a cell without having to move over to the mouse. 

The use of F2 to mean "edit the current value" is a semi-standard that works in many other Windows applications as well.  For example, F2 in Windows Explorer begins editing the name of the selected file or folder (to allow the file or folder to be renamed).

Thursday, July 24, 2008

Don't treat Underscore as a word separator character on double-click

In just about all modern text-reading and text-writing applications, a double-left-click with the mouse on a word in the text causes that word to become selected.  Double-clicking a word in this manner is handy for quickly selecting a word in order to copy-and-paste or cut-and-paste it elsewhere, or to just delete the word.  (If you've never used double-click in this way before, go ahead and give it a try on one of the words in this post, right here in your web browser.)

I've recently noticed that not all applications handle double-click-selection of words that contain an underscore character (the character "_"; also called "underbar") in the same way.  Such words are frequently used by software developers for naming such things as variables and database fields; examples are max_records and customer_id. 

In some applications, double-clicking on any portion of a word containing an underscore results in the entire word being selected.  This is the behavior I want, since it lets me easily cut or copy the entire identifier elsewhere.  (For example, taking the example of the max_records identifier, if I double-click the word, it's far more common that what I'm trying to do is select and copy "max_records" for pasting elsewhere, rather than just "max" or just "records".)  The text editor Notepad2 works this way (shown here after a double-click on the word "max"):


The problem is that in some applications, double-clicking a word containing an underscore results in just the clicked portion of the word becoming selected; the underscore gets treated as a word separator character (like a space character would be treated).  Firefox 3 works this way (again, shown after a double-click on "max"):


Since typical (non-developer) users are seldom or never going to be working with documents with words that include underscore characters (and therefore aren't affected one way or another by what the behavior is), I think that the default behavior across all applications should be to select the entire word when a word including an underscore character is double-clicked.  The underscore should not be treated as a word separator character for the purposes of an application's logic that selects a word on a double-click.

It still might make sense for underscore characters to be treated as word separator characters in some other cases.  Such cases might include an application's spell check logic; another case might be the handling of navigating through a document a word at a time via the Ctrl+LeftArrow and Ctrl+RightArrow shortcut keys.

A few applications that get this behavior "right" (double-click selects an entire word with an underscore; not all other punctuation characters are specially handled this way):

  • Visual Studio 2008
  • Eclipse 3.3
  • Notepad2 (2.1.19)
  • Microsoft Excel (2003)

A few applications that don't get the double-click behavior "right" (double-click selects only the portion of the clicked word up to the underscore character):

  • Firefox 3
  • Internet Explorer 6
  • Toad for Oracle (
  • Microsoft Word (2003)
  • Acrobat Reader 7

Developers of this latter set of applications: If you agree, please go forth and effect positive change!  :-)  Developers of new applications, please keep this issue in mind when coding up the mouse click UI behavior for your new app.

Update 4/4/2011: There is an existing, long-standing (March 2003) Mozilla (Firefox) Bugzilla ticket for this: Bug 196175 - underscore should be part of word, not punctuation. As discussed in that comments on that ticket, though, it isn't clear that special-case logic should be added for the underscore character, since behavior from application to application even on a single platform is inconsistent (as I noted above for Windows applications). I voted for the ticket, but I'm not going to hold my breath at this point for it to be addressed soon!

Tuesday, July 15, 2008

Workaround: "The server is not responding" error when trying to add a contact in Groupwise Messenger

At work, our internal corporate standard IM client is Groupwise Messenger.  Today, the "Add Contact" function stopped working for me (after always having had it work fine in the past): When trying to add a new contact, the "Search Results" window would appear with its normal animated "searching..." icon, and then after 30 seconds, the search would time out with the error message "The server is not responding."  Despite the error message, I could view the online/offline status of my existing contacts with no problem (so I clearly had a working connection to the Groupwise server).

After playing with the client for a couple of minutes in an attempt to find a workaround, I did find a rather unusual workaround, somewhat to my surprise:

On the Find dialog (where you enter the name of the contact to find), tucked away in the top-right corner of the dialog is an "Advanced" button.  Clicking that button restyles the dialog with some additional "advanced" fields.  Performing the search while the Find dialog is in this Advanced mode causes the search to work correctly, and the "The server is not responding" error does not occur.

This workaround seems kind of bizarre to me -- I have no idea why it works, or what the cause of the initial issue is.  Still, I have successfully reproduced this workaround as a solution for the issue multiple times (and gone back to Basic mode in the Find dialog and had the search fail once again as it did originally), so I wanted to share the solution in hopes that it is helpful to someone.

Monday, July 07, 2008

How to search multiple domains with Google

It is possible to do a Google search and restrict the results to a single domain by using the Advanced Search form. You can also use the regular search form with syntax like:
search term(s) site:siteName.com
where siteName.com is the site you want to search. Google will show you search results from just that one site. For example: Search for "football" at umich.edu. As of the time of this writing, the Advanced Search form doesn't seem to support searching multiple specified domains instead of just a single one; adding a space between the domains entered on the "Search within a site or domain" field doesn't work (Google automatically removes any spaces before performing the search). Using one of the characters , ; : in the field as a delimiter doesn't work, either. However, you can do a multiple domain search by using syntax like this in the regular search form:
search term(s) site:siteName1.com OR site:siteName2.com
where siteName1.com and siteName2.com are the sites that you want to search. For example: Search for "football" at umich.edu and msu.edu.

Wednesday, July 02, 2008

How to hide the Windows Search 4 search bar on the Windows XP Taskbar

File this one under "so obvious that I couldn't figure it out!"

Earlier today, I installed the recently-released Windows Search 4 for Windows XP.  I'm going to give it a try not so much as a search tool, but primarily as a means of opening documents more quickly in cases when I already know where the document I want is located, but the location is multiple levels deep in my filesystem hierarchy, and it takes a few seconds to drill all the way down to it; I'm hoping just typing a few characters of the document's name and then opening the document from the search results turns out to be faster.

When I installed Windows Search 4, it placed a search bar on my Windows Taskbar.  I didn't really want the search bar there; I like to have maximum real estate available on the Taskbar for my open applications' buttons.  (I don't have the Quick Launch bar or any other widgets present on my Taskbar, either; I use SlickRun to launch apps quickly using only the keyboard.)  I'm also currently running a black Windows theme and a black desktop background, and the bright white rectangle of the search field was a bit of an eyesore.

Since I knew that I could also bring up the search field with the global Win+F keyboard shortcut (as Windows Search 4 replaces the default Windows search functionality, including the Win+F shortcut), I poked around in the Windows Search options for a way to hide the search field on the Taskbar.  Not seeing any relevant options there, I Googled for an answer, and didn't come up with anything immediately, but eventually found the answer in a reader comment in a downloadsquad.com article comparing Windows Search 4 and Google Desktop 5.5. 

Commenter "Quikboy" on that article noted that it is possible to hide the Windows Search field on the Taskbar, not from within the Windows Search options, but in the same way that you can hide any other Taskbar widget: Right-click an empty portion of the Taskbar, then on the context menu that appears, open the Toolbars sub-menu, and uncheck Windows Search Deskbar.

So, that problem is solved!  It remains to be seen how useful Windows Search 4 turns out to be in my everyday work, but at least while I'm making that determination over the next few days, I won't have the search field cluttering up my Taskbar!

Friday, June 27, 2008

Fix: After undock, ThinkPad wireless connection doesn't work

For most of the time I've had my ThinkPad T60 laptop (running Windows XP SP2) and Advanced Mini-Dock, when I would undock the laptop from the docking station, the ThinkVantage Access Connections application would automatically and successfully enable the machine's wireless radio and connect me to the local wireless network. 

However, following a recent (May 2008) round of system software updates installed via ThinkVantage System Update, this no longer worked.  After undocking, the wireless connection would not automatically be made, and when I tried to manually connect using ThinkVantage Access Connections, the attempt would fail on the first step of the process, "Applying wireless settings."


After encountering this failure, I would be able to get the wireless to work correctly once again by rebooting the machine.  (Needless to say, I wasn't happy with this workaround, due to the delay involved in rebooting, and the need to close all open applications.)

The Fix - Executive Summary

I was able to fix the issue on my machine by reverting from ThinkVantage Access Connections version 4.52 to version 4.42.

The Fix - Long Version / Investigation

On one recent occasion where I undocked and subsequently encountered the issue, the ThinkVantage Access Connections service process, AcSvc.exe, crashed (with the typical Windows XP "This application has encountered a problem and needs to close" crash dialog).  I restarted the process (via the ThinkVantage Access Connections application shortcut on the Start menu), and after doing that, the wireless started working again, with no reboot involved.  This led me to believe that the issue was with the Access Connections software.

I reproduced the undock issue again, and this time manually killed the AcSvc.exe process (via Windows Task Manager), and restarted it, and that once again got the wireless networking to work.  So at that point I at least had a better workaround than needing to reboot. 

I continued to investigate the issue, and found a post on the Lenovo Support Forums indicating that another ThinkPad owner was having an apparently unrelated problem with AcSvc.exe, but that he was running Access Connections version 4.52, and that he had been able to resolve the issue by reverting to version 4.42.  I checked my ThinkVantage System Update log, and noticed that an upgrade to Access Connections 4.52 had been among the changes in the recent round of updates I had installed.  A co-worker who also had a T60 and was having no wireless issues also reported that he was running Access Connections 4.42.  Armed with all of this information, I decided to try reverting to Access Connections 4.42 to see if that would resolve the issue. 

I was somewhat nervous about doing this, since if the Access Connections installer didn't do a good job of handling the case of installing an older version of the software on top of a newer one, I could conceivably left in a broken state where my network connectivity (both wired and wireless) might not work at all.  To try and mitigate this risk, I backed up the registry entries and program files for Access Connection 4.52 before proceeding.

Fortunately, the Access Connections 4.42 installer had good handling for installing over a newer version: it recognized that I had a newer Access Connections version installed, and (with my approval) uninstalled the existing version before installing the 4.42 version.

Following a reboot, with Access Connections 4.42 installed, the laptop now once again automatically and successfully connections to the wireless network following an undock!

There was one remaining minor issue, though.  With Access Connections 4.42 reinstalled, I started seeing a new issue where upon an undock, I would get an error dialog with caption "netsh.exe - Unable to Locate Component", and dialog text "This application has failed to start because framedyn.dll was not found.  Re-installing the application may fix this problem."


Fortunately (and unlike for the original "Applying wireless settings" failure issue), help was readily available via a Google search for this issue.  Per a suggestion given in several of the search results, I copied the file framedyn.dll from my C:\Windows\system32\wbem folder to the C:\Windows\system32 folder; with this done, the error dialog now no longer appears.

Thursday, June 12, 2008

Fix: Altered Logitech mouse behavior in some apps

In a previous post on an issue with Logitech mouse sensitivity settings, I noted that I had an unresolved issue on my Windows XP machine, where the speed and acceleration settings for my Logitech MX500 mouse getting lost while Microsoft Virtual PC Console was the foreground (active) application.  (The sensitivity of the mouse would suddenly increase quite a bit, causing a corresponding increase in the speed of the mouse cursor.)  Since then, I've noticed the same issue occurring in a couple of other applications as well, including the JMS queue browser HermesJMS, and the ThinkVantage Active Protection Windows Control Panel applet.

Today, I figured out the fix: In the Control Panel, in the Mouse applet, on the Motion tab, uncheck the "Disable acceleration in games" checkbox, then click OK.

Apparently the issue is caused by the Logitech software erroneously identifying the affected applications as games, and disabling the custom mouse speed/sensitivity and acceleration settings while those applications are active.

Tuesday, June 10, 2008

The "red squiggle" and user-entered filesystem paths

Wouldn't it be nice if the "red squiggle" that appears under misspelled user-typed words in many applications these days (such as Microsoft Word and Firefox 2) would also appear under mistyped portions of a filesystem path in "Open File" dialogs and other places where the user can manually type in a path, such as the Start | Run dialog, and the address bar of a Windows Explorer window?


Look closely at the highlighted section in the above Open dialog.  The last word in the path name entered by the user, "mircosoft," is a nonexistent file/directory name, and so a "red squiggle" appears under that portion of the entered path.

The image above is just a mockup; Windows XP doesn't actually do this.  Are there any current operating systems out there that do?

This would be a nice additional UI cue to the user that they have misspelled or mistyped something.  Currently, the only such cue in Windows XP that the user gets is that intellisense suggestions (suggested path/file names) stop showing up under the input field.

Friday, May 30, 2008

Control Windows Media Player with the ThinkPad Play/Pause Keys

Quick tip for ThinkPad owners: the media control keyboard keys located on the arrow keys at the bottom-right corner of the keyboard can be used to control music or other media playing in Windows Media Player (WMP) even when WMP isn't the foreground application! 


To use these keys, hold down the blue "Fn" key at the bottom-left corner of the keyboard, and press the appropriate arrow key.

With these keys, I can have music playing in Windows Media Player in the background (or in a minimized window), and be working in other applications in the foreground.  Then, when I get interrupted and want to pause my music (when the phone rings, or when a visitor arrives at my desk), instead of having to open the WMP window and click on the Pause button, I can just quickly push Fn + Play/Pause (the down arrow key), and my music is paused.  Another press of Fn + Play/Pause, and my music starts playing again.  Quite handy!

Wednesday, May 07, 2008

Tip: Expand your Windows Taskbar

A quick tip to make your Windows Taskbar a lot more usable is to expand its area and make it two rows high instead of one.  A pair of pictures are worth 2000 words:



These two images show the same Windows XP Taskbar with 12 applications running, and a bunch of icons in the system tray.  The difference is that in the second image, the Taskbar has been expanded to be two rows high instead of just one.

With the increased area available on the Taskbar, it's much easier to read the text that accompanies the icon on each application button, making it a lot easier to find (for example) a specific Firefox window or Word document.

To increase the number of rows in the Taskbar in this manner, just use the mouse to drag the top edge of the Taskbar upwards.  (You'll need to temporarily unlock the Taskbar first if you have it locked: Right-click an empty portion of the Taskbar, and uncheck the "Lock the Taskbar" option from the context menu that appears.)

Increasing the Taskbar area to two rows has a few other benefits as well:

  • The system tray icons are grouped into three rows instead of just one, saving a lot of horizontal real estate on the Taskbar.  As a result, there's even more room available for application buttons to be shown.
  • Windows shows the day and date in addition to the time on the right edge of the Taskbar; no need to hover over the time display with the mouse to see that information anymore.
  • Although it isn't shown in the screen cap above, I've found that the bit of empty space below the Start button is a great place to tuck a SlickRun command line into.

With the large screen resolutions (and hopefully, multiple monitors) available on modern machines, the additional screen real estate consumed by increasing the Taskbar size to a second row is trivial compared to the usability and productivity gains realized by doing so.

(You might also note that I have the "Group Similar Icons" option from the Taskbar's Properties dialog turned off.  That option does save some Taskbar real estate, but at the significant cost of not being able to identify or access specific application windows from the Taskbar with a single-click.  Again, with the large amount of screen real estate available on modern systems, I don't see the benefit in ever having that option enabled.)

Tuesday, April 22, 2008

Fix: Windows Live Writer install: "Sorry, we couldn’t install this program"

I ran into an issue while trying to install Windows Live Writer, a blog-posting package, at work earlier this week.  The installer would work for a few minutes, and then fail with the rather uninformative error "Sorry, we couldn't install this program", and offer to put a shortcut to the installer on the desktop for me to "try again later."  I did "try again later" a couple of times, but the install kept failing in the same manner.

Tonight, I brought my laptop home, and tried the install again, and it worked just fine.  I suspect the difference is that here at home, I'm not behind a proxy server.  Why the Live Writer installer didn't pick up my proxy settings at work from IE and contact whomever it wanted to contact using those, I'm not sure.  For anyone getting this error who is behind a proxy server, though, I would suggest trying the install again from an alternative location that is not behind a proxy server, if you are able to.


This post is also doubling as a test post, written and published via Live Writer!  Thanks to Scott Hanselman for the recommendation (in this post).  This does seem like a very nice tool so far.  It appears to support uploading images to a customizable FTP destination separate from your blog host -- hence my image test above -- and if this works out, it will likely replace the custom FTP image resizer/uploader app that I wrote for my wife that she uses when she blogs!

Fix: "Bluetooth device not found" on Thinkpad T60

I recently picked up a Bluetooth-enabled camera phone, and so I became interested for the first time in getting the Bluetooth functionality on my work laptop (a Thinkpad T60 running Windows XP) working to allow me to easily download pictures from the phone.

However, when I launched the Bluetooth Configuration applet from the Control Panel, it would hang for 5 or 10 seconds, and then show an error: "Bluetooth device not found. Please verify that your Bluetooth device is properly connected and turned on." In the Device Manager, under "Bluetooth Devices", only "Bluetooth Bus Enumerator" was listed, but no other specific Bluetooth device.

At this point, I was wondering if I didn't actually have Bluetooth hardware installed (despite the presence of a Bluetooth usage indicator icon on the machine); when I first got this machine, the internal wireless card wasn't yet installed, and I needed to take the machine down to the IT department to have them pop it in. However, one of the IT folks I talked to confirmed that the Bluetooth capability should be present in the existing wireless card.

The solution turned out to be that Bluetooth was disabled in the BIOS. In the BIOS, in the Network section, there is a setting named Internal Bluetooth Device; the value was set to "Hidden." I changed this to "Enabled," saved, and rebooted, and now the Bluetooth card does show up properly in Device Manager and in the Bluetooth Configuration applet.

So, I can now successfully pull photos directly off my camera phone to my PC, without having to individually email them to myself from the phone as picture messages (and pay my wireless provider for the privilege)!

Friday, April 11, 2008

Software Developers' $300 Discretionary Productivity Budget

Currently, there is a state of affairs at many companies that employ or software programmers or developers is that if a developer wants or needs something to improve their personal productivity -– for example, a new piece of hardware such as a 2nd monitor, or a book on a new software development methodology –- that need is essentially treated as "non-standard" or "out of the ordinary", and requires special approval from a manager.

After reading Jeff Atwood's recent blog post We Don't Use Software That Costs Money Here, I got to thinking: Wouldn't it be nice if every developer had a small discretionary budget from their employer of, say, U.S. $300 to go out and buy themselves things they want or need to help do their job better? The developer could just order themselves what they need -- no special approval required -- and then expense it to the company, up to that annual $300 limit.

What would the discretionary budget cover?

Some things that a developer could use the budget to purchase:
  • Hardware:
    • An additional monitor - around US $150-350
    • A video card or laptop dock to run the additional monitor, if needed - $50-150
    • A custom mouse or keyboard - $30-80
  • Software development-related books/manuals - $30-60
  • Non-free software tools - $5+
  • Non-free development-related magazine subscriptions - $10-40
  • Possibly, even "non-technical" things like a desk lamp or a nicer chair
Things the budget would not be intended to cover:
  • The obligatory development machine upgrade every 3/4/5 years that developers generally need to be able to keep up with modern software.
  • Major software packages that developers require to do their jobs, such as a copy of Visual Studio for developers working in a C# shop.

Why $300?

I picked $300 because it's enough to buy a modest amount of items that can make a real productivity impact; say, a decent $200 monitor and a couple of $50 books on development methodology. If a developer needs to spend beyond the $300 limit – say, to buy one more book, or to do something more expensive like attend a conference – they could just get special permission from their manager (as would otherwise be the status quo for any request, without the discretionary budget).

A budget amount of much more than $300 – say, $3000 – could be problematic because developers at some point would likely feel like they would rather have some of those budgeted funds go directly to their salary. $300, spread over an entire year, is an amount that is probably low enough for most developers not to feel annoyed that they are losing potential compensation.


What are the reasons that an employer of software developers might want to set up a discretionary "productivity budget" for their developers?

  • Productivity. Developers can use the budget to increase their own productivity, which directly translates to a productivity gain for their development team, and in turn, for their employer.
  • Morale. Existing developers are happy because they can (within limits) just order themselves what they need, instead of needing to worry about getting approval from a manager, or that they might be "overstepping their bounds" by making a special request.
  • Recruiting. Recruiting is benefited, as the discretionary budget can be presented as a differentiator to prospective hires. Prospective new employees could see the budget as a sign that the company is in tune with developer's concerns, and that the company's developers are empowered to make their own development-related decisions (rather than having such decisions be made by potentially non-technical management staff).


Why might an employer of software developers not want to implement this policy?

  • Budget. If a development manager implements the $300 discretionary budget policy for his team, and there are 10 developers on the team, that's an annual cost of $3000 that needs to come from somewhere. Taken on its own, that figure might initially seem like a somewhat large amount for the manager to approach upper management and request. However, I would argue that the multiple real benefits provided by the discretionary budget (as outlined above) outweigh the relatively insignificant additional cost of the budget as compared to the (most typically) six figures already being spent on the developers' salary and benefit packages.
  • Perception of lost salary. As noted earlier, the potential exists for some developers to be annoyed that the $300 is money that could be going towards an increase in their base salary. However, I think the potential for negative impact stemming from this perception is limited – I suspect there aren't too many developers today who are annoyed that they have such a nice development machine to work with, because their employer could have bought them a weaker machine, and passed the $150 saved along to them!

Who owns property purchased with the budget?

If a developer buys a monitor or a book with the money from their discretionary budget, who does that item belong to? Who owns the item?

The Developer. The developer owning such purchased items, no strings attached, probably isn't a good policy. There would be nothing to stop a developer from buying a new video card and taking it home to exclusively use for playing computer games. The employer wouldn't see any real benefit in that case, and the development budget might as well just be rolled into the developer's salary.

The Company. A policy of the employer owning purchased items is a possibility. If the developer leaves the company, the company would retain possession of any items purchased. There could be situations where developers might purchase specialized items, though, which the company wouldn't have any real interest in retaining, such as a left-handed trackball (in the case that there are no other trackball-favoring lefties on the team).

The Developer – with a caveat. An employee-friendly approach that blends these ideas would be to allow the developer to have ownership of purchased items, but stipulate that the items are for use at the office only. This would give the company all of the benefits of the developer gaining productivity through use of their purchases; and in the event that the developer leaves, the company wouldn't be out a significant amount of money. This would also mitigate any perception by developers that the discretionary budget funds are coming out of their salary.

Whatever ownership policy is chosen, there are cases where exceptions to the general policy would be reasonable; for example, the company might allow developers to purchase a development-related magazine and have it delivered to the developer's home address (rather than to the office), to allow the developer to read the magazine at home in their spare time.

What happens to leftover funds at year's end?

My suggestion would be that funds left over at the end of the year would not be carried over to the next year; time-limiting the budgeted funds in this manner would encourage developers to use the funds to improve their productivity (per the budget's intention), rather than "hoarding" budget dollars, or alternatively, just ignoring the budget.

One potential issue with this approach is that some developers might, at the end of the year, spend their budget on frivolous purchases, just so their funds aren't "lost." One possible way to deal with this might be to give developers a cash award equal to something like 20% of their leftover budget funds. A developer with $100 left over at the end of the year might then be encouraged to not spend their money, to get the extra $20 in their paycheck; but the 20% is a low enough amount that developers probably wouldn't be very motivated to purposely refrain from spending any of their $300 budget throughout the year, with the intent of earning a mere extra $60 at year's end.

A realistic implementation of an existing concept

Certainly, the idea that developers should be given significant latitude to obtain whatever equipment they feel they need to do their jobs, and to have other exceptional on-the-job benefits isn't a new one; good articles on this topic include Joel Spolsky's A Field Guide to Developers and Jeff Atwood's Programmer's Bill of Rights. However, I have observed that companies which aren't among the group of a relatively few "elite" development-centric companies along the lines of Google, Microsoft, Joel's Fog Creek, or Jeff's (until just recently) Vertigo would (and actively do) simply balk at the prospect of the required expenditure and (perceived, at least) questionable ROI of implementing Joel's and Jeff's suggestions.

On the other hand, a basic $300-per-developer budget at outlined in this article might be more palatable, and thus realistically more likely to be implemented, at the mainstream of companies that employ developers -- both software-industry companies, and companies in other industries that have developers on staff to develop internal applications.

Action Items

Developers, feel free to present the developer's discretionary budget as described in this article to your manager, and see if you can't get a productivity-enhancing discretionary budget approved for the developers on your team.

If anyone does get such a budget implemented at their workplace after reading this article, please do let me know. I would be happy to hear about it!

Wednesday, April 09, 2008

How to rescue an off-screen window

On Windows, it is possible to get into a situation where one or more application windows are positioned entirely outside of the bounds of the viewable area of the monitor. This can sometimes happen with a machine in a multi-monitor setup where one of the monitors is disconnected; an application window that is in the minimized state at the time that a monitor is unplugged can, when the window is restored (un-minimized), be restored to a position somewhere off the screen, in what was the viewable area of the disconnected monitor.

Here's one way to "rescue" such an off-screen window and bring it back onto the active monitor:

  1. Make the off-screen window the active window by clicking on its icon in the Windows Taskbar.
  2. Press Alt+Space, and then press the M key. This will activate the window's system menu, and put the window into "move mode."
  3. Press any arrow key once. This will put Windows into a mode where moving your mouse will drag the active window around the desktop (even without holding in a mouse button).
  4. Move the mouse around until the window reappears on the active monitor.
  5. Left-click once with the mouse (anywhere) to exit "move mode."

That's it! This works on Windows XP, Windows Vista, and Windows 7. I hope this helps!

Wednesday, March 26, 2008

Tip: Creating a .zip file of a subdirectory tree in Windows Explorer

You can quickly and easily create a .zip file containing the files and subfolders in a particular subdirectory tree in Windows XP by right-clicking the root folder of the subdirectory tree to be compressed in Explorer, and then selecting Send To | Compressed (zipped) Folder from the context menu that appears.

Windows Explorer: Send To | Compressed Folder

Doing this causes Explorer to create a .zip file with the contents of the subdirectory tree (with the same name as the name of the tree's root folder, plus a ".zip" extension), located in the same folder as the subdirectory tree's root folder. The files in the created .zip archive retain their full path information (so that the folder structure of the subdirectory tree will be retained when the archive is later uncompressed).

This technique is handy for doing things like compressing the subdirectory tree of a small development project's source code, in order to easily send the code (in the form of the created .zip file) to another machine. The technique is also nice because it doesn't require the use of any 3rd-party tools.

Monday, March 17, 2008

Utility of the day: Dropper

Have you ever wanted to know the specific color of something shown on your computer screen? Dropper by Brian Friesen is a lightweight Windows utility that will let you do just that. It will show you the color of any pixel on your screen, regardless of which running application the pixel is located in.

One limitation of Dropper is that it is an older application ("older" in this case meaning 2006!), and doesn't have multi-monitor support; it can only show the color of pixels in the primary monitor on multi-monitor systems.

You can download Dropper from its page on Brian's website.

Tuesday, March 11, 2008

Utility of the day: Ditto

In most of today's major operating systems, the built-in clipboard has a significant limitation: it can hold only a single item a time. If you cut or copy a second item onto the clipboard, the first item is gone, with no direct way to recover it. Jeff Atwood posted about this issue recently in more depth on his excellent Coding Horror blog.

From the comments on Jeff's post, I learned about an excellent Windows utility that addresses this problem: Ditto. Ditto allows you to use a configurable system-wide hotkey (I'm currently using Ctrl+Alt+v) which brings up a "history browser" with all items that had been recently copied to the clipboard. Ditto automatically takes care of saving clipboard items, so that older items are no longer lost when a new item is copied to the clipboard.

Since installing Ditto on my machine, I've found myself using it more and more. In addition to being able to easily paste items that I know that I had on the clipboard recently, avoiding having to re-copy or retype them, Ditto enables me to in some cases plan ahead and do things more efficiently. For example, say that I have a large text document open, and I want to copy two nearby (but not adjacent) snippets of text from a location near the beginning of the document, and paste each of them to a location near the end of the document. With just basic operating system clipboard functionality, I'd need to:

  • Copy item 1;
  • Scroll to the end of the document;
  • Paste item 1;
  • Scroll back to the beginning of the document;
  • Copy item 2;
  • Scroll back to the end of the document;
  • Paste item 2.
With Ditto, I can achieve the same end result more quickly:
  • Copy item 1;
  • Copy item 2;
  • Scroll to the end of the document;
  • Paste item 2;
  • (Using Ditto) Paste item 1.
Ditto is written in C++, and is free and open-source. You can download it from the Ditto Homepage.

Thursday, March 06, 2008

Leading/Trailing space characters in filenames

Did you know? On Windows, it's legal for filenames to have leading space characters! I've developed on Windows for years, but didn't realize this until just recently. For example, at a command prompt, in a directory that contains a file named t.txt, the following works:

C:\temp> copy t.txt " t.txt"
        1 file(s) copied.
This results in a directory listing like:
 Directory of C:\TEMP\spaceTest

03/06/2008  05:29 PM    <DIR>          .
03/06/2008  05:29 PM    <DIR>          ..
03/06/2008  05:29 PM                 4  t.txt
03/06/2008  05:29 PM                 4 t.txt
               2 File(s)              8 bytes
What about Linux/Unix? I tested briefly using a couple of servers running HP-UX and RedHat Linux at the office, and found that both Linux and Unix (at least the flavors that I tested) support both leading and trailing spaces in filenames! For example, at a shell prompt, in a folder that initially contains just the file t.txt:
$ ls -Q
$ cp t.txt " t.txt"
$ cp t.txt "t.txt "
$ cp t.txt " t.txt "
$ ls -Q
" t.txt"  " t.txt "  "t.txt"  "t.txt "

(The -Q flag on ls as used in the example above causes filenames in the listing to be displayed enclosed in doublequotes, which was useful for showing that the filenames do indeed include space characters. The -Q flag is supported on the copy of ls on the RedHat Linux server I'm testing on here, but not on the HP-UX server.)

The fact that filenames can contain leading (and, on Linux/Unix, trailing) space characters seems like a good thing for developers to be aware of. Use caution when writing code that trims leading and trailing whitespace from a string that represents a filename!