4 ms·
JS is a terrible way to teach CS and it's a terrible first language to learn programming. CS requires a deeper understanding that JS gloses over (obviously) an
by iandanforth 15y ago
JS is a terrible way to teach CS and it's a terrible first language to learn programming.
CS requires a deeper understanding that JS gloses over (obviously) and programming in general can be more easily learned in either a cleaner (python) or more rigorous (java) language. I'm only a few years into my programming career and vividly remember trying dozens of tutorials in half a dozen languages before deciding on really learning through Python. If I were to rank languages to start with they would look like this:
Goal: Learn to Program
Python,
Ruby,
Java,
PHP - yes, really,
JS
Goal: Learn CS
Java,
C,
Assembly,
C++
- yajoe 15y agoI haven't seen a comment espousing the differences between languages since my early days on /. It's refreshing to see such passion, but I feel compelled to offer some advice: languages are just "tools." No one tool is better than another for all situations. JS seems like a reasonable place to start new programmers. Like anything in software, it has its tradeoffs. Some thoughts: * While the new programmer won't learn about call stacks or different parts of memory (considered essential when I learned to code), the programmer will learn to solve problems using control structures, method calls, recursion, and iteration. These are fundamental skills I see re-used in almost every language. Are there other awesome skills like functional programming I wish they would learn? Sure, but you have to start somewhere, and I support starting at if-else-then logic. * Writing JavaScript is easy. No command line. No installing software. No compiling. No IDE. Just open your Web Console in Firefox or JavaScript Console in Chrome. Seriously, if you are teaching the masses on the internet, what better way than use the very tool they used to view your website? * Writing JavaScript is in fashion. From Node.JS to last week's Tower.JS, JQuery, JSON, or the "new" HTML5 rage: JavaScript is popular. What better way to be relevant than teach what the industry is using? I support teaching popular things to introduce people to our industry. [edited: /. not ./ derp!]
- cmubruin 15y agoagreed!
- khyryk 15y agoUh, what? If you want to learn Java, learn Java. If you want to learn CS, learn CS. An algorithm, for instance, isn't dependent on any particular language -- it's up to the programmer to incorporate it into whichever language he/she wants.
- tikhonj 15y agoJava and C++ are horrible choices for "teaching CS"--they are too complicated. Assembly and C are good choices for getting a low-level feel (I think a RISC architecture is more didactic and thus a better option). However, CS is not all low level--there is much to do at higher levels of abstraction. In fact, I think starting out at a high level of abstraction (e.g. Scheme) and moving down is the best option. (Coincidentally, Scheme with SICP is a great here.) For the basics, I think Scheme -> C -> MIPS -> Simple MIPS CPU is a nice progression. After that, the languages you use would depend on the domain you're studying. (E.g. if you're studying programming languages, I'd go with Haskell.) As for learning to program, I think Python is woefully overrated. JavaScript is a nice (I think nicer) language and , moreover, is easier to bootstrap--you start out in a familiar environment (the browser) immediately.
- iandanforth 15y agoCan you recommend a good Scheme tutorial? I haven't tried it.
- tikhonj 15y agoIt depends on how motivated you are :) If you really want to learn not just Scheme but some really cool CS stuff, then SICP[1] is the best option. It's an awesome book, but it has about as much material as a single semester CS introductory course. [1]: http://mitpress.mit.edu/sicp/ http://mitpress.mit.edu/sicp/ I learned Scheme (and a bunch of other stuff) with such a course and it was awesome. Most of my friends and I thought the course was easy but apparently others didn't, and I gather it actually has a reputation of being relatively difficult around here. If you're less motivated or have less time, I've heard really good things about The Little Schemer[2]. Our course also suggested Simply Scheme as an introduction to it. This book was written by our professor, who is the best teacher I've ever had for anything, and it's available for free online[3], but I've never read it. [2]: http://www.ccs.neu.edu/home/matthias/BTLS/ http://www.ccs.neu.edu/home/matthias/BTLS/ [3]: http://www.cs.berkeley.edu/~bh/ss-toc2.html http://www.cs.berkeley.edu/~bh/ss-toc2.html I don't know of any really good shorter tutorials, but I'm sure they exist. That said, if you have a little bit of time, you really should read SICP--you'll learn a ton about CS as well as learning Scheme.