A 20-Language Journey Through 2023. My Lessons From #12in23?

A 20-Language Journey Through 2023. My Lessons From #12in23?

Exercism.org is approaching 2,000,000 students, so you may have heard about it by now. (If not, have a quick look at exercism.org). Over the last year, I participated in their #12in23 challenge to try twelve different programming languages in 2023. I tried twenty, but have I learnt any? Have I learnt anything? Was it worth it? Here is a short retrospective.?

The quick journey through time

Months from February to December had their own themes, focusing on various groups of languages. However, January started without a theme, so I devised my own. A journey through time. I tried COBOL, C, C++ and C#, languages released in 1959, 1972, 1985, and 2000 respectively. Almost precisely thirteen years apart.?

Of course, the languages have since been updated, but at their core, they are still of their time. COBOL's subroutines and looping mechanism made me appreciate C's functions and control structures. C++ brought objects, and C# came with memory management. Only COBOL was new to me on that list, but I had to (re)learn C and C++ as it has been a long time since I last used them.?

How much do I remember a year later? Of the actual syntax? Almost nothing. You could say all I have learnt is that a week is not enough to learn a programming language. However, I have also gained a new appreciation for advances in programming languages, which stayed with me as I looked at other languages throughout the year. That in itself was very valuable to me.?

The functional excitement

February was all about functional languages. Before that month, I had some experience with Scheme (through Lilypond) and functional style of programming in multi-paradigm languages like C#, Java, or JavaScript. Still, Elixir I learnt that month, a functional-first language, was an eye-opener. I have done 60 exercises from that language track, a tad over the required minimum of 5. The extensive use of pattern matching and the function guards take what's possible with function overloading to the next level!?

Elixir is compiled to BEAM (Erlang Virtual Machine) bytecode, and so in addition to learning Elixir, I have read a lot about Erlang and its virtual machine. I cannot believe it took me so long to discover it. The technology originated in the mid-1980s at Ericsson to deliver high concurrency and fault tolerance levels in real-time, distributed telecom applications. The architecture appears ideal for modern distributed cloud data processing, and I wonder why it isn't more popular. I plan to learn more about Elixir, Erlang and BEAM this year, starting by reading a book by Svilen Gospodinov - Concurrent Data Processing in Elixir.

In July, I read Getting Clojure by Russ Olsen. Then, I did 34 exercises in Clojure. The abundance of parenthesis in this so obviously Lips inspired language took a while to get used to! Prefix notation took some time, too. But I have grown to like it. I like the simplicity. Everything is a list, even function calls. There are no operators, just functions. The precedence is obvious. The sea of parenthesis "encourages" you to reduce nesting and the size of functions. I tried it, and now I don't see any way back. I think that learning Clojure has changed forever how I write code.?Have a look:

Rotational Cipher - C# to Clojure to C#

I have also done exercises in Common Lisp, Elm, F#, and Gleam (another language compiled to BEAM bytecode) to follow the functional theme over the year. I have no plans to return to any of them, but I will spend more time with Elixir and Clojure this year. I plan to find a project in at least one to gain proficiency.?

Getting closer to the metal

March was "mechanical". I did 45 exercises in Go and a few more in Rust. I can see how both are improvements over C or C++ and why there is so much excitement about them among people who want to stay close to the metal. Even so, a month of Rust's borrowing and goroutines in Go wasn't enough to get me even half as excited as learning about concurrency in BEAM. I have learnt that I can still do some lower-level programming, but it is less exciting than I remembered.

I thought the Practical Rust Projects: Building Game, Physical Computing, and Machine Learning Applications by Shing Lyu would help. I bought it. Read it. It did not help.?

April was Analytical with Julia, Python and R. I did a few new exercises in Python to help me offer better support when mentoring, and I tried to learn Julia. I read Hands-On Julia Programming by Kumar Dash. The language is similar enough to Python to pick it up quickly and promises much better performance while not reducing flexibility. Still... everything in the data world appears to be in Python or R, so I don't expect to use Julia much any time soon.?

A true mind shift into logical programming

During Mindshifting May, I tried Prolog. A good book was essential for me to get started here. Max Bramer's Logic Programming with Prolog was an invaluable resource for learning the logic programming paradigm. I have heard about it before, but I never had first-hand experience of working with it. Now I do. I understand it better. However, I cannot see how to apply it to anything in my interests. It's like Go and Rust for me in that regard.

The reminder

Ruby and C# were my languages for the Object Oriented October. I have refreshed my memory of both and done some mentoring in C# over the year - hence, the 34 exercises to help me offer better guidance.?

I did a few exercises in Raku (Perl 6). The syntax is very powerful and can be very concise. But it leads to code that can be difficult for novices like me. I found this in community solutions for the Collatz Conjuncture problem:?

Steffan153's Solution to the Collatz Conjunction

Said that, my own solution is almost as cryptic, even to me. Perhaps, this is just a feature of the language which I don't appreciate enough.

My Solution to the Collatz Conjuncture


Wren is too new and has some strange sensitivity to whitespace characters despite being based on the C-style.?

WebAssembly was fun. I plan to do much more of it this year. I don't see any use for it in what I do, but solving problems by directly manipulating memory is very satisfying. It takes me back to my teens and the x86 Assembly language.

Summary

Of the twenty languages I have tried, I have learnt only two. Elixir and Clojure. But with them, I have learnt truly functional programming and come to appreciate the difference between functional style in multi-paradigm languages and functional programming in functional-first (if not only) ones.?

I have learnt about BEAM. I got a flavour of many other languages, enough to know what are their strengths and my weaknesses.

I got totally confused as to what's possible in which language. Is it or or ||? Is it len, size, length or count to check the length of an array? And how do I apply it? Do I need parenthasis? Where?

Still, struggling through the syntax allowed me to explore very different and often novel approaches to solving problems that syntax enables. All the confusion was worth it.?

I really enjoyed the #12in23 challenge, and I'm looking forward to the #48in24, which will focus much more on specific problems and approaches than languages.?


Robin Betts

Principal Software Engineer

1 年

Nice write-up Michal. The influence of functional language knowledge on your style in C# is most interesting. It tempts me to take a look at functional languages again, but langauge learning for me in 2024 is going to be mainly German! Thanks for sharing.

回复

要查看或添加评论,请登录

Micha? Por?ba的更多文章

  • Let's talk about Knowledge Graphs in Civil Service

    Let's talk about Knowledge Graphs in Civil Service

    Let's start with some background. Around 2010 I got first interested in graphs and the semantic stuff.

    8 条评论
  • Agile Baristas

    Agile Baristas

    How many baristas should a team have? The answer will depend on the team, of course. So let's assume it is a…

    6 条评论
  • Are all backlogs ultimately flawed?

    Are all backlogs ultimately flawed?

    Who, in the 2020s, in digital technology hasn't tried SCRUM yet? Who hasn't seen a backlog that grows weekly regardless…

    4 条评论
  • Do we have a problem with productivity?

    Do we have a problem with productivity?

    I have been interested in productivity (some might say obsessed) for quite some time. So naturally, "The Frustration…

    11 条评论

社区洞察

其他会员也浏览了