How can I get better at the finer details of building programs with Elm?
Hope this post isn’t too long.
I find myself getting stuck on a few things in Elm, and I’m not sure the best way to get better. I understand people are taking time out of their busy life to answer questions on here, and that the community is small. I think I need a mentor of sorts to help me get unstuck at times.
For me, some of the difficult parts of functional programming are the following, when you don’t have a tutorial to hold your hand:
- “Seeing” the flow of data and state (from a high-level view)
- Planning your program
- Which data structures are most appropriate? The most simple?
- How do I design my program and deconstruct it?
- How to re-design my program when I discover problems and complexities?
- “Gluing the parts together”
- Deciding which functions to use (and using them correctly)
- And how to combine them
- Where to place them in the program
- Difficult stuff like recursive types and weird terminology (hopefully I can avoid these)
A lot of this is trial and error, and I’m working my way through “Functional Programming Made Easier” (which uses Purescript), but even after reading through “How To” books on designing programs, doing and building on your own can often trip you up.
I was going to head to Slack for advice, but I read this article and it put me off joining a bit.
Perhaps working on a real-life problem with others is the best way forward. I’m primarily focused on the following things (for my purposes). All quite usual stuff for apps, mostly focusing on prototyping, then handing over to a team when it makes cash:
- CRUD forms and posting/receiving json
- Building out suitable models and data structures
- Simple UI and UX for end-users. Projects include:
- Food reviews (think TripAdvisor)
- Book lists/catalogues (requires using APIs, think Goodreads)
- Working with tags and search (I expect this to be difficult)
I imagine a lot of people have the same struggle, and learning alone only gets you so far. Unless you’re very smart you’re going to come unstuck at some point! I’m a senior in HTML/CSS but a junior/intermediate with programming.
Who do I ask? Where do I go?
- How can I learn? (paid work if possible, most jobs are Vue/React)[1]
- Somebody’s pet project
- Freelance work
- Where do you go for mentorship? (Elm, Purescript or Haskell-like)
- Where to read more about actually building things (rather than tutorials)
Like I said, I’m working on improving my knowledge, but it’s going from hand-holding to real life that’s the problem. I’m not that much of a logic guy, my background is in the arts/design, so I’m more of a visual learner. Functional doesn’t always come naturally. Maths is OUT.
On a slightly tangential note …
I’m handing over some Elm examples to a friend who works for Nuxt, to see how much easier/harder it is to build the same thing. Some aspects of functional seem harder than they need to be (List.map
doesn’t take Result
of different types, for example), or too many ways to do it (form validation). I can report back if anyone’s interested!
Learning yet another paradigm/language has a lot of overhead and I don’t have the time. ↩︎