Why Elm is a future of Frontend? Interview with Preethi Kasireddy
This is a transcript of an interview between Thibaut Assus and Preethi Kasireddy, given in prevision of Elm Europe. Pretthi will be one of the speakers. She looks forward to metting you at elmeurope.org!
– Thibaut: Hello, Preethi. Thank you for this interview. So for you, what is the best way to learn Elm?
– Preethi: Good question. I guess it’s a hard question to answer because there is no right or wrong answer in terms of how you learn any programming language: everyone learns differently.
But I can talk about how I learned. First, definitely, I read the docs. I think they do a really great introduction from the syntax, to how Elm thinks about — the Elm architecture. You need to build the foundation, and that’s what reading the docs gives you.
So that’s what I did, read the entire docs twice. Then I went straight to build small, tiny application using the Elm architecture.
– Thibaut: So you said that you did write a small application?
– Preethi: Yes. Definitely writing a small application, understanding the basic stuff. How to install dependencies, what is the Elm runtime and main. Understanding these things. When you start up your first project, these are the things you want to understand, and do a basic application using the model-update functions.
I got a hand on how Html.beginnerProgram works, then what I moved on to go beyond the beginner program. I wanted to build something that had side-effects, makes the API calls, deals with JSON.
I looked at some sample applications or online applications. Then I designed it and built it from ground up. That’s how I really learned, like building a real-world application. As I ran into things, I had to learn how to use JSON decoders or how to build a task for handling async operations, and error-handling.
Continue to get a handle of how the whole update functions work and how to handle state updates. Incrementally learning stuff as you go. That’s my approach. But other people like to watch videos. There’s a lot of video tutorials like ElmCast, or a few other sites. So that can be an option for you. To me, I like reading books. I know there’s one called Elm in Action by Richard Feldman, and a lot of tutorials out there. So I think it really just depends on how you learn. But for me, it was more like hands-on building stuff.
– Thibaut: Yes, me too. It’s exactly the way I learned. You talked about JSON decoders. For you, is it something great, or is it something complicated? Is it worth it? What do you think about that?
– Thibaut: Yes, it’s tough, it’s a lot of code to write. At the beginning, people don’t get why it’s useful and why it adds safety to what you are parsing. But after a while, people, they begin to see the purpose of it. But it’s still a lot of code and it’s still a lot of code to update, to maintain. So, yes.
– Preethi: Do you use Elm a lot?
– Thibaut: Actually, I’m doing Elm development almost full time.
– Preethi: Wow.
– Thibaut: I already released FormBuilder. But then I created an organization, which is called BodyBuilder, and I want to build a lot of different things to create forums, to create every website things. You could need a header, a footer, forms and other things like that. Basic stuff, but stuff that you always need. I also did a photo uploader, things like that, auto complete.
– Thibaut: Have you heard about WebAssembly?
– Preethi: Yes, I’ve heard about WebAssembly.
We talked about your talk. Can you say a little more about what your talk will be about?
– Preethi: Yes, sure. I want to focus on making it not too technical. So mine is talking about how can we make a purely functional programming language ever becoming mainstream. So I think, last year, Evan’s talk looked at it from the micro. Like he looked at it from the user design perspective. He was like, “How do you design a language? What are the features needed to make it more mainstream?”
For me, I want to look at the other side of it, which is the macro, delve into what’s the history and evolution of functional programming. How did it evolve? How come it quickly grew popular, and then quickly turned niche? What are the things that you can learn from that to help make Elm mainstream and not fall into that category again, not fall to the same mistakes again?
I’m going to talk about that in the end — even though, Elm is superior in the sense that it’s functional and it offers a lot more than other languages, it’s totally possible that even though it’s a superior technology, it doesn’t catch on. So looking at the macro and the history of how these things work, and what happens and how these languages get adopted, what lessons we can take off from that, how we can make Elm mainstream from a macro perspective is what I’ll be focusing on.
– Thibaut: Great. Do you think it’s possible? Do you have any ideas on how to make it? I don’t want to spoil people about your talk, but among all your ideas to make it more mainstream, can you share one with us today?
– Preethi: I’ll leave it to the talk.
– Thibaut: Okay.
– Preethi: Since you’re it in production, I’m curious to hear if you do you think it’ll ever be mainstream, based on how the benefits and trade-outs you’ve seen with it?
The thing is that, for me, doing Elm is really healthy. It makes me feel really in better health. [Laughs] Like you are doing things once and for all, the purity is helping you to think the good way.
For me, building things in non-pure programming languages is exactly like having pipes with holes into it. When you are in purity, you are creating pipes, but then you can think the pipes and putting them elsewhere without problems. I really like the feeling of being able to do that. I feel it’s really great. Especially in production, when you have so many things to handle, having the safety is so, so helpful.
So yes. I really love it. I think it won’t replace current frontend languages. But I think it will have its place. Did you do some Ruby on Rails development?
– Preethi: Yes, I know a little bit Ruby on Rails.
– Thibaut: Not every company is doing Ruby, but it has some people who really like it. I think Elm will be the same, like people doing it, they will continue to use it. It’s really opinionated, so it won’t be for everybody. But I think some people will definitely stick to it and they will convert other people. It could be big. That’s also why I’m doing this conference. I really think it will grow, because it’s awesome and it’s well-designed.
What about you? For you, why should people come to the conference, to Elm Europe?
– Preethi: I think — especially if you’re using Elm already — because Elm is so pretty niche in its small community, I think it’s important for us to have these gatherings or places where you can just exchange ideas, frustrations. There’s not that many people using Elm, like you, full-time, and so it’s important to bring people like that together along with the beginners, so that everyone’s exchanging ideas. It’s all about exchanging ideas. You’re not going to learn something super technical at a conference. Maybe you will learn a few things. But it’s just about meeting other people in the community, maybe finding opportunities to work together and improve things together, and talk about the current state as well as the future and how we can make this project a successful one for us in the long run. It’s what I think.
So if you’re considering Elm, or if you’re considering functional programming in general, I think it’s a great conference to attend, because it’s going to be niche, it’s going to be small, it’s going to be intimate. I’m excited for that. I really like conferences that are more intimate and you can actually talk to everyone there, and not something that has like 10,000 people.
– Thibaut: Yes. For now, it’s not 10,000 people, but you never know. [laughs] Actually, we already have almost sold every seat. People are really interested into the conference. So it’s pretty great. Is there anything else you would share to Elm Europe attendees?
– Preethi: I’d say try to make it if you can. Even if not, then the least you can do is learn Elm. [Chuckles]
– Thibaut: Why?
Then on the other end, the people who are the functional gurus, who love functional programming, who’re coming from more of a Haskell or OCaml background — they’re not frustrated that the functional stuff that they love is so niche and small communities. So they feel like, “Oh my God. Elm is much more practical. Finally, I can still do the functional programming I love, but now I can actually maybe be mainstream for once, and have a practical approach to functional programing.”
So I think that’s what makes Elm interesting, in my opinion. I think it’s targeting both audiences. So it’s a great middle ground, in my opinion.
– Thibaut: Yes. I think it’s the first attempt to make functional programming mainstream. Because before that, nobody took really the point of making it mainstream. Evan did a talk about that, “Let’s be mainstream.” For him, it’s really important to make it popular. Yes, I think you are totally right about that. It targets both our audiences. But yes, it can really inspire other people, inspire other languages.
I’m doing it for two months almost full time, and it’s really, really a pleasure. Because every time you find a solution to a problem, then you find it for good, and that’s it. You won’t have to think about it another time, even in another project because it’s so easy to create libraries, as everything is so not coupled. So, yes.
Okay. Great. Thank you very much, Preethi. See you at Elm Europe for your talk, and looking forward to hearing it!
– Preethi: Awesome. Me too. See you there!