Andrew Oberstar


November 19, 2016

Just testing the feed after migrating from Squarespace to GitHub Pages.

Drinking the Clojure Kool-Aid

November 06, 2014

As with Scala, my first experience with Clojure was the 7 Languages in 7 Weeks book. That merely gave me a flavor of Clojure’s syntax, but didn’t lead me to the deep philosophical underpinnings behind Clojure. More recently, I’ve been watching a lot of Clojure talks and have found Rich Hickey (creator of Clojure to be a very inspiring speaker. His Simple Made Easy talk is easily my favorite, where he lays out a clear distinction between the concepts of simple (as opposed to complex) and easy (as opposed to hard) and how certain programming constructs contain an inherent complexity. That talk also popularized the term complect (to intertwine or braid) within the Clojure community as a way of emphasizing the precise type of complexity that Clojure intends to avoid.

As I’ve read mailing list threads and blog posts and watched more talks by others in the Clojure community, it’s clear that the philosophy behind Clojure has a profound resonance with them. It can sometimes seem like they all part of a cult led by Rich Hickey, however, I completely buy into it.

Here are some of the core tenets that I really appreciate, along with some of the corresponding Clojure features:

  • Immutability should be the default. (persistent data structures)
  • Mutability constructs should be safe. (refs, agents, atoms)
  • Polymorphism can be done without inheritance. (protocols, multimethods)

While some of these are concepts that are often espoused by “good” programmers in many languages, Clojure goes to a great deal of effort to make these “simple” concepts “easy”.

Quick Gradle Tip - Setting Bintray Attributes for Gradle Plugins

September 28, 2014

As part of the new Gradle plugin portal, you need to set some attributes on the version of your plugin package in Bintray.

The Bintray Gradle plugin lets you set attributes, so you can add the following snippet into your project to include all of your plugin IDs in the attributes.

Since Gradle requires you to put a properties file in your JAR for each plugin, you can get derive your whole attribute value from the project’s group, name, and the names of the properties files within META-INF.

def pluginIds = project.fileTree(
    dir: 'src/main/resources/META-INF/gradle-plugins',
    include: '*.properties').collect { file ->[0..('.') - 1)] }

bintray {
    // ...
    pkg {
        // ...
        version {
            // ...
            attributes = ['gradle-plugin': pluginIds.collect { pluginId ->
                "${pluginId}:${}:${}" }]