Learning Haskell gave me a whole new outlook on programming

A while back I decided to learn Haskell as a counterpoint to Ruby/Java etc that I was more familiar with previously. I am very grateful for the new perspective that learning Haskell has given me. In particular:

  • I always used to start with database tables and a user interface. Haskell forces you to think about the functions and how they work on data structures. Not having to think about data storage is strangely liberating as it is much easier to change your data structures if there is no UI or database to worry about.
  • It might need a lot more thinking to write a piece of code, but by the time you’ve finished it invariably feels very elegant.
  • Writing pure code and then wrapping IO around it later really forces you to write code that is simpler and more testable.
  • I have an appreciation of how intimidating jargon can confuse and put people off, unnecessarily. For example, Haskell purists might want you to grok Category Theory even if it’s not that relevant to writing Haskell apps.

The learning curve has been ridiculous. Have a look at Tymon Tobolski’s comparison of using Ruby vs Haskell in a small Redis application. The Haskell version is terse to the point of being incomprehensible at the outset. As a Haskell learner I couldn’t find something that packed a similar “wow” to “A blog in 15 minutes with Ruby on Rails”

Here’s a small Scotty/Warp Haskell app I put together recently. (Scotty is Haskell’s answer to Sinatra for you Rubyists).

Impress your CTO – Track Everything

The day after your new feature goes live, someone will want to know how well it’s working (or not). They don’t just mean “are there any exceptions in the logs”. They mean “how are people using it, if at all?”

Hopefully, you had thought about unspecified requirements and so you already implemented something that they can see. It doesn’t even have to be super heavyweight. I’ve seen good stuff done using something sophisticated like Heap Analytics, and also seen people be able to get actionable insights from something as simple as Google Analytics.

Whatever you choose to do, make sure that there is an easy way for a non-developer to dig around the stats, and ideally download some raw data to play around with offline.

Just be sure to track everything.