It’s not a secret that Programmers like a great holy war. The echos of passionate programmers shouting with their banners high will live on Stack Overflow for eternity, or at least archive.org.
The editor wars rage on. Like other holy wars, object-oriented vs. functional programming is an ongoing saga. Most programmers use functional programming while considering themselves object-oriented programmers. Many languages have incorporated object-oriented and functional programming language paradigms.
I’ve enjoyed using the functional features of C# and dabbled a bit with F#. I’ve never dove headfirst into a functional language like Elixir, until now. I picked it up because I like The Pragmatic Programmer book and Dave Thomas as an author. I’m also interested in being able to do [concurrent programming with less hassle].
Workflow
My workflow is a split window with the book and my IDE side by side on my MacBook. I’m trying things out as the material progresses and am running through the exercises.
Programming Elixir
As I traverse the Programming Elixir book, I feel like I’m learning regular expressions. These terse expressions are power-packed; look at this beauty.
# The long way
add_one = fn (n) -> n + 1 end
IO.puts add_one.(1)
# The short way
add_one = &(&1 + 1)
IO.puts add_one.(1)
Building quick little inline functions will take little effort. It’s a bit cryptic for my tastes, but this is good if you’re doing quick and dirty code for a single task.
Look at that; with a few regular expressions and concise syntax, this code returns true.
match_end = & ~r/.*#{&1}$/
IO.puts "cat" =~ match_end.("t")
This code boggles my mind. I can have a set of regex libraries that are named appropriately. I can chain those expressions; what?!
I’ve convinced myself that learning Elixir is worth the investment.
Learning Elixir - Beyond the Basics
- Books
- Visual Studio Code Extensions
- vscode-elixir ( Syntax Highlighting, Intellisense)
- Elixir Formatter ( Code formatting )
- Code Runner ( Select and run code in your editor )
Related Content
Other Learning
- How Do I Learn Effectively?
- Learn 3D Graphics
- Learn Amazon Athena
- Learn Asymptotic Notations
- Learn AWS Amplify
- Learn Color Theory
- Learn Data Visualization
- Learn Design Systems
- Learn ECS
- Learn GitHub
- Learn How To Prioritize
- Learn Java
- Learn Java Coding Challenges
- Learn JavaScript
- Learn jq
- Learn Kubernetes
- Learn Python
- Learn Rendanheyi
- Learn SignalFx
- Learn Software Architecture
- Learn Software Design Patterns
- Learn Structurizr
- Learn systemd
- Learn Terraform