Search code examples
javascriptecmascript-6smalltalkecmascript-5

Beginner Programmer - Whether to start with ES5 or ES6


I'm stepping onto the path of coding, for web services (full stack), after being a generalist in IT ops for many years. Ruby, Python, C# and JavaScript are interesting and Launch School looks like it has an excellent approach and curriculum for learning full stack, starting with Ruby on the back-end.

What about C# and .net Core?

However, a friend recently got me interested in C#, which is apparently a beautiful language to work with. The release of .net Core last month made this even more attractive. However, it's not a bad idea to start simple and to learn to program first and, unfortunately, C# is inseparable from .net. All the code examples appear to have .net throughout and maybe this makes it not so good for beginners to learn programming concepts.

The structure and strict typing of C# is attractive to me, but so is the 'simplicity' of Ruby and other dynamic languages. Ruby's OOP and the opinionatedness of the language is also attractive. Actually, there appear to be compelling reasons for each language.

On to JavaScript

So, continuing research shows that there is a strong case for JavaScript as a great first language, which will extend into many areas (web front and back end, DevOps, etc) and create, as Jeffrey Snover puts it, 'a virtuous cycle'.

JavaScript looks good, too. It seems to be less verbose than C#. However, it has the disadvantage of not having C#'s strict typing, nor Ruby's opinionatedness, to help the programmer write better code. It's so loose. ES6 and TypeScript go a way towards resolving this problem and initially I wanted to just learn TypeScript. But, I'm a fundamentalist and so this just doesn't feel like the right way to go.

Possible path

This leads me to a path more or less based on:

  1. learn to code, using ES5 (lots of available resources starting with Eloquent JavaScript, adding Speaking JavaScript, JavaScript:The Good Parts, etc);
  2. add Smalltalk into the mix, as this sounds like a great baseline and is, by all accounts, a beautiful, simple/direct language with a pure OOP focus;
  3. learn CSS and HTML, JSON, ReST;
  4. learn TypeScript, ES6 once I am comfortable with ES5, including having avoided many of its pitfalls;
  5. learn Node.js, and other JS variants, as required;
  6. add frameworks, as required.

Anyway, JavaScript makes sense for full-stack, 'everything' web services. Great to learn a non-Microsoft stack, too.

Thanks, nick

EDIT:

I have listened to a podcast, in which Kyle Simpson, Ashley Williams, et al, are talking about beginners using JavaScript to learn programming concepts. And, they are praising the lack of abstractions and sugar in ES5 and comparing this with the introduction of abstractions in ES6, some of which obscure aspects of the language from beginners.

In the context of ES6 making it harder for beginners they seem to point pretty strongly at Classes and that the implementation appears to be an odd fit for the language. But, they also mention how awesome Destructuring is and how this makes it easier to learn. It's an interesting discussion.

Ashley also gave a talk at jsconf2015 (link on the page linked to above) in which she looks at ES6 in the context of using it to learn programming concepts.


Solution

  • Javascript is a great language but it is also very confusing and there is a lot of bad articles out there. Unlike the other answer, I suggest you learn ES5 first because all the books you have mentioned are written in ES5. You don't want to confuse yourself with arrow syntax and other syntactic sugar. You will also appreciate ES6 more once you suffer a bit with ES5 but I believe that is the necessary part of learning. It would also give you a better perspective on to why these new features where added to ES6.

    When it comes to learning Javascript, my opinion is to choose multiple sources, like videos, following the right people on twitter, listening to podcasts, articles etc. Here is a good place to guide you on your journey: http://jstherightway.org/

    The books you have mentioned are great but I would add two more books to it. Javascript the definitive guide and you don't know JS.

    I have read Eloquent JS, The Definitive Guide and Javascript the good parts but I felt that I truly started to grasp JS after I read "You don't know JS - by Kyle Simpson" https://github.com/getify/You-Dont-Know-JS

    I highly suggest his video course "Advanced Javascript for serious Programmers". It really opened my eyes to the javascript paradigm.

    Don't jump on frameworks because you will wasted a lot of time on configuration instead of learning actual javascript.