I try to learn or relearn a programming language every 2/3 years. In 2015 I decided to learn a functional language since I knew very little about this programming paradigm. I tried a few languages like OCaml, Haskell, Clojure and F# and finally, I decided to learn F#.
Learning a new language is a slow process, you learn the syntax and start to write some simple code in that language. In the beginning, you use the new language syntax, but you are still not coding in that language idiom. For this first stage, I usually use coding katas, because of their simplicity. I did a few katas in F# until I felt I had understood the language and its idiom, how to write tests, how to manage dependencies and how to create and build simple projects. If you are interested my F# katas are here.
With time you start to program in the language syntax and idiom. When I reach this point I move away from code katas and into a pet project with enough size to push me into really learning the language and the ecosystem around it. I try to choose a pet project that keeps me motivated. For F# I decided to write a music theory and guitar library I named it Vaughan.
My process to select and learn a new programming language:
- Decide on what programming paradigm I want to learn or improve
- Some examples
- Object-Oriented (Java, C#, ...)
- Functional (Haskell, F#, Clojure, ...)
- Logic (Prolog, ...)
- Procedural (C, Pascal, ...)
- Declarative (SQL, ...)
- ...
- Some examples
- Decide what type of applications I would like to build
- Some examples
- LOB applications (websites and web apps, mobile apps, enterprise applications)
- System (web servers, operating system, network, low-level stuff :) )
- Some examples
- Try a few languages that match the paradigm and the type of application
- I usually spend a few weeks/months researching matching languages
- Select the language and start learning it
- Get recommendations for a starting book or other learning resource
- Find others interested in learning with you and learn together
- Find a mentor to guide you
- For F# I had my friend and awesome person Samir Talwar guiding me into the world of functional programming
- Use code katas to learn the language (syntax mainly) and ecosystem fundamentals
- Single abstraction kata examples
- Fizzbuzz
- LeapYear
- Roman numerals
- Simple multiple abstraction kata examples
- Bowling
- Tic tac toe
- Game of life
- Mars Rover
- Single abstraction kata examples
- Build a pet project with the new language
Building Vaughan and learning F# has been a remarkable experience. If you are interested in music and/or guitar check it out.
Before F# I learned the Swift language and scratched the surface with iOS.
At the moment I'm again in the process of selecting a language to learn. This time I decided to learn a systems language. I'm undecided between learning Rust or relearning C++ specifically the new C++11/14/17 standards. I did a lot of C++ in the 90's early 2000's but mostly forgot about it. Both languages look exciting.
I already did a few of the mentioned katas in C++ here
Top comments (2)
I would choose Rust as well. I see C++ (which I used to love) as having devolved into this massive blob of features that makes the language very complicated. Full design-by-committee in action. Not that Rust doesn't have some quirks (there is no language without quirks).
I'd choose Rust.