You are viewing content from a past/completed QCon

Presentation: Habito: The Purely-Functional Mortgage Broker

Track: Advances in FinTech

Location: Windsor, 5th flr.

Duration: 10:35am - 11:25am

Day of week: Monday

Slides: Download Slides

Share this on:

This presentation is now available to view on

Watch video with transcript

What You’ll Learn

  1. Hear why functional programming is beneficial for large projects, and how it helps especially with migrating the data store.
  2. Understand how Habito benefited from using Haskell, some of the wins and trade-offs.


The tech stack a business chooses impacts the company in many ways - who joins, what they build, what their values are and, ultimately, whether or not the enterprise succeeds. While in recent years functional programming has seen a resurgence, it remains a niche choice that to many highly pressured start-ups might look risky. Habito, the leading digital mortgage broker, is now in its third year. With several major accolades to its name already, the fact that it is built on a purely-functional tech stack sometimes slips under the radar. Habito VP of Engineering, Will will take you through the details, wins and trade-offs that have brought Habito to where it is today and where it's going next.


Tell me about the work you are doing.


Habito is changing the way mortgages work in the United Kingdom. It's quite a complicated process to work through. About 70% of the market is intermediated, so it's a good place to build a consumer-friendly brand and fix problems like not being able to understand what an appropriate mortgage looks like or how repayments work -- in general giving free, high-quality advice that anyone can access. From a technological standpoint, we've built a product that does things like search the whole market for available mortgages really quickly, calculate borrowing amounts, etc., in a way that is transparent to the customer. Right now we have a team of about 40 engineers building and maintaining that software.


What's the technology stack?


We are mostly Haskell; we have a large Haskell back-end. The front-end is PureScript, which is a Haskell-like language that compiles to JavaScript. In other places there are lots of other things, especially in infrastructure and deployment.


What is the focus of your talk?


It's mostly around functional programming. Some of it will be specific to implementations which happen to be in Haskell, but I hope that the concepts can be lifted a bit higher than that. I'd like to talk about things like mutability and how that doesn't necessarily just fit into you choice of language, but also into persistence and data storage. Or code generation, which can be easier to exploit in a declarative context. I don't think betting on functional programming is as “unsafe” as it once was and I'd like to get across the points that strengthen that argument, with some good examples that show how it can be powerful if deployed properly.


Can you give me an example of a place where the functional programming paradigm really shines?


I think it was a complete fluke to be frank, but one of those things that worked really well for us is an immutable log/event sourcing. A lot of the benefits we've seen from that could be harnessed regardless of tools or languages used. For instance, the separation of write and read models has given us huge flexibility. Sharding a database is just reprojecting bits of it elsewhere -- it's just different replays of the same data store. We've often joked that our BI is better than our product -- being able to learn new things from old data has paid off time and time again. It's not without its costs: you have an ever-growing source of data which creates all kinds of issues, but it's definitely something I would do again no matter what language I pick.


Can you talk a bit about how has functional programming affected the culture of your team?


I think static typing has definitely influenced our culture. We try to create solutions that feel correct-by-construction, or have some underlying principles. There's a culture in in the team of trying to find a complete design, trying to simplify something down using types. From the functional side maybe I just don’t feel it as much, but there is a culture of things like trying to compose large systems out of smaller component parts, or detailed event logs that create great opportunities for effectively debugging problems or monitoring.


What do you want someone to come to your talk to walk away with?


One frustration for me when I first started e.g. with event sourcing was that at the time it was heavily talked about but it didn’t feel like anyone was actually showing me the more complicated bits of code required to do it. Hopefully I’ll show off a few bits from our implementation to give attendees a bit more insight into how we structure things and how to deploy them. For the functional side, I think I'll be able to give people insight to what real benefits there are to having declarative codebases. I'll talk a bit about how to write code that lends itself to different interpretations like code generation.

Speaker: Will Jones

VP of Engineering, @Habito

Will Jones is a polyglot software engineer and passionate teacher with over eight years' experience building applications, creating products and educating other developers and computer scientists. Since obtaining a first-class master's degree and subsequently a PhD in Computing from Imperial College, London, Will has participated in and overseen development projects ranging from greenfield efforts to large-scale refactorings of legacy systems.

A functional programmer at heart, with a penchant for statically enforcing correctness through principles such as strong typing and immutable data, Will's passions are deeply embedded in the technologies he is using in his current role as VP Engineering at Habito, such as Haskell, PureScript and event sourcing/CQRS; Alongside his substantial industrial standing, Will also maintains strong ties with his alma mater, giving lecture courses to first-year students on both introductory programming with Java and advanced functional programming with Haskell.

Find Will Jones at

Last Year's Tracks