-
April 14, 2012
The future of Web development isn’t MVC, it’s MVM When Ruby on Rails hit the Web development world in 2005, it changed everything practically overnight by bringing a pattern rooted in Smalltalk to the Web. I’ve been playing with the recently-released Meteor Web framework and I think that an important and equally momentous shift is taking place in the Web…
-
March 28, 2012
Building mesh abstractions I’ve had a concept rattling around in my head for a while but I haven’t quite found the right way to describe it yet. The closest that I’ve come is the concept of a mesh as a metaphor. Abstractions are a tricky thing in that they are never perfect. In some cases we try to make them…
-
March 13, 2012
Text transformation with JSON and regular expressions Ever since I wrote the Jath Javascript XML processing library I’ve been thinking about ways to declaratively transform various things to JSON. Perhaps not-so-coincidentally, I’ve been talking about ways to update the tools we use to pass around data structures rather than text blobs lately. Since I wrote that post, I’ve been toying…
-
March 13, 2012
Testing the Clojure way I’ve been through several iterations of testing fads already in my programming career. The bottom line regardless of any fads however, is that you need to test your code. Somehow, some way. Manual testing is bad, automated testing is good. 100% test coverage is impossible, and shouldn’t be a stated goal. Zero defects is silly, not…
-
March 6, 2012
Functional programming and the death of the Unix Way Small tools, each doing one thing well, has been the call of the Unix Way since its inception some 40 years ago. However, if you look at even the basic tools that ship with a modern Unix (Linux, BSD) many of them have an abundance of options and layers of additional…
-
February 26, 2012
Running programs as Linux daemons using Upstart In the Windows world, any long-running background process on a machine is handled as a Windows Service. This is a well-known programming interface that allows the system to coordinate startup and shutdown procedures and allows an administrator to use the service management tools to control and log details of the process. In Linux,…
-
February 16, 2012
Clojure and the Classpath Since Clojure is built on Java, and Java depends on the classpath to find code that it wants to load and execute, we are stuck using the Classpath when we run Clojure code. Usually we use Leiningen ; to manage the Classpath. “Lein” as we’ll call it from now on, uses a small Clojure file as…
-
February 12, 2012
Functions vs macros in Clojure In my third post on the Clojure programming language I’m going to cover macros. I have a function that I converted to my very first macro in Clojure. I’m going to tell the story here, because it sort of made macros a lot less scary. To begin the story, let’s consider a block of code…
-
February 12, 2012
Clojure lazy sequences, ISeq Functional languages like Clojure support lazy evaluation of expressions. This contrasts sharply with languages like C# where every expression is evaluated immediately. In order to get something that resembles a lazy sequence in Clojure would be to use IEnumerable and yield. Ok so I should probably dig into comparing Clojure sequences with C# Iterators, but I’m…
-
February 9, 2012
Functionally speaking with Clojure and Javascript I’ve been playing around with Clojure a lot more recently as a result of a new project that I’m wor king on. I have played around with Clojure before, especially in the context of the recent .NET port of Clojure . I considered myself to be pretty familiar with functional programming ideas. Higher order…