45

A Secret Weapon for Startups – Functional Programming?

 4 years ago
source link: https://www.tuicool.com/articles/qaAr2iq
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

I was admitted to Penn for computer science, and while I explored many other subjects, computer science remained my first love throughout college. My favorite CS course was CSE 121, the second semester of freshman year: an introduction to functional programming via the LISP  language.

Why was it my favorite? LISP was elegant, mathematical, and introduced me to the delights of recursion. To me this was the essence of computer science. I spent hours in the engineering library finding my way to the roots of functional programming (the lambda calculus and Alonzo Church are good places to go hunting if you are interested — and there’s a lot more available to read now than there was then ).

While I was learning various programming languages — all of which I forgot promptly and completely after graduation as I headed to a non-engineering career — I remember thinking that LISP couldn’t possibly be practically useful. It seemed almost too beautiful.

Fast forward: in 2014, I met the founding team of Freckle Education (then called Front Row). We’d concluded at Amasia that education technology was finally ripe for venture investing. There is no question that Freckle’s choice of Haskell — a direct descendant of LISP — as its coding language intrigued me and got me even more hooked on the business.

***

I am not a programmer (note: that’s one of the great understatements of our time), and so here I will dwell on just one of the elements that make Haskell interesting: “laziness”. Carl Baatz, founder of Better, says : “Laziness allows for better function composition and optimisation (at the cost of harder-to-understand memory profiles).” A more technical explanation can be found here

This should lend itself to superior performance. I see this with Freckle - the company now serves 10 million questions during the school day , and over 13 million students use the platform. The company’s engineering team is small relative to virtually all of the companies that I see at its revenue run rate. Rafik Robeal, Freckle’s Head of Engineering, says: “Higher performance & optimal use of computing resources equal lower cloud hosting bills.” Wait: this is real money saved, real scalability achieved, so why isn’t everyone using it?

***

One reason is that Haskell is easy to get started with, but hard to be productive with. From Carl Baatz’ article : “The bad news for newcomers is that to become highly productive, there's a lot to learn, even for experienced developers”. Rafik agrees: “Learning Haskell from scratch takes significant investment from motivated engineers”.

There is another lens on this issue. Fredrik, the founder of Bdellium, writes : “…I have taken over Ruby codebases of similar size from some of the most talented Ruby programmers there are and have always had a much harder time than I had with this codebase. Haskell let me quickly browse the code, read the types and almost instantly understand the structure and layout of the program.”

There is also the perception of recruiting challenges — the Haskell community is obviously much smaller than that of most popular programming languages. But here also it cuts both ways as Baatz says : “The upside… is that if you hire people who have spent some time learning Haskell, they are likely to have more than average intrinsic motivation to build software and to learn new things.”

Rafik tells me that Haskell is a strong ingredient for building a top-notch engineering team and culture at Freckle — a superpower in tight recruiting environments like Silicon Valley where there can be significant detrimental churn in engineering teams.

***

Alex Kurilin, the co-founder and CTO of Freckle, is largely responsible for the company’s original choice of Haskell. I asked Alex whether any of his views had changed since he wrote about it four years ago . Here’s what he had to say: “…we have fully exited the hype cycle and now we’re in the long boring Plateau of Productivity.... The thing works and helps people get their jobs done. It would be great to have more people though, as there’s power in numbers, and the larger the community the more problems you can solve with a Google search and an existing open source solution versus rolling your own.”

What is the point for a VC? There are some VCs who have the knowledge to get deep into this topic, but the vast majority of us are an inch deep and a mile wide (exhibit A: me). So the point here is  a very practical one: recruiting and scalability. My experience with Freckle has made me bullish on the use of functional programming languages, and Haskell in particular, to address those issues. It is improbable that any founding team will start with this in mind, but these are pretty amazing side effects.

If you’ve built your product in Haskell, I’d like to hear from you.

P.S.: CSE 121 at Penn is no longer about functional programming. But the Engineering School has occasionally offered a dedicated Haskell course ! So things may be moving along here…


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK