Matt Whipple, Software Engineer

Pathological Software Engineering

Inheriting Transitive Dependencies

12 Mar 2017

Using already existing libraries of code is an easy way to avoid reinventing wheels and seize an associated jump-start to a finished product. It can also result in a highway to assorted types of hell as various incompatibilities manifest which can result in recondite errors or maintenance obstacles. Often these issues may be disconnected from the specific benefits the library is providing, at which point the pain associated with a library may outweigh its value.

If you’ve spent time with a project that pulls in transitive dependencies then you’ve almost certainly wasted some time diagnosing issues where modules require different definitions of something or other, and because of that things are blowing up or upgrades are blocked…or maybe you’ve worked on projects where these kinds of issues are avoided by never touching the defined dependencies (maybe jumping through hoops to ensure that those aging referenced versions remain available). A lot of these issues can be addressed if transitive dependencies are treated like OOP inheritance.

Full Post >

elisp-builder Introduction

04 Mar 2017

Generating Lisp from Java…A contrived interview programming interview question? A self-indulgent way to nerd out?

I do have a reason to undertake this that has a practical application (albeit maybe still self-indulgent). I’m not doing anything too elaborate and don’t even need to be able to evaluate the code. I threw together a Gradle plugin a couple years ago to help in writing Java projects using Emacs with JDEE so I’m looking for a good way to programmatically build the Lisp code which can be rendered to be later evaluated by Emacs. I’m not presently using JDEE, but the plugin is being used by others and I do have plans to revisit JDEE now that it seems to be getting renewed attention (which working on this plugin will likely compel me to do).

Full Post >

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 >