clj.orcery

Language, Expression and Design

Friday

21

August 2015

lein midje-doc is now hydrox

by Chris Zheng,

midje-doc was hacked out in about a week and a half at a very critical junction of my life. The backstory was that I became unemployed and took a trip up to Bali. I lived frugally, did yoga and hacked during the wee hours of the night. The situation was not entirely desperate as such but I knew that I had to do SOMETHING so that it did not get to that.

At the time I had a bunch of libraries that I had been working on for close to a year and a half. I had been doing show and tell on my laptop, but it wasn't really a great way to promote myself or my libraries. The one thing that I had were tests - lots of them - and I thought to myself... "Wouldn't it be nice to be able to write something which can display my tests in a form that anyone can read and see that I have in fact done some good work".

In essence, I really needed it for my next job interview because in my mind, the one question that was going to come up was: "I see you've been working part-time for the last 2 years at a New Age Crystal Store. What EXACTLY were you doing there?"

It turned out that writing midje-doc was the best thing that I could ever do with my own personal workflow. Actually, it changed the way I worked and it made me increasingly aware of design as the key aspect to a great library/project. Furthermore, having something that lets me write documentation that could be automatically maintained meant that I could rest easy at night knowing people reading the docs weren't doing things that they were not supposed to (at least I wasn't the one telling them to do it).

2 years later, and I'm happy to announce the revamped version of the tool hydrox. I'm also happy to say that the library has found a home at helpshift where we are trialling these tightly integrated development workflows. There are significant architecture improvements of hydrox over midje-doc including:

  • Declarative source code traversal using jai
  • Extensible micropass pipeline for compilation and linking (my favorite feature)
  • Customisable templates system for html documentataion
  • Code-diffing mechanism for efficient management of filesystem changes

To put it bluntly, we switch from a two-stroke to a V8 engine. Anyways, enough said. Please read the docs