#So you want to learn another language?
Hurray! Someone sent you here or you found this some how! Here are my tips for learning a new language.
##Disclaimer
This text is a work in progress, please comment and contribute as you see fit. These are my opinons on language progression based on personal experience, not hard fast rules. If you have any tips to help others please share in the comments or fork this gist and add your own opinions.
##Here is a list of languages
- C#: primarily OO, primarily static. Multi-paradigm: functional (but not as good as F#) and dynamic (but not as good as Ruby)
- Ruby: primarily OO, dynamic. Multi-paradigm: functional (more so than C#, but not as good as F#)
- F#: primarily functional, primarily static. Multi-paradigm: OO (dare I say as good as C#)
- Scala: Scala is to Java as F# is to C# (mostly)
- Clojure: strictly functional, dynamic, recently got opt-in static
- Haskell: strictly functional, strictly static
- Javascript: object oriented with first class functions, dynamic/prototypical. Multi-paradigm: makes me sad if you apply C# style OO to JS (see comments for clarification https://gist.github.com/amirrajan/6816606#comment-922012)
- Erlang: non-strict functional (with optional types) in the small, but Kay-ish OO in the large. Joe Armstrong, the inventor of Erlang calls it a "Concurrency Oriented" language. Also, Elixir is a new dialect (quite promising IMHO) (see comments for clarifications https://gist.github.com/amirrajan/6816606#comment-922018)
##Hey! Language X isn't listed! And it's Awesome!
Write it in the comments/fork this gist, send a tweet to @amirrajan and I'll add to the list.
##I disagree with these approaches (and/or) langauge explanations!
Leave a comment and help others, fork this gist and give your perspective. The more the merrier!
##Be Nice with your comments
##So where to start???
Here are some recommendations on where to start. Again, this is my personal opinion, please feel free to leave a comment on this gist for others to benefit from. Also, take your time with this, you won't get proficient over night (I'm still learning too).
###Baseline
It may help to baseline in your preferred language.
Implement the following coding problems in the language of your choice:
Prime Factors: http://amirrajan.net/meta/2013/10/06/TDD-the-wombo-combo-of-software-dev/#getstarted
Mancala: https://gist.github.com/amirrajan/2153731
Conway's Game of Life: http://en.wikipedia.org/wiki/Conway's_Game_of_Life
##I'm a C# dev, where do I start?
-
Do the Baseline Section
-
Think dynamically in C#:
Watch this video: http://vimeo.com/43659055
Read this wiki/blog entry: https://github.com/amirrajan/Oak/wiki/gemini-deep-dive
-
Do the Baselines in the following order and languages: Ruby, JavaScript (using NodeJS), F#, Clojure
-
Baseline again in C# (how does it feel?), try other languages in the list!
##I'm a Ruby dev, where do I start?
-
Do the Baseline Section in Ruby
-
Do the Baselines in the following order and languages: JavaScript (using NodeJS), Clojure, ObjectiveC or C# (Mono), Scala
-
Baseline again in Ruby (how does it feel?), try other languages in the list!
##I'm a JavaScript dev, where do I start?
-
Do the Baseline Section in Javascript
-
Do the Baselines in the following order and languages: Ruby, Clojure, ObjectiveC or C# (Mono), Scala
-
Baseline again in JavaScript (how does it feel?), try other languages in the list!
##I'm a Java dev, where do I start?
-
Do the Baseline Section in Java
-
Do the Baselines in the following order and languages: ObjectiveC or C# (Mono), Scala, JavaScript (using NodeJS), Ruby, Clojure
-
Baseline again in Java (how does it feel?), try other languages in the list!
##With regards to language learning order
I tried to order the languages in such a way so that it eases you into newer languages. As Björn Rochel (@BjRo) has stated in the comments, you may feel comfortable in deviating from the orders perscribed above.
##My primary language isn't here!
I can only speak to language I've worked with. If you can provide any tips, please comment and let me know via twitter: @amirrajan and I'll update as best I can.
One main comment I have here is that JavaScript is absolutely an object oriented language. It is also dynamically typed, with weak typing. (there's no compile time type checking, and we can cast number to strings easily.)
But it's not the kind of OO that people are used to - that is, it's not "class-based" like Java or C#. In JavaScript, you take an object and conjure a new object from that object, and then you modify that new object's prototype.
This is actually a bit how Ruby works too, except that Ruby does have a friendly "class-based" approach you use to declare objects. But in Ruby, since everything is an object, it's perfectly legal to grab an instance of Object and add methods to it at runtime. Or inject modules of code onto existing instances. In fact, in Ruby, even classes themselves are objects.
Somewhere, "object oriented" programming became "make a class, create an object from said class", but Smalltalk, Ruby, and JavaScript don't necessarily fit that. OOP should mean "objects talking through message passing."