Presentation: Habito: The Purely-Functional Mortgage Broker

Track: Advances in FinTech

Location: Windsor, 5th flr.

Duration: 10:35am - 11:25am

Day of week: Monday

Share this on:

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.

Abstract

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.

Question: 

Tell me about the work you are doing.

Answer: 

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.

Question: 

What's the technology stack?

Answer: 

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.

Question: 

What is the focus of your talk?

Answer: 

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.

Question: 

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

Answer: 

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.

Question: 

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

Answer: 

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.

Question: 

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

Answer: 

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

Similar Talks

Why Should We Care About Technology Ethics?

Member of ACM Committee on Professional Ethics and One of the Primary Contributors to the ACM Code of Ethics

Catherine Flick

Otherworldly Java: Gateway to the Moon and Beyond

Astrodynamicist and Principal Systems Engineer @NASA and USAF aerospace industry leader a.i. solutions

Diane Davis

Crossing the River by Feeling the Stones

Top UK Tech Influencer & Researcher & @lefep (Leading Edge Forum)

Simon Wardley

Complex Event Flows in Distributed Systems

Co-founder and developer advocate @Camunda

Bernd Ruecker

Tracks

The all-new QCon app!

Available on iOS and Android

The new QCon app helps you make the most of your conference experience. Easily browse and follow the conference schedule, star the talks you want to attend, and keep tabs on your personal itinerary. Download the app now for free on iOS and Android.