Skip to content

Category Archives: Tools

Quick command line spell check of a single word or sentence

Here’s a short bash script, using aspell, to spell check a word or several words from the command line. It’s simple but effective. If anyone else knows a cleaner or even simpler way, please let us know. #!/bin/bash WORD=$1 TEMPFILE=temp.spell echo $WORD > $TEMPFILE aspell -c $TEMPFILE cat $TEMPFILE rm -f $TEMPFILE rm -f $TEMPFILE.bak [...]

JavaScript Unit Testing

TechTalk: Testing Rich Client Web Applications by Jeff Hemminger from Object Partners on Vimeo.

Multiple Gmail Inboxes

This caught my eye recently as a nice addition to the gmail labs. I’ve been using a second inbox as a todo-list, filtered on starred items. I can also prioritize tasks based on different stars.

My Screen

Screen is a great tool for command-line usage, and is also available for cygwin. If you enjoy using the command line, and haven’t checked out screen, I highly recommend it. I found some of the commands and configuration changes a little difficult to remember, so I’m adding them here. First of all, the main screen [...]

Emacs Macros 101

Macros are really useful for programming, but since adopting Eclipse I haven’t been using them as much, much to the detriment of my fingers. For a while I used Notepad++ for macros. Macros are easy to use with Notepad++, but unfortunately you’re limited to trivially simple macros- for example, you can’t “search” your way through [...]

Headless Javascript Unit Testing

I gave a presentation at work a couple of months ago covering JavaScript scoping considerations for a team of Java developers new to JavaScript. During the presentation, I used Rhino to run the examples. I have seen other projects that use Rhino for unit testing, but they seemed a little heavy weight for what I [...]

Disabling Ganymede Plugins

In Ganymede, the Manage Configuration option Eclipse users were used to using is gone. Help->Software Updates is for just that now. So how do you go about disabling a plugin now? Well the good news is you no longer have to wait 5 minutes for the Manage Configuration window to load! Ganymede Eclipse now provides [...]

EasyMock IllegalStateException

I had a case this morning reworking a test after I’d modified a method signature, from: expect(mockRestProxy.getProxiedResource((String) anyObject())) .andReturn("{policies}"); to expect(mockRestProxy.getProxiedResource((String) anyObject(), userIdentity)) .andReturn("{policies}"); I received a stacktrace like this: java.lang.IllegalStateException: 2 matchers expected, 1 recorded. at org.easymock.internal.ExpectedInvocation.createMissingMatchers(ExpectedInvocation.java:41) at org.easymock.internal.ExpectedInvocation.<init>(ExpectedInvocation.java:33) at org.easymock.internal.ExpectedInvocation.<init>(ExpectedInvocation.java:26) at org.easymock.internal.RecordState.invoke(RecordState.java:64) at org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:24) at org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethodsFilter.java:45) at $Proxy0.getProxiedResource(Unknown Source) … To quote the [...]

Running JSLint From Within Eclipse Using Rhino

Mikko Ohtamaa provides a nice explanation of how to execute JSLint on a javascript file from within eclipse, using Rhino.

Grails Multiple Datasource Plugin

Burt Beckwith discusses his new plugin – one I’ve been needing for a while!