PurelyFunctional.tv Newsletter 257: Dynamic, Benchmarks, Design Patterns
Sign up for weekly Clojure tips, software design, and a Clojure coding challenge.
Merry Christmas and Happy Holidays,
Please enjoy the issue.
PS Want to get this in your email? Subscribe!
I heard a couple of days ago that two hotels in the group have extended their discounted rates. Both the Bourbon Orleans and the Dauphine Orleans have extended their discounted period if you register through the link on the Clojure SYNC site. This will end for both hotels on January 4th and will not be available after that.
If you were thinking about going to Clojure/West in 2018, remember that it has been put on hold. Clojure SYNC is the Clojure conference of the first part of the year. Get out of the snow and get down to the Big Easy.
Also, if you're on a budget, do check out the hostels on the lodging page. There are some really close hostels for under \$40/night.
And finally, I've extended the Opportunity Grant applications. I don't know how much money we'll get to fly you down and lodge you, but if you apply, I will give you a free conference ticket.
Bret Victor's project has a new website and it's full of hope!
Some benchmarks of different languages and frameworks implementing the RealWorld project. ClojureScript (with Re-frame) does really well, though it's not the best in all metrics in this study.
Brian Marick talks about the origins of Design Patterns and how they never lived up to the initial intent. He has an interesting perspective, having been a reviewer of the original Gang of Four book. He does a great job of explaining why they fail, with an interesting theory of where they went wrong.
My theory is that the Gang of Four design patterns were trying to codify coding solutions to coding problems. But the original Pattern Language book is not about architectural solutions to architectural problems. It's about architectural solutions to human problems—in particular the humans who inhabit the building. The goal is to increase the life and happiness of those humans.
If we're talking about coding solutions to human problems, the first thing we have to ask is "which humans?". There are two classes of humans who "live" in the software the way we write it today: the programmers and the users. The users don't deal with code, so coding solutions are not the right level—this is more UI design. But programmers do "live" in the code. They need to find their way around. They need to make small changes and large changes. They need to figure out what something does, why it's not working as expected, and find a fix.
So the kind of patterns we want to explore is not patterns for how to traverse a tree, but instead patterns for writing code that make the code more habitable. The patterns should be stuff like Why? Comment—an inline comment describing why the following line should exist. Or Tiny Commit with Big Commit Message. Or Contextual Namespace—organizing your code into namespaces each focused on a single cohesive idea. In other words, they're not software solutions but code solutions. They should help the human problems of software development: long-term maintenance, evolution over time, and communication with your team and your future self.
But more than that, Christopher Alexander's work, including A Pattern Language, documents a process. It's a process of going out into the field where the buildings will be built. The architect is a guide, helping you, the client, imagine what would make your life most full. They guide the client, through a process of discovering that they do have a sense of how things should be. It's about letting that sense come out, by relaxing, by tuning into it. This is totally absent from Gang of Four.
In conclusion, Design Patterns, as we know them, are good for sharing the ideas of how to program difficult solutions to common problems. They also give us a shared language. However, they fall short of the ultimate goal of increasing the quality without a name of our code. Those kinds of patterns would have to solve human problems with code itself as the medium. And further, those patterns would be discoverable in existing codebases—not in the abstractions, but in the aspects of the code itself.
Evan Czaplicki, the creator of Elm, talks about how important storytelling is when constructing a language.
Adam Bard has created a pretty nice side income with a SaaS written in Clojure. Nice job!
This is the first article I've seen about using the new Command Line Interface that comes with Clojure 1.9.
Zainab Ali dives deep into Category Theory.
The holidays have wreaked havoc on my recording schedule. But I did release one lesson since the last newsletter: