Matt Whipple, Software Engineer

Pathological Software Engineering

Spock Recipe - Collaborator Argument Assertions

07 Jan 2017

The Spock testing framework is likely my favorite general purpose testing library: it allows for clearly organized and expressive tests without introducing a notable departure from writing standard code (and Groovy helps make the coding part enjoyable for many target JVM languages).

In the course of using it for several years I’ve adopted some techniques which use the provided tools in ways which extend beyond standard documented approaches. One of these is an alternate way to check on arguments that the unit under test passes to a collaborator so that better feedback is returned on failure.

Full Post >

gradle-release-svnkit's Lease Has Expired

03 Jan 2017

gradle-release-svnkit is the latest casualty in my gradually cleaning up my GitHub presence. The project was created when I’d introduced the gradle-release plugin to a Subversion-housed project and some of the team (on Windows) were having issues with the standard plugin’s use of CLI svn. That project switched to git shortly thereafter and this extension became no longer necessary.

Shortly after the extension was created, the core gradle-release plugin underwent significant internal revision and so a bit of work would be needed to ensure this provider aligns with the new code. I don’t see myself spending any time with svn in the near future, and although the individual technologies involved are very likely popular I wouldn’t bet on the intersection of them being that common…especially in an environment where the CLI svn client wouldn’t be readily usable by the developers (and likely preferred). So for this reasons the code will be left as is, targeting an increasingly out of date version of gradle-release. :tractor:

Full Post >

When to Use ReactiveX

31 Dec 2016

Reactive is one of the software industry buzzwords of the moment, and ReactiveX (rx) is one of the principal, cross-platform implementations of what it means to be reactive.

After spending a little over a year using rx at times and at other times deciding rx isn’t worth using, I now (hopefully) have a pretty firm handle on when (and when not) to introduce rx into a piece of code.

Full Post >

Adding Navigation by Tags to Jekyll

29 Dec 2016

When looking to add tags and tag-based navigation to this site, I couldn’t find an appealing documented solution for Jekyll (without plugins). Some existing solutions that were discovered provided some ideas (and in hindsight some large pieces that could have been used), but most of them seemed to require some ongoing attention or introduce needless complexity.

I was looking for a simple no-maintenance solution: ultimately created through the use of a single page which iterates over the site.tags hash and uses JavaScript for in-page navigation.

Full Post >

Checking the Size of a Collection in RSpec

08 Dec 2016

Verifying the length of a collection is a common need when writing tests, but doing so in newer versions of RSpec is something for which I had to stumble around a bit before finding a solution I liked. Like many other pieces of RSpec it can be handled nicely by the built-in matchers if you know how to yield them effectively, but my relative inexperience with Ruby combined with the relatively low priority of my attention to RSpec led me to defer attempting to adopt have_attributes for that purpose until recently…but now it’s a key piece in my attempts to write more expressive tests.

Full Post >

Listify Macro in Scheme

04 Dec 2016

Having previously mentioned that hygienic macros in Scheme can help enforce a separation of responsibilities that leaves most of the work to be done at evaluation time, now I’ll provide an example of what a macro can be useful for.

Macros in general can help make sure that the code that is written is in a form that is consumable at evaluation time. A specific example of this is making sure that s-expressions that contain only data aren’t evaluated. If a list such as ("a" "b" "c") isn’t quoted then Scheme won’t be happy at evaluation time. As far as I can tell there’s no quoting behavior which behaves like list and works recursively…so it’s a perfect candidate for a macro.

Full Post >

Sproogle EOL and Thoughts on Google Closure Templates

29 Nov 2016

Several years ago I threw together Sproogle which is a project to integrate Google Closure Templates as a View technology for Spring MVC. As part of tidying up some of my GirHub presence I’m now officially end-of-life’ing the the long neglected code base.

Here’s a little more info and some thoughts on Google Closure Templates resulting from working on the associated project.

Full Post >

Why I Prefer My Macros to Be Hygienic

22 Nov 2016

We’ve all been there…at some fancy dinner party with delightful small talk and inevitably the conversation shifts to a discussion of Lisp macros and the heated discussion begins around the more common defmacro style macros used in Common Lisp and Clojure versus the hygienic alternative such as offered by Scheme. As the debate rages you slouch down in your seat and hope everyone is too caught up in their own passion to ask for your input and expose your ignorance on the matter.

I’m obviously kidding….there’s nothing delightful about small talk.

Full Post >