Clojure at Entrepreneur First
Conan Cook, EF Technical Lead
Company builders tend not to have software teams supporting them. Entrepreneur First is different. We have software specialists and we use Clojure. Why? It follows from the nature of our business.
All business is about people, and possibly more than any other, Entrepreneur First is a people business.
We run a process which starts with people and ends with people, but it has to be much more than that: what comes out at the end has more value than what went in. It can be thought of as a pipeline, through which individuals become companies. But we don’t transform people: they’re the same ambitious individuals when they toast their exit as they were when we first met them for coffee. We add to them.
The EF programme helps our members collect new skills, insights and relationships that build on top of what first drove them to become a founder, and we select for people with this growth mindset: those who are actively levelling up. Knowing how this happens is our speciality.
From before they join EF to after they complete the programme, the people of EF generate data.
Immutable, but extensible
You are not unchanging, but rather in a constant state of flux. However the facts that describe you are: once you’ve learned how to ride a bicycle, build a neural network or take a breath while presenting, you never lose that ability (although you might get a little rusty at times).
The changes that occur in founders arise from their acquisition of new experiences and understanding. These personal enhancements are necessary for an entrepreneur to deliver their vision to the world, as every market is different and must be learned, and the best markets — the ones that are created by new products — cannot be learned from others.
People don’t build companies alone. They form teams, develop relationships and acquire customers: this is their network. Entrepreneur First is itself a network of people: that is its value. Networks become more valuable as they grow, and technology is the enabler of this growth. EF is a process that both creates a network and adds to the value of the people in that network.
At Entrepreneur First we help people maximise their impact, and now we are reaching more people. We are increasing our scale. There is no blueprint for scaling a company builder, but to achieve scale it’s clear we need technology to connect the people in our network. This makes EF more valuable to its members; as the network gains value, the need for tools to exploit that value increases.
Enter the hammock
Thus EF is a dynamic network of dynamic people, and must be modelled as such. So what do we need from our technology?
- For our entities to accrete data over time, and our view of those entities to evolve independently.
- To query our data in arbitrary ways for exploratory data analysis.
- To model social graphs (networks)
- To build Rich client applications with a workflow that minimises iteration time.
Clojure is a perfect fit. Its dynamic typing means our entities are made up of transferable primitives — numbers, strings, boolean flags and collections — and we don’t have to know up front what they will look like: we can add new attributes at will. A type system here would tie us down, but Clojure’s reliance on maps as a modelling tool means we can retrieve data declaratively, and compose these elements programmatically. It allows us to keep our logic separate from our data, which in turn supports the growth of each independently. Clojure.spec affords us granular definition of these entities, giving us confidence in our systems and generative testing for free.
Crucially, these capabilities themselves are extensible — they will not break as our data and its structure accrete over time. Nothing we do today will prejudice what we choose to do tomorrow.
So too is the confidence afforded to us by Datomic. As an append-only database, nothing is ever lost or modified, and we can always look back in time. This has two benefits: protection from mistakes (we can rebuild our state) and historical meta-analysis (We can compare our own methodology over time, using our history of code and data together).
In addition, Datomic’s Entity abstraction is a natural expression of a graph data structure, as it provides a native way of walking the graph. Datomic has networks built-in.
A note on decisions
Data is for making decisions; we ask questions of it to inform our choices. For data to be a useful resource, it requires four things to be done to it:
The hype about Big Data died down when everyone realised it wasn’t enough to get data, persist it to storage and run analytics on it. That simply generates more — albeit different — data. To have value it must inform decisions, and to do that it has to be understood by humans: it needs to be visualised. This means user interfaces, both to collect data from people and to provide them with visualisations of our analysis (see how it’s always about people?).
In Datomic and Clojure, we have excellent tools for storing and analysing data, so how do we collect and visualise it with equal efficiency?
In a word: ClojureScript.
Productivity from the interactive development environment provided by the combination of REPL, immutable data structures and Figwheel’s hot reloading is as good as or better than any other front-end workflow. Facebook’s React framework has succeeded where nearly all others have failed (they seem to have a knack for that) and is the de facto standard for modern UI development, and re-frame’s event loop is a masterful construction.
On top of all this, the reduction in cognitive load on a developer who does not have to switch language as their data moves up the stack is a huge time-saver, and lowers the bar for the developers themselves to expand their own skills and experience.
This isn’t a sales pitch for Clojure, but rather a demonstration of how our technology choices derive from our business. Every business need can be met by a range of tools, and we could make different decisions for them all; but that would leave us with a disjointed set of technologies and more overall complexity. The Clojure ecosystem provides consistency whilst allowing us to still make best-in-class selections from the available options. EF is a unique company and discovering products that support its mission is exhilarating, so why shouldn’t its technology be as well?
If you’re interested in joining the EF tech team, you can apply online.