Tuesday, April 26, 2011

Bounds Test v2.1.2 Released

A minor update to my “on-screen ruler” utility for Windows, Bounds Test, is now available.

This update fixes a bug where the drag-to-move and drag-edge-to-resize mouse functions did not work when the cursor was positioned over the “Widescreen Resolutions” text label.

Download it here: Bounds Test v2.1.2 (16k). It’s also available on my Windows utilities page.

ccc (Clipboard Character Count) v1.0.2 Released

I just posted a small update to my ccc (“Clipboard Character Count”) utility.

ccc is a simple command-line utility for Windows that I originally wrote back in 2006, which returns the count of characters currently present on the system clipboard.  (Useful these days to quickly see if a thought you’ve jotted down will fit in an SMS message or twitter update.)

In this update, ccc now looks for HTML table data present on the clipboard (i.e. content copied to the clipboard from a table on a web page); if present, ccc additionally reports the number of rows present in the copied portion of the table (based on the count of <tr> tags present in the copied data). This is a slightly faster way to get a count of the number of rows in an HTML table than pasting the content into a fresh Excel sheet and looking at the row number of the bottom row of data.

Share and Enjoy: ccc 1.0.2 (4k).  You can also get it on my Windows utilities page.

Windows tip: Use “junction” for easy access to deeply nested folders

At work, I have a particular folder on my Windows PC that I access many times per day to open and save various documents for the project that I’m working on.  I have two conflicting needs for where in the filesystem that folder should be located":

  1. C:\.  As I prefer using the keyboard to the mouse for quick and easy tasks, the ideal location for this folder is directly off the root directory of the C: drive.  It’s pretty easy to type, for example, “c:\proj\todo.txt” into an application’s Open dialog, or from the command prompt.  I can do that more quickly than switching to the mouse, clicking “My Computer”, double-clicking “C:”, double-clicking the “proj” folder, scrolling “todo.txt” into view, and then double-clicking on that file.
  2. My Documents. My office’s automated backup policy only picks up documents that are located under the “My Documents” folder.  While I could locate my “proj” folder under My Documents rather than under the C:\ root directory, typing “c:\documents and settings\jschneid\my documents\proj” 30 times a day rather than just “c:\proj” obviously becomes very inefficient very quickly.

So, to summarize the problem: I want my use-it-all-the-time “proj” folder to be at “c:\proj”, but I needed it to be under “My Documents” in order for it to be picked up by my office’s backup scheme.

The solution: The Junction utility, part of Microsoft’s Sysinternals suite of tools.  The Junction utility allows the creation of a folder at a particular location in the filesystem which is really a symbolic link (shortcut) to another folder, which the command prompt and Windows Explorer respect.

In my case, I created my “proj” folder under My Documents (so it would be picked up by my office’s backup process).  Then, I used Junction to create a symbolic link to that folder at “c:\proj” for easy access to that folder via the keyboard.

This solution has worked out great for me.  I type “c:\proj” many times every day – saving a couple of seconds over using the mouse to access that folder every time.  I wanted to share this tip for anyone else out there who might be able to benefit from having an easy-to-access shortcut to a deeply-nested folder on their filesystem – and for those that might not have been aware that it’s possible to set up Unix-style folder symbolic links on Windows.

Friday, April 01, 2011

Announcing: Unified Theory of Software Defects!

Earlier today, after entering my 460th bug report on a large software project that I’ve been working on at my job, I was suddenly struck by a bolt of inspiration: All software defects are caused by only two possible root causes! Without further ado, I hereby present my Unified Theory of Software Defects:

1. Somewhere, there was a 0 where there should have been a 1.
2. Somewhere, there was a 1 where there should have been a 0.

Yes, that's right... every software defect that has ever occurred can be traced to some combination of these two fundamental causes! Astonishingly simple. Marvelously elegant.

And of course, this theory gives rise to a Unified Corollary of Repairing Software Defects:

Adjust the software such that all 0s and 1s are properly placed.

I fully expect this discovery to revolutionize the craft and profession of software engineering. No, no need to thank me; I’m just glad to have the opportunity to give back to the community in this small way.

(Postscript 1: Developing a universal theory of just how any arbitrary software program can be adjusted “such that all 0s and 1s are properly placed” is left as an exercise for the reader.)

(Postscript 2: Happy April 1st!) :-)