Jenkster
blog.jenkster.com · Personal blog · on HN since 2013
Kris Jenkins writes about functional programming, Elm, Haskell, and microservices, with explainers aimed at working developers.
What HN saysHN commenters recommend his explainer on functional programming and his Elm post on the loading-state UI antipattern, which one says they use all over their production app.
28HN people shared it
10linked it in comments
29stories submitted
167story points
4 months agolast shared
2013people per year2026
Most-shared posts
- 1How Elm Slays a UI Antipattern9 people · 14 points · first shared 2016 · discussion on HN
- 2What is functional programming?7 people · 21 points · first shared 2015 · 7 comments on HN
- 3Which Programming Languages Are Functional?3 people · 94 points · first shared 2015 · 106 comments on HN
- 4A Brief and Partial Review of Haskell in the Browser3 people · 7 points · first shared 2015 · 1 comments on HN
- 5Microservices – Check Size Before Ordering3 people · 6 points · first shared 2018 · 1 comments on HN
- 6Trick: type bombs in elm2 people · 4 points · first shared 2016 · discussion on HN
- 7A Vim Front-End for gDocs2 people · 2 points · first shared 2013 · discussion on HN
- 8Functional Mumbo Jumbo – ADTs1 people · 7 points · first shared 2016 · 1 comments on HN
- 9Delegated Coding Has a Bright Future1 people · 2 points · first shared 2025 · discussion on HN
- 10Dear Starbucks, I Like Clojure1 people · 2 points · first shared 2013 · discussion on HN
- 11Writing a Spotify Client in 16 Minutes1 people · 2 points · first shared 2013 · discussion on HN
- 12Programmers, Your Text Editor Wasn't Designed For You1 people · 1 points · first shared 2013 · discussion on HN
- 13Solving Logic Puzzles With Clojure's Core Logic1 people · 1 points · first shared 2013 · discussion on HN
- 14JavaScript – The Collection of Parts1 people · 1 points · first shared 2015 · discussion on HN
- 15A Tip For Navigating Clojure Files in Emacs - Kris Jenkins' Blog1 people · 1 points · first shared 2013 · discussion on HN
What HN people wrote when they linked it
dingosity · 2023-06-26
Kris Jenkins wrote this page about functional programming, which is the best quick explanation of why functional programming languages matter: http://blog.jenkster.com/2015/12/what-is-functional-programming.html
And then you mix that with Larry Wall's famous quote: "Computer languages differ not so much in what they make possible, but in what they make easy."
So you mix these two references together and you get the idea that maybe Lisp and Scheme and ML make functional programming easy. Python, on the other hand, makes it easy to avoid the key feature of Lisp: separating concerns and managing complexity.
This doesn't mean Python is a bad language, and it doesn't mean you can't use python to craft programs in a functional style. But it's A LOT easier in Python for an inexperienced programmer to do things that Lisp and Scheme are trying to force you to avoid (by exposing unnecessary state to a function, conflating concerns and avoiding abstractions for manipulating complexity.)
I think this is why Scheme was originally chosen for SICP over contemporary languages like C or Modula-
{2|3} or Bliss. It's simultaneously good for CS pedagogy and a small team can build decent, extendible, testable and debuggable programs with it.
splintercell · 2017-04-13
Elm is so amazing. It isn't as amazing when you just try out it's tutorial, but if you try to build an actual application in it, especially if you are a single programmer working on a project.
In my experience whenever I worked on a JS project on my own, there was an upper limit to how far I could keep writing the code on my own. After that, I had to spend time in doing other things (like writing Integration tests, lots and lots of unit tests, or refactor existing code because I realized that there are many issues unveiled).
But now, with Elm, it's like a whole set of unit tests are being written at the time of writing code which take care of plenty of common errors usually made due to lack of a good type system.
Add to that the usage of Maybe types (which are very beneficial in avoiding some UI antipatterns[1]), and the Reactive Programming pattern, I feel like I am writing a lot less code than what I am used to writing in JS projects.
I highly recommend Elm to anyone who wants to write a personal project, you'd see what benefits I'm talking about.
1. http://blog.jenkster.com/2016/06/how-elm-slays-a-ui-antipattern.html
_greim_ · 2021-05-15
To keep building on this, I think the word "parsing" is just the tip of the iceberg. Parsing is one way to port data across a type boundary, where the source and dest types are optimized for different use cases (e.g. serialization vs type-safe representation). Since the semantic Venn diagrams of any two types might have areas of non-overlap, parse-don't-validate means establishing clear boundaries in your program where those translations happen, then defining the types on either side of the boundary to rule out the possibility of nonsense states elsewhere throughout the program. The idea of nonsense states is closely related and discussed more here[0] and here[1].
[0] http://blog.jenkster.com/2016/06/how-elm-slays-a-ui-antipattern.html
[1] https://kentcdodds.com/blog/make-impossible-states-impossible
1-more · 2021-04-19
You never leave the loading spinner state, but you don't throw. This actually inspired the Remote Data package which encourages you to break with the UI antipattern[0] where "result not yet loaded" is conflated with "we know there is nothing there." This pattern of handling those states has made its way into the official guide too, in case you want to start without using anything outside of the core library (a common pattern for new learners)[1]
[0] http://blog.jenkster.com/2016/06/how-elm-slays-a-ui-antipattern.html
[1] https://guide.elm-lang.org/effects/http.html
mjaniczek · 2021-04-19
Sounds like the codebase would benefit from http://blog.jenkster.com/2016/06/how-elm-slays-a-ui-antipattern.html which is what we use all over the place in our production Elm app and I can't praise it enough.
kuon · 2017-06-18
This is exactly the kind of issue that go away with elm.
http://blog.jenkster.com/2016/06/how-elm-slays-a-ui-antipattern.html
moomin · 2017-03-14
I think this article is a pretty good introduction to when exhaustive pattern matching is desirable:
http://blog.jenkster.com/2016/06/how-elm-slays-a-ui-antipattern.html
felixbr · 2016-10-07
I'm not talking about superficial syntax like map/filter for collections.
The notion of keeping the majority of your code side-effect-free with immutability, built-in concurrency and message-passing as idiomatic parts of the language/ecosystem is to this day uncommon and partially impossible in Python/Ruby.
http://blog.jenkster.com/2015/12/what-is-functional-programming.html
alisey · 2015-12-30
In part 2 he writes about why it's not the essence of functional programming: http://blog.jenkster.com/2015/12/which-programming-languages-are-funct…
Mithaldu · 2015-12-30
I don't know whether you recognize this as wrong, or are surprised at the thought of such a thing (which doesn't actually exist like that).
In any case, i've suggested a correction here: http://blog.jenkster.com/2015/12/which-programming-languages-are-funct…