Learning functional programming was never going to be easy, so after attempting to write Space Invaders for the fifteenth time I opted for something simple and familar to me - the task of writing a database.
Specifically I chose to re-implement the document database RavenDB (a C# project) in Clojure on top of LevelDB and Lucene and focus on how a system like this could and should be put together and tested reasonably as well as providing a good development experience to anybody foolish enough to consume this in a project.
This involved constant code review from the Clojure community in London, and many corrections and re-writes over the course of six months and during the course of writing this project I ended up in the top 100 committers on Github!
Lessons learned? Interop is hard. Controlling access to resources is hard. Testing is easy but isn't always the best way. The REPL is your friend. Data oriented design is important. Core.async is a great way of managing complicated processes but needs managing carefully.
In this session I aim to go through a step by step point of showing tangible examples of each lesson learned, and how this has influenced the code I write both in Clojure and other language such as Erlang and JS.
Note: This database is not a commercial or even usable product, and as such is not the subject of the talk - more it is a collection of interesting code examples and challenges that needed solving.