Last week, we organized out first-ever #SerokellChat. This is a social media activity where we gather together Haskell professionals to talk about promises and issues of the field and give them the possibility to share helpful tips with other developers.
While we had several different participants, our first special guest was Serokell CTO Kirill Elagin. (I highly encourage you to go back and check his answers: they are incredibly thoughtful and informative.)
To guide the discussion, we had six questions:
- What fascinates you the most while writing Haskell?
- Which parts of Haskell or its ecosystem show the greatest promise today?
- What are the main advantages of using Haskell in industry?
- What advice would you give to someone that is looking for a Haskell job?
- What are the most common mistakes that Haskell programmers do, and how should one avoid them?
- If you could suggest one thing for an intermediate developer to grow as a Haskeller, what would it be?
Let’s see what our participants had to say about them!
What fascinates you the most while writing Haskell?
The first question was rather general (and there are many possible answers), so we were surprised when most of the answers hit one domain: types, and how one can use the structure they provide to guide the development.
While hijacking out test-driven development out of the TDD abbreviation is hard work, Haskell certainly has the potential.
TDD (Type Driven Development).
— Arbaaz (@arbaazio) April 29, 2020
A1
— haroldcarr (@haroldcarr) April 28, 2020
Using the type system and type classes to "navigate" structure.
That the types guide you in the process. You write the types first, and the code pretty much follows from them.
— Зимняя рыбалка (@slowpnir) April 28, 2020
Also, you can make a huge refactor on very big project and it won't break that much afterwards.
Which parts of Haskell or its ecosystem show the greatest promise today?
In this question, the answers are split. Our chat participants’ candidates are type-level programming (which is the backbone of multiple Haskell applications), GHC, and ghcide, a library for building Haskell IDE tooling.
You describe your API once in a single place and obtain things like a client for this API, its specification in the OpenAPI (aka Swagger) format, and you get your endpoint implementations typechecked to make sure they conform to the description.#SerokellChat
— Kirill Elagin (@kirelagin) April 28, 2020
Ghcide. Very promising to bring a lot of Haskell goodness right into your favorite IDE.
— Han Joosten (@SirHumptyD) April 28, 2020
What are the main advantages of using Haskell in industry?
As we have heard time and time again, both from surveys and industry practitioners, Haskell’s greatest advantage for the pragmatic programmer is its maintainability. With GHC holding your hand, refactoring is a blast and no rewrite is too ambitious.
Fearless refactoring.
— 💧Alex Mason (@Axman6) April 28, 2020
Go from “I think I know what needs to be changed, it’s going to touch most if the code though” to “OK, done, thanks GHC” in no time.
Related is the fact that Haskell code is easy to reason about and, thus, is easier to understand and review, improving its maintainability and the happines of the developers working on it in general.#SerokellChat
— Kirill Elagin (@kirelagin) April 28, 2020
What advice would you give to someone that is looking for a Haskell job?
The advice is somewhat predictable: write and share lots of Haskell code, get noticed, and get to know people that are already working with it.
A4.
— haroldcarr (@haroldcarr) April 28, 2020
- Write and share LOTS of Haskell code.
- Get to know "Haskell people"
- Go to conferences (online or otherwise) and talk with people.
- Ask/answer questions in forums.
- Write blog posts and ask for feedback.
If you find a Haskell position that looks interesting, you will have to show some Haskell code you wrote before. Writing Haskell at work just as writing open-source at work is kind of a luxury, so it’s best to have a pet project up your sleeve.#SerokellChat
— Kirill Elagin (@kirelagin) April 28, 2020
But if you are searching for things to include in your Haskell pet projects, here are some ideas from @kirelagin: use type-level programming for static correctness guarantees or “profile the hell out of your code”, as those are valuable skills on the job.
What are the most common mistakes that Haskell programmers do, and how should one avoid them?
The message was clear: keep it simple, stupid. :)
Focus on simplifying your Haskell code and make sure you still apply reasonable programming practices even when the compiler is (mostly) always there to help you.
Haskell is a great language even when we don’t transcend the boundary of what was known to be possible every day, and the answers reflect this insight.
A5
— haroldcarr (@haroldcarr) April 28, 2020
There is a tendency for those new to FP/Haskell to use all the cool advanced features.
Experienced Haskellers KISS.
#SerokellChat A5:
— Vladislav Zavialov (@int_index) April 28, 2020
Over-engineering.
Don't try to encode too much at the type level, the type system has its limits.
With experience, you will discover these limits.
If you could suggest one thing for an intermediate developer to grow as a Haskeller, what would it be?
A lot of interesting tips in this one. Both @haroldcarr and @kirelagin mention that you have to interact with others and their code, but list different ways of doing that. Also, check out the GHC User’s Guide. While it’s lengthy, understanding your compiler better is a great step towards advancing your Haskell.
A6
— haroldcarr (@haroldcarr) April 28, 2020
Read other people's code and/or watch them live code.
A6:
— Kirill Elagin (@kirelagin) April 28, 2020
Find someone interested and teach Haskell to them. (Well, this would be my advice #1 in any other area as well.) The reasons are two-fold:#SerokellChat
#SerokellChat A6:
— Vladislav Zavialov (@int_index) April 28, 2020
Read the GHC User's Guide.
Anything that a compiler accepts might end up in the code base. So get to know your compiler.
And that’s it, folks. Running it was certainly fun, and we would like to thank everybody that participated. This is something that we definitely will try again, so stay in touch and suggest future topics you would like to learn about!