Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I agree with the advice to read a few books and solve problems using core language and avoiding non-standard libraries and especially frameworks. This is important. But what much more important to me (and is often missing in this "how to learn language X") is fitting the advice to whether this is a first programming language to learn or not.

If it is the first, a lot of hand-holding makes sense; reviews of good code, exercises to solve a simple problem three different ways, etc. This also helps avoid learning really bad patterns that take years to unlearn. In fact, if JS is the first language I would recommend stopping and doing something else first. Python, C, Go or Kotlin are all better in my view as a standard tools to learn the basics of statements, flow control and data types.

Those already comfortable with programming will pick the basics of JS in a couple of sittings. What they need is a set of problems, both simple and more complex, that highlight the language strengths: wowing the reader with what the language makes possible with a few pages of code. Add some hints and let experienced developer explore.

Everyone is different, but this works best for me. My 2c.



I'm quite impressed with Haxe in that regard: a manual[1] that goes through the language and explains how it works and [at least some of] the reasoning behind why it works that way. Rest of the tutorials/docs on the Haxe site are maybe a bit ho him, but that was excellent: aimed at an experienced audience, very readable and informative. Many languages have something similar, but none I can think of have anything quite as useful.

1. https://haxe.org/manual/introduction.html


Do you happen to have pointers so a set of such problems?


I do not have a well-organized one, especially specific to JS. I have my favorite set that I personally like over the years. I think at least a couple are from "The Practice of Programming" by Kernighan and Pike; I especially like the Markov-style text generator -- their well-written solution for the same problem in Java, C++, Perl and Awk provides a good perspective, too. Since my background is in math I like prime decompositions, Lissajous curves, drawing fractals, building mazes. But those are just personal preferences suitable to many general-purpose languages.


Not OP but I found his sentiments to match mine when I worked through Learn Rust With Entirely Too Many Linked Lists (https://rust-unofficial.github.io/too-many-lists/).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: