Devchat.tv Episode Roundup
Devchat.tv Episode Roundup
Devchat.tv
Aug 1, 2017 · 48 min

JSJ 272: Functional Programming and ClojureScript with Eric Normand

MP3
JSJ 272: Functional Programming and ClojureScript with Eric Normand
This episode of JavaScript Jabber features panelists Aimee Knight and Charles Max Wood. Special guest Eric Normand is here to talk about functional programming and ClojureScript. Tune in to learn more!
Eric works for purelyfunctional.tv. The main target market for his company is those people who want to transition into functional programming from their current job. He offers them support, shows them where to find jobs, and gives them the skills they need to do well.
Functional programming is used at big companies such as Wal-Mart, Amazon, EBay, Paypal, and banks. They all have Clojure but it is not used at the scale of Java or Ruby.
So yes, people are using it and it is influencing the mainstream programming industry.
A common question Eric gets is, “How do I structure my application?” People are used to using frameworks. Most start from an existing app. People want a process to figure out how to take a set of features and turn it into code. Most that get into functional programming have development experience. The attitude in functional programming is that they do not want a framework. Clojure needs to be more beginner friendly. His talk is a four-step process on how to turn into code.
There are four steps to the process of structuring an application.
Develop a metaphor for what you are trying to do. Developing the first implementation. How would you build it if you didn’t have code?
Develop the operations. What are their properties? Example: will have to sort records chronological.
Develop relationships between the operations.
Run tests and refactor the program. Once you have that, you can write the prototype.
Rules can’t be refactored into new concepts. They have to be thrown away and started completely over. The most important step is to think before beginning to write code. It may be the hardest part of the process, but it will make the implementation easier.
He personally has written many bad abstractions. Writing bad things is how you get better as a programmer. The ones that go too far are the ones that don’t have any basis or are making something new up. They are trying to be too big and use no math to back up their code.
He thinks people should think about it before, although always be making experiments that do not touch production.
In terms of functional programming in JavaScript don’t have some of the niceties that there are in Clojure script. Clojure Script has a large standard library. JavaScript is not as well polished for functional programming; it is a lot of work to do functional programming it and not as much support.
Eric thinks that it seems optimistic. He doesn’t see functional programming take over the world but does think that it has a lot to teach. The main reason to learn functional programming is to have more tools in your toolbox.
There is a prejudice against functional programming. When Eric was first getting into it, people would ask why he was wasting his time. Believes that people are jaded. Functional programming feels foreign because people are used to a familiar way of programming; they usually start with a language and get comfortable.
Lodash is great to start replacing for loops. It will clean up code. There are other languages that compile to JavaScript. For example, Elm is getting a lot of attention right now. It is a Haskell like syntax. If you want more of a heavyweight language, use TypeScript or PureScript. ClojureScript is into live programming. You are able to type, save, and see results of the code immediately on the screen in front of you.
Picks
Aimee:
The Hidden Cost of Abstraction 
What Functional Language Should I Learn 
Eric
Steven King, On Writing 
Youtube Channel: Tested  
Charles
Ionic Framework
Links
Purely Functional TV 
Blog 
Building Composable Abstractions 

Episodes play from the podcast's own servers, unmodified. Not affiliated with Podbay.