ouerghi01
Problem-Solving in Elixir: Share Your Tips and Challenges
Hello Elixirists! ![]()
I’ve been diving deeper into problem-solving using Elixir and its functional programming paradigm. From string manipulations to complex algorithms, Elixir provides a unique way of thinking about solutions.
I’d like to start a discussion where we can:
- Share interesting problems you’ve solved using Elixir.
- Discuss idiomatic patterns for common challenges (e.g., recursion, data transformation).
- Explore different ways to optimize solutions for performance and readability.
For example, I recently solved a problem involving:
- Splitting a string into parts based on specific characters.
- Performing transformations like mapping characters to values.
- Reducing a list of values to find a maximum
Most Liked
dimitarvp
Just to put this on your radar: What Elixir related stuff are you doing? (800+ replies)
Additionally, maybe the algorithm tag would be of interest.
Also you might want to check out the Advent of Code threads, we have separate topics for each AoC day for several years now.
Finally, Exercism’s Elixir track was very interesting to me back then.
dimitarvp
Engagement provided: I eye-balled your List_processing.ex and… using length and Enum.at are basically anti-patterns. They have O(n) complexity and should be avoided at all costs – which is possible most of the time. You could do the Exercism list exercises and you have mentors there; they can steer you in the right direction.
And why does your file have a capital letter in its name when f.ex. macOS makes no difference between List_processing.ex and list_processing.ex (or at least that used to be the case before, nowadays I am no longer sure) but Linux does make that difference – you are setting yourself up for a hard-to-track disaster. Just don’t. Always use lower-cased file names.
So, maybe those two tidbits could be a start.
dimitarvp
It could be a constructive way to engage IMO, because many people latch onto appeals to authority and they want to emulate what they perceive to be a better / bigger talent than theirs. Sometimes they are even right.
…But I personally would find that argument unconvincing; to me the highest levels in any creative / engineering profession are characterized by the simple saying of:
Learn all the rules so you can break them.
That’s why I said that length and Enum.at are an anti-pattern… most of the time.
From my very limited interactions with language and/or high-profile library maintainers, they actually respect people who are not dazzled by their work and engage better with you when you attack their decision in an informed and critically thinking manner.
Last Post!
bennydreamtech23
Popular in Discussions
Other popular topics
Chat & Discussions>Discussions
Latest on Elixir Forum
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









