<story><title>John Resig: JavaScript as a First Language</title><url>http://ejohn.org/blog/javascript-as-a-first-language/</url></story><parent_chain><item><author>absconditus</author><text>Javascript is an absolutely horrible language to use for such purposes. There are far too many gotchas. See the following for numerous examples:&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/1995113/strangest-language-feature?tab=votes&amp;#38;page=1&quot; rel=&quot;nofollow&quot;&gt;http://stackoverflow.com/questions/1995113/strangest-languag...&lt;/a&gt;</text></item></parent_chain><comment><author>zackzackzack</author><text>Whenever I see a post about what to use as a first language I always think about how I learned, and am learning, how to program. Warning: long-ish story/rant ahead.&lt;p&gt;My first class in high school was the basic Java 101. The teacher did not know anything more than how to draw UML diagrams and tell us to use for loops. He had been teaching the class for years and had no industry experience. I imagine 10 years ago he figured out all the questions he was going to ask and learned just enough to explain the really difficult ones.  He was not a zen master LISP programmer who had glided down from the plane of Forms to enlighten us.&lt;p&gt;But I started to learn programming because of him. He knew what he knew and he had his presentation down. I didn&apos;t know how to program so anything was better than what I was going with. He explained terms and ideas in the most stereotypical of ways. But they made sense. In a way, he passed off his framework of knowledge to those who cared to take it. It was incredibly mind expanding at the time.&lt;p&gt;And so I had this little ball of specific domain knowledge. I wanted to be able to do cool stuff though on my website though. Java wasn&apos;t quite there yet, couldn&apos;t do all the things I wanted it to do. So I picked up Javascript from W3 schools online. It was terrible, awful Javascript that I have purposefully forgotten. But I could make my pages interactive, I could impress my friends. My little ball of know how was growing and expanding. I kept at it and started seeing how Java &quot;sucked&quot; and why Javascript was the One True Language. New ideas like functions as variables, easy to run scripts, interactive webpages, they all got added on and replaced old less useful ideas from Java.&lt;p&gt;Pretty soon after that I started actively learning Mathematica in college. The whole IDE is just lisp with some mathematical lipstick, but I didn&apos;t know that at the time. I started thinking of how to solve problems with lists, how to use IDE&apos;s, and reading and writing to files so I wouldn&apos;t have to redo everything each time. I had programs that wouldn&apos;t run in less than a second which made me really aware of what I was writing and how to optimize things.&lt;p&gt;And the story just keeps going and going on like that. Common lisp with Emacs last winter because of PG. More Mathematica and jQuery during last spring and summer because of an Internship. Node, Haskell, Clojure, Python during this past fall for enlightenment. And now R and, maybe, Ruby/Rails during the winter because I have ideas I want to make happen. I&apos;m by no means a professional, but I know enough to shoot the shit with the CS majors and randomly drop into tech meetups (What up Cinci.rb!)&lt;p&gt;All that sprung from a high school class taught by a standard teacher on a shitty language that I don&apos;t ever want to touch again. And so when people talk about first languages and why X will be an absolutely horrible language to use to learn, I zone out. Every language is going to be a horrible first language. All of them. I don&apos;t care what arguments you make about js gotchas or Python&apos;s batteries included or why scheme is more beautifuller than common. If you don&apos;t know how to program, learning how to program is going to suck. Period. Maybe learning C++ first isn&apos;t the hottest idea, but at some point you have to grit your teeth and go &quot;Programming is hard.&quot;&lt;p&gt;So I applaud Resig&apos;s and Khan Academy&apos;s use of javascript. Not because I love javascript, but because I know they are going to doing an amazing job presenting the tiny balls of programming knowledge to kids across the world. They could have picked most any mainstream language they want to present these ideas with and I would still be excited by their ideas. All that matters is how they plant the seeds. If they can stir up a kid&apos;s desire enough to get over the &quot;ARRAYS SUCK. FOR LOOPS SUCK. WHY WON&apos;T MY PROGRAM COMPILEEEE.&quot; and learn the next language or build the next project, then they have done an amazing job and good for the world.&lt;p&gt;tl;dr Programming is hard, every language has it&apos;s own use, waffling about the choice of languages isn&apos;t going to teach you what you need to know any faster.</text></comment>
<story><title>John Resig: JavaScript as a First Language</title><url>http://ejohn.org/blog/javascript-as-a-first-language/</url></story><parent_chain><item><author>absconditus</author><text>Javascript is an absolutely horrible language to use for such purposes. There are far too many gotchas. See the following for numerous examples:&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/questions/1995113/strangest-language-feature?tab=votes&amp;#38;page=1&quot; rel=&quot;nofollow&quot;&gt;http://stackoverflow.com/questions/1995113/strangest-languag...&lt;/a&gt;</text></item></parent_chain><comment><author>wwweston</author><text>I suspect Mr. Resig is familiar with the potential gotchas, and maybe even has his reasons for still believing it&apos;s still worthwhile.&lt;p&gt;For my own part, as someone who regularly taught high school seniors (and other non-programmers) various programming languages (Pascal, Perl, Prolog, JavaScript, and Java) over a good chunk of the 1990s, I have to say that JavaScript worked out pretty well, possibly even the best of the bunch depending on what your goals were.&lt;p&gt;Prolog had some real strengths. The combination of accessibility for some simple applications with the power and conceptual depth of the logic paradigm tended to put more or less smart people with no previous experience on the same footing with those with some experience.&lt;p&gt;But JavaScript seemed to be the best of the bunch in terms of balancing accessibility, speed from which students could get to doing something with everyday practical use, and available depth.&lt;p&gt;And despite the fact that those of us who were teaching were just learning and coming to grips with some of the &quot;bad parts&quot; ourselves (because how many people &lt;i&gt;really&lt;/i&gt; knew JavaScript in the 1990s, right?), everybody got stuff done anyway.</text></comment>