A popular startup buzz-quote is

Move fast and break things

Move fast and break things.

I know that Facebook has since changed their motto, but that quote is still heard all over the startup world, you can even buy pillows with that printed on. In Facebook’s case it’s not strange that this was their motto given that they worked with PHP and JavaScript. The alternative would have been “move slow and break things”.

Why not “Move fast and don’t break things?”.

That is exactly what Elm has allowed us to do. If the code compiles, We can trust that it won’t break, because We simply don’t get any run-time exceptions in Elm.

Elm has allowed us to move much faster than we would have done with JavaScript

You never miss adding a “,” that breaks you JavaScript app. Or forget to update an object to contain that new data structure you added. Or spend a day trying to hunt down a pesky bug that in the end turns out to be just a typo. Elm has allowed us to move much faster than we would have done with JavaScript by never letting us get stuck on frustrating bugs. Bugs also have the impact of making you fatigued, with Elm we can code for 14 hours and not be frustrated when we go to bed.

It’s not without some issues though, in the latest release 0.17, there is a bug where changes in certain files are not reflected in the whole app and the program compiles even though it should not. so it’s pretty commonplace for us to delete our build and rebuild. This is supposed to be solved in the upcoming release 0.18 .

So how did we come to write our application in Elm ?

Let’s start at the beginning.

In a recent podcast Evan and Richard talked about how they didn’t know of any big apps written from scratch in Elm. Well that is what we did 26,000 lines of code ago. We probably have the second biggest Elm-app in the world right now.

Who are we?

We are six graduates working out of a warm sweaty apartment in Sweden. Five of us are students from Linköping University and one from Stanford University. We have been working Elon Musk hours on our vision since the start of the summer.

As Richard Feldman would put it “By the way, we’re hiring!”. Shoot us an email at voice@ahead.life if you are into long working hours without a salary.

What are we building ?

We want to create a platform for all types of information that lets the user explore points of interests in a easy way. What says it better than a picture ?

Circles gets bigger depending on likes. Close to the ground is more social information and things relevant to people in that area. But if something of high interest happens there, that circle will be visible on a higher level and so on until it’s a world news story. Our vision is that you easily can explore our world and actually find out what is going on at different places after your own curiosity and not hear about stuff only if your newspaper decide to write about it. You can see our platform here https://ahead.life/.

Why Elm ?

A fellow co-founder and I had to write a master thesis, but we also wanted to spend as much time as possible developing our idea. Our Master’s Thesis was named “Elmulating Javascript” and is about “all” the libraries you need to get the same functionality as Elm 0.16. If you don’t want to read the Thesis, I don’t blame you (I wouldn’t want to either), but here is the TLDR:

Pure functions -> Native

Immutable data structures -> Immutable.js

Higher-order functions -> Native

Currying -> Ramda.js

Static type checking -> Flow (Not JavaScript)

No concept of Null -> folktale/data.maybe

Reactivity -> Rx.js

The Elm Architecture -> Redux

Declarative UI -> React.js

We were going to start from scratch for this project so we really had free reign in choosing whatever technology we wanted. The choice really boiled down to React/Relay or Elm. Our stack would look something like this:

Elm or React/Relay

Phoenix

GraphQL

Rethinkdb (will write a blogpost on this choice aswell)

To decide between React/Relay and Elm we built two simple projects https://github.com/graphql-elixir/phoenix-hipster-stack

https://github.com/carleryd/elm-hipster-stack.

The pros of React was the huge community and previous work that had been done. We could probably just glue a bunch of premade stuff together to have a somewhat decent application. And we could reuse our acquired knowledge when building our React Native App. Despite this, we decided to go with Elm. Here is why.