Pin Eclipse to taskbar in Windows 7
There’s an issue with pinning Eclipse to the Windows 7 taskbar on 64-bit systems. Fortunately one of the suggested workarounds does the trick for me.

Problems with Eclipse 3.6 Helios plugins on Windows 7
I like to stay up-to-date with the latest Eclipse releases, often times using release candidates weeks before an actual release. The Eclipse release candidates, generally speaking, are top-notch and free of problems. So I was very surprised to discover a major problem with the 3.6 release almost immediately.
the problem
The problem was this: plugins did not appear to work. I dutifully installed my standard plugin set using the Update Manager but discovered no evidence of the effort after a restart. Subclipse? Missing. Mousefeed? FindBugs? nWire? Missing! Read more
Sun Java 6 on Ubuntu 10.04 10.10 and later
Much to my surprise, but probably not those of the Open Source Ruling Class, Sun’s Java 6 has been removed from the Ubuntu Multiverse. Apparently the Ubuntu folks have started putting some weight behind their recommendations for switching to the “OpenJDK.” Fortunately, the official, “proprietary” Java is still available through another Ubuntu repository.
To make Sun’s Java 6 JDK available on Ubuntu 10.04, 10.10 or later, add the new repository like so:
add-apt-repository "deb http://archive.canonical.com/ lucid partner" && aptitude update
Then, be sure to follow my previous instructions for installing the JDK.
Sort two files and compare, in one shot
At least once a week, I find myself wishing I could sort two files and compare them in one shot, from the commandline, without creating intermediate files. Today I’m glad to say I found my answer.
Here are two examples:
diff -y <(sort file1) <(sort file2)
comm -3 <(sort file1) <(sort file2)
See this wikipedia entry for a comparison of the diff and comm commands.
Better consoles for cygwin shells
Let’s face it, cygwin is neat but the console it launches is lame. I’m not referring to bash, but rather the normal — and thus lame — Windows command box. Things just don’t feel right… some keys don’t work as expected and forget about making the window wider. Fortunately, there is a better way!
Rather, I should say there are better ways: puttycyg and mintty.
puttycyg is a patched version of putty with support for cygwin. mintty is … well, yeah, it’s based on putty, too.
If you use cygwin, you owe it to yourself to try one or both of them immediately. And by that I mean stop reading and start downloading. Now.
Shutting down ehcache properly
If you’re using ehcache’s disk persistence feature, which allows the cache to survive across JVM restarts, be sure to shut down ehcache properly.
To do so when using ehcache within a webapp, simply add its ShutdownListener as a listener in web.xml.
<listener> <listener-class>net.sf.ehcache.constructs.web.ShutdownListener</listener-class> </listener>
Alternatively, or when not using ehcache inside a webapp, instruct ehcache to register its own shutdown hook by setting a system property.
net.sf.ehcache.enableShutdownHook=true
If you forget one of the above, your persisted cache may not be up-to-date, or worse, not persisted at all.
Jetty browser cache control
Do you use Jetty and need to change the default setting for browser cache control? Have a look at the init-param element named cacheControl in webdefault.xml.
Here’s the default configuration for the version of Jetty I use. Note the element is commented.
<!-- <init-param> <param-name>cacheControl</param-name> <param-value>max-age=3600,public</param-value> </init-param> -->
To enable and configure browser cache control, uncomment and edit the param-value as appropriate. The following example instructs the browser to disable all caching.
<init-param> <param-name>cacheControl</param-name> <param-value>no-store,no-cache,must-revalidate</param-value> </init-param>
For information on Cache-Control, see RFC 2616, Section 14.9.
SVN repository moved
If you use Subversion via Apache/WebDAV and get a message like “Repository moved permanently” or “301 Moved Permanently” you should definitely read the Subversion FAQ on the 301 issue.
But, don’t take its advice too literally… you may indeed have a configuration issue, but not with DocumentRoot. Be sure to check your Apache configuration for any overlapping/conflicting SVNParentPath and Alias entries!
Mount NTFS partitions at startup with fstab
Yesterday I helped a coworker figure out the best way to have Linux mount an NTFS partition at startup. It was an interesting little problem because there are multiple solutions but only a single “correct” solution.
At first I questioned the need to do anything at all — my computer apparently mounts my NTFS drive on its own but I couldn’t remember how.
Before I found the ultimate solution, one approach my coworker attemped was to have gnome execute a script at login which used the mount command. This didn’t work; he forgot to use gksudo and anyway the script never seemed to run.
Then I remembered fstab and the rest is history. If you need to accomplish the same thing, be sure to read his fstab blog post.
Processing: Case-Shiller Home Price Index
I’ve updated my Processing app to use the latest Case-Shiller Home Price Index data as of May 26, 2009. (For the uninitiated, see my previous post.) Read more

