Slashdot Mirror


Stanford CS101 Adopts JavaScript

mikejuk writes "In case further proof were needed that JavaScript shall indeed inherit the earth, we have the news that Stanford has adopted JavaScript to teach CS101 — Introduction to Computing Principles: 'The essential ideas of computing via little phrases of JavaScript code.' You can even try it out for yourself at Stanford's course page."

255 comments

  1. Why not PL/1? by Anonymous Coward · · Score: 0

    They should be teaching PL/1 or FORTRAN.

    1. Re:Why not PL/1? by crashumbc · · Score: 1

      Hey! I had FORTRAN for my introductory Programming course at PennState in 93 :(

    2. Re:Why not PL/1? by hedley · · Score: 1

      PL/1? That was my intro lang in 79 @nyu. I had no prob with the lang it was great to
      learn on, the real snag was punch cards and only getting 2 - 3 runs in in a 12hr day at the
      data center.

    3. Re:Why not PL/1? by sensei+moreh · · Score: 1

      Pl/1 was the language for all non-computer types back in 1975 at UCLA. The computer types took FORTRAN

      --
      Geology - it's not rocket science; it's rock science
    4. Re:Why not PL/1? by Dast · · Score: 2

      Oh good glub that brought back some horrible memories.

      If I could think of a language with a syntax worse than JS, it would be PL/1. I just LOVE letting programmers use keywords as variable names, throwing up my hands and saying, "let the compiler figure this isht out!"

      Excuse me while I go kill myself.

      --

      This sig is false.

    5. Re:Why not PL/1? by bangwhistle · · Score: 1

      Pascal was my intro language ('81), and a good one it was. I had the honor of using PL/1 on my first job. A real kitchen sink language.

    6. Re:Why not PL/1? by TheRaven64 · · Score: 1

      IBM had PL/1
      With syntax worse than JOSS
      And everywhere the language went
      It was a total loss

      --
      I am TheRaven on Soylent News
    7. Re:Why not PL/1? by C_L_Lk · · Score: 1

      Hah... same here - CS201? Intro programming for engineers? My CS friends all had CS101 in Pascal at the same time.

    8. Re:Why not PL/1? by shutdown+-p+now · · Score: 1

      I just LOVE letting programmers use keywords as variable names

      The idea lives on, though - XQuery does that today. Coincidentally, it also happens to be a language where there's no straightforward way of separating the lexer and the parser (because you need parser context to know how the lexer should parse tokens - in effect, you need two different lexers switched on the fly by the parser).

  2. Big Improvement! by Anonymous Coward · · Score: 2, Funny

    When I was in school we had to use ECMAScript!

    1. Re:Big Improvement! by Anonymous Coward · · Score: 1

      Yes, Java script is much safer since it will have the backing of the JVM to make sure you don't write programs that leak memory or cause null pointer issues. Every responsible coder should switch to these safe languages. I believe a law should be passed to severely punish programmers who don't use these safe languages and write code that has security flaws.

    2. Re:Big Improvement! by SuricouRaven · · Score: 1

      Javascript isn't even compiled. It's an interpreted language, as the 'script' implies. Very portable, pathetic performance. Good for making fancy websites that work well, but you don't get any serious number-crunching done.

    3. Re:Big Improvement! by Anonymous Coward · · Score: 0

      Oh man, being reeled in like that by a lame AC troll is just embarrassing.

    4. Re:Big Improvement! by myurr · · Score: 1

      Except modern JS engines use JIT compiling just like Java to run natively, and they are plenty fast enough to get some serious number crunching done. As fast as well written C? No, but nor are any other higher level languages (please note the well written part). Each language is a tool that should be used for its strengths, with no one language the panacea that can solve any problem. Javascript has its place, both as a universal language across the web browser but also in many other scenarios where it's popularity is growing. It's used in a couple of No SQL databases, for example, as a query language capable of processing huge amounts of data. It's used for server side scripting, even writing event based servers using Node.js that are really easy to write and highly scalable (at least to mid-sized problems). Point is it's going to be around for a while, it's performant, and you can use it to get real work done.

    5. Re:Big Improvement! by Anonymous Coward · · Score: 0

      Javascript isn't even compiled. It's an interpreted language, as the 'script' implies. Very portable, pathetic performance. Good for making fancy websites that work well, but you don't get any serious number-crunching done.

      A current implementation of a language doesn't do X.
      Therefore that language cannot do X.

      Even if that wasn't a complete fallacy, there are at the very least JIT Compilers for Javascript.

    6. Re:Big Improvement! by grimmjeeper · · Score: 1

      I'm pretty sure I wouldn't want to write an operating system in Java or Javascript. I'm pretty sure that writing an operating system that wouldn't run unless it had an underlying operating system wouldn't work so well. But I can't disagree that for application level programming, safe* languages are a better choice.

      * safe meaning only that it's more difficult for bad programmers to break things. Of course, there's no such thing as a language that prevents bad programmers from writing bad code.

    7. Re:Big Improvement! by Walt+Dismal · · Score: 1

      Baah. When I was a kid, all we had was BASIC, and we liked it. And when I went on to write missile system control code, I continued to use BASIC, and it worked well and reliably, most of the time. It wasn't my fault we blew up New Jersey by accident. It's a good language and all anyone reasonably needs. You and your fancy object-oriented code and your multi-threading and your complexity. Phooey. All I need is PEEKS and POKES and a 1MHz 6502 and by god I can do nearly anything. I was using Agile methods to program in BASIC before any of you kids were out of diapers.

      I have to go now, the attendant came by with my meds.

    8. Re:Big Improvement! by Mitchell314 · · Score: 1

      In Java you can still leak memory (by forgetting to delete references or having a logic bug allocating more than needed) and reference null objects. The only language that doesn't let you screw up is a language that produces no output.

      --
      I read TFA and all I got was this lousy cookie
    9. Re:Big Improvement! by grimmjeeper · · Score: 1

      You had BASIC and integrated circuits? Hell, when we were doing it first we had to do it all in machine code on tubes wired together and we LIKED it! All we had were ones and zeros. One project I worked on we had to use the letters l and o because they wouldn't even give us numbers! You and your fancy programming languages. Gah, I bet you even had a console to see your pretty text. Phooey!

      BTW, tell that attendant to hurry up, I need my meds too!

    10. Re:Big Improvement! by Anonymous Coward · · Score: 0

      7 digit uid? I smell something funny, and not the joke.

    11. Re:Big Improvement! by sg_oneill · · Score: 1

      Actually its funny you say that. My grandfather (RIP) used to code systems in DEC-Basic on those old VAX mainframes that basically ran entire petroleum refineries , and probably still do to this day. The old guy went to the grave 4-5 years ago still convinced procedural programming was a fad (God knows what the old boy made of OO).

      I miss him so much :(

      --
      Excuse the Unicode crap in my posts. That's an apostrophe, and slashdot is busted.
    12. Re:Big Improvement! by gregrah · · Score: 1

      The old guy went to the grave 4-5 years ago still convinced procedural programming was a fad

      Serious question here: if he wasn't writing procedural code, what was he writing?

  3. That's odd. by Anonymous Coward · · Score: 0

    Given the uncertainty surrounding the future of Javascript.

    1. Re:That's odd. by Lennie · · Score: 1

      What do you mean ?

      --
      New things are always on the horizon
    2. Re:That's odd. by FoolishOwl · · Score: 1

      Apparently, Microsoft is pushing the use of HTML5 and Javascript for UI elements in Windows 8. It's looking like the future of Javascript is fairly bright.

  4. Ideal IDE by vlm · · Score: 3, Interesting

    For utter newbs not going into CS, JS is a good choice, because any machine with a web browser is a dev box, but for actual CS students, a debian boot disk is probably more appropriate.

    You should have heard the screams of pain in my cobol class many years ago. What, you mean a "dos" application? And the alternative is a AS/400 that doesn't even support telnet? Someone who suffered thru that kind of experience probably went to the other extreme in selecting JS.

    JS isn't even all that bad of a language for newbies to learn the basic concepts.

    --
    "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
    1. Re:Ideal IDE by Anonymous Coward · · Score: 0

      JS isn't even all that bad of a language for newbies to learn the basic concepts.

      Are you kidding? JavaScript is a hack of a language. This is probably one of the worst ideas ever. You seriously think teaching fresh new minds a twisted poorly designed language like JavaScript is a good idea?

      You might as well teach them Flash. Oh wait, Flash's ActionScript is JavaScript.

    2. Re:Ideal IDE by djdanlib · · Score: 3, Funny

      JavaScript is analogous to McDonald's. Sure, it's cheap, they have plenty of options and they are everywhere, but there's much better stuff out there.

    3. Re:Ideal IDE by Bob+the+Super+Hamste · · Score: 2

      That is true. Any full language (ones that support functions and data structures) would be a good one to learn when first starting since the point isn't to learn the language (a side benefit) but to learn how to program in a structured language. If you initially worked with basic (I learned apple soft basic when I was in elementary school) going to a structured language like c, java, pascal, fortran, c++, was really difficult as you always wanted to used goto. I don't know if logo supported functions or not but I never used them when in school.

      --
      Time to offend someone
    4. Re:Ideal IDE by RyuuzakiTetsuya · · Score: 2, Insightful

      oh god no.

      JS is a HORRIBLE language to teach newbies.

      From my point of view, JS is a horrible kludge of compromises and should be left up to coders who have a more firm grasp of object orientation, types(Yes, it's loosely typed, but beginning CS should really enforce both the ideas that data, whether it's strings, ints, etc, is just a pile of number values, but also how important it is to abstract that out) and algorithms. That being said, JS isn't a bad *language* per-se in reality, once you understand the limitations it presents, and as well, how to best wring out functionality out of it's flexibility.

      --
      Non impediti ratione cogitationus.
    5. Re:Ideal IDE by Dog-Cow · · Score: 1

      I learned BASIC before I learned C, and functions always made sense to me. I guess some people just get it and some people are too much creatures of habit.

    6. Re:Ideal IDE by w_dragon · · Score: 1

      Quit thinking of JS as object-oriented. Just stop. Yes, it has some OO cludges, and it can kinda-sorta-not-really do objects, but it's much closer to a functional language.

    7. Re:Ideal IDE by i.r.id10t · · Score: 1

      Got me to learn about user created functions much quicker than the artificial limits imposed by goto w/ line number.

      --
      Don't blame me, I voted for Kodos
    8. Re:Ideal IDE by j-pimp · · Score: 1

      Actually I think ActionScript would be superior because its statically typed and properly OO. I was discussing this with Vanessa Hurst a.k.a @DBNess on twitter this weekend.

      --
      --- Justin Dearing http://www.justaprogrammer.net/ We're just programmers.
    9. Re:Ideal IDE by RyuuzakiTetsuya · · Score: 1

      But that's my point.

      Teaching kids JS first then real OO languages later will confuse the crap out of them.

      Having experience with a real OO language, or something close to it, will help students cope with general JavaScript wackiness.

      --
      Non impediti ratione cogitationus.
    10. Re:Ideal IDE by Richard_at_work · · Score: 1

      JS is a horrible language, but the principles it is made from are the same across all languages.

      It has foreach loops, it has while loops, it has if statements, it has user input and output....

      I'm doing a BSc in Computing and Mathematical Sciences at the moment with the Open University (a renowned UK distance learning university), and the first computing module (which, even tho I have a decade of experience in computing I cannot skip) uses JS to introduce the basics of programming. I don't see anything wrong with it for the purposes they are using it for.

    11. Re:Ideal IDE by kehren77 · · Score: 1

      My CS101 course in college thought the best language to start us on was Scheme. Endured a semester of that before we could move up to C++.

    12. Re:Ideal IDE by vlm · · Score: 1

      I was thinking more along the lines of newbies who are still learning the concept of sequential execution, the concept of breaking down a big problem into little tasks, the concept of a flowchart and what it represents, or even the general idea that variable assignment, control flow statements, and recursion exist. What is a picket fence mistake? That type of basic learning.

      Data structures and algorithm design and big O notation is pretty far beyond really newbie stuff like "how can a computer be told to count to 10". Maybe next semester.

      It could be argued that CS should follow the lead of math... you don't start math majors out with basic algebra, although there are remedial classes. JS would be great for a remedial class.

      --
      "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
    13. Re:Ideal IDE by gl4ss · · Score: 1

      basic inside a c64 emu they ran inside an emulator that ran in js would have done the job. it doesn't hurt. and it's stanford ffs, not 9th grade, doesn't matter if they there to learn chemistry they still should learn the tools of the trade, the tools of information handling and that's computers.

      nothing you do with js is mature. and what ideal IDE are you speaking of? seriously. what's an ideal actual ide for js and what's an ideal way to deploy something written in js as deployable, "stand alone" program? (I tried some eclipse based stuff, was hardly ideal, in the sense that notepad and couple of web browsers was more ideal). anyways, learning js isn't that bad but it should be on the same course you learn doing .cmd's.
       
        and actually maybe you should check what they're teaching with it, could just as well have gone with basic since it's nicer to write on paper.

        but maybe some actual course stuff would help the arguments back and forth..

      im = new SimpleImage("flowers-tiny.jpg"); // every-pixel loops -- the "for" lines typically do not change.
      for (x = 0; x im.getWidth(); x++) {
          for (y = 0; y im.getHeight(); y++) { // The important code goes in here .. code you // want to run once for every pixel in the image. // Do something with pixel at x,y -- here we just print it.
              print(x, y, im.getPixel(x, y));
          }
      }

      sure it's nice and rewarding to start out like that, load a jpg, a single line, change pixels. but you know what? this is the sort of programming we were 'taught' before high school, with a crappy translated pascal library(which was just a wrapper for bgi, some douche must have made a nice chunk of money doing the translation). and now it's over a decade later and they're teaching this stuff on stanford cs-101?

      and ideal ide? a browser textbox an ideal ide, say whaaaat?

      --
      world was created 5 seconds before this post as it is.
    14. Re:Ideal IDE by Anonymous Coward · · Score: 0

      They were right.

    15. Re:Ideal IDE by memyselfandeye · · Score: 3, Insightful

      It's Ok. Next year they'll be teaching Rails.

      Q) Can you tell me the difference between FIFO and LIFO?
      A) Nope, but I can open a new window on a browser using BOTH client side and server side scripting. That's because I went to Stanford. It's a totally cutting edge difficult school!

      Seriously though, I think this has to be a very introductory course for CS students with zero programming experience or a light course for non CS students. By the start of their second year, Stanford CS students will be doing Operating System Designs in C, I checked their curriculum. It's exactly the same as mine 10 years ago. Our intro was parsing text and learning loops in C, and most kids needed a crap load of help to get Borland going on their computer. I can totally understand using a scripting language that just needs a browser. It probably could have been harder for me and these guys, but most of us were/will be struggling enough in chemistry and electronics 101 to give a fart. By year 2 they'll be writing buffer outputs in ASM and building disk caches in C. Should they go on to graduate school, they'll be writing in languages their advisor has developed that many 3 other people on the planet have any familiarity with.

      I remember my first job interview. "Give me a book and a couple weeks" was the answer to "We think you'll be a good fit, but what other languages can you program in."

    16. Re:Ideal IDE by WindBourne · · Score: 1

      And like McDonalds, it works great for the little ones. Sadly, my kids love it because of the playground and toys. Other than not being healthy and employing loads of illegals, it is not that bad.
      Well, the same is true of javascript. Stanford can use it to teach coding fundementals and still allow the kiddies a much easier transfer to say java, C++, and C.

      --
      I prefer the "u" in honour as it seems to be missing these days.
    17. Re:Ideal IDE by Bob+the+Super+Hamste · · Score: 1

      I fell into the creature of habit category, it took me forever to not want to write gotos. Once I got use to functions (in high school) it became clear why they were better. I think in the almost 20 years since learning something other than basic I haven't written a goto statement.

      --
      Time to offend someone
    18. Re:Ideal IDE by _0xd0ad · · Score: 3, Informative

      Q) Can you tell me the difference between FIFO and LIFO?

      Javascript arrays have push(), pop(), shift(), and unshift() methods. If they fail to teach FIFO and LIFO, they can't blame it on Javascript.

    19. Re:Ideal IDE by Anonymous Coward · · Score: 3, Informative

      JS is indeed a bad language if you care at all about syntax or sanity.
      Here's a couple from Stackoverflow.

      In JavaScript:
        '5' + 3 gives '53'

      Whereas
        '5' - 3 gives 2

      the following construct
      return
      {
              id : 1234,
              title : 'Tony the Pony'
      };

      is a syntax error due to the sneaky implicit semicolon insertion on the newline after return. The following works as you would expect though:
      return {
              id : 1234,
              title : 'Tony the Pony'
      };

    20. Re:Ideal IDE by Inda · · Score: 1

      So true.

      They should have chosen Perl. ;p

      --
      This post contains benzene, nitrosamines, formaldehyde and hydrogen cyanide.
    21. Re:Ideal IDE by Anonymous Coward · · Score: 0

      Agreed. SmallTalk is the perfect language to teach abstraction, programming and object-oriented thinking at the same time with the added benefit of an integrated IDE which allows the execution of highlighted code or the entire programme.

    22. Re:Ideal IDE by Anonymous Coward · · Score: 0

      JavaScript can/does do objects perfectly well. You choose not to, but then again you can choose not to write object-oriented code in C++ as well.

    23. Re:Ideal IDE by drolli · · Score: 1

      No, with the new nonrelational database you dont need to think about types, so i heard. Just spill whatever you have and use whatever keys you have. No need to prove it works.

    24. Re:Ideal IDE by Bill_the_Engineer · · Score: 1

      I'm thinking along the lines that now that you experienced an unsophisticated language to whet your appetite, you'll fully appreciate the much better suited languages later in the CS curriculum.

      It's CS101. I don't even remember what rudimentary language I had to learn for that *intro* class. It's not like Stanford is dictating that javascript will be taught in all classes.

      You have to admit that if you run a CS degree program and you want to look "hip", "current", "bleeding edge", or "relevant" what is better than picking a popular web language for your CS101 class. It will make slashdot (this is really a slashvertisment for Stanford's CS program) and may attract more freshmen into your program. It's not like the important classes are being affected by this change.

      --
      These comments are my own and do not necessarily reflect the views or opinions of my employer or colleagues...
    25. Re:Ideal IDE by Jane+Q.+Public · · Score: 1

      "Quit thinking of JS as object-oriented. Just stop. Yes, it has some OO cludges, and it can kinda-sorta-not-really do objects, but it's much closer to a functional language."

      I mostly agree, except I think you mean "procedural" language. These days, "functional" language means something else.

    26. Re:Ideal IDE by Jane+Q.+Public · · Score: 1

      JavaScript is indeed a terrible language for learning. I would give a total noob the old line-number BASIC before I would give them JavaScript.

      But even better would be a later version of QuickBASIC. It was ANSI-standards compliant, compiled (with an interpreter also for development), and supported line numbers so you could teach that as an absolute rock-bottom start if you wanted. But it was also fully procedural, in that you could define your own procedures and functions and call them, with no need for GoTos whatsoever.

      You could even specify whether your parameters would be passed by reference or by value... a good way to teach a valuable lesson that I haven't seen in other languages.

    27. Re:Ideal IDE by koreaman · · Score: 1

      I think he actually meant functional -- Javascript has a lot of features that would be called as such.

    28. Re:Ideal IDE by Jane+Q.+Public · · Score: 1

      But no more so than other mainstream languages like Python or Ruby, and they aren't "functional languages" either.

    29. Re:Ideal IDE by element-o.p. · · Score: 1

      Javascript arrays have push(), pop(), shift(), and unshift() methods. If they fail to teach FIFO and LIFO, they can't blame it on Javascript.

      They shouldn't be able to blame it on JavaScript, anyway. I went to a college that had nowhere near the prestige of Stanford, but in my CS101 and CS201 courses, we were programming push() and pop() functions ourselves.

      The difference between a master of some art and a mere practitioner of the same art is that, if the master doesn't have the tool he needs to accomplish a specific task, he'll build it, whereas the practitioner will grouse that he doesn't have the tools he needs to do the job properly and either quit or do a substandard job.

      --
      MCSE? No, sir...I don't do Windows. Yes, I am an idealist. What's your point?
    30. Re:Ideal IDE by DragonWriter · · Score: 1

      JavaScript can/does do objects perfectly well. You choose not to, but then again you can choose not to write object-oriented code in C++ as well.

      What GP said about JavaScript OO: "Quit thinking of JS as object-oriented. Just stop. Yes, it has some OO cludges, and it can kinda-sorta-not-really do objects, but it's much closer to a functional language."

      That works better for C++ (with "functional" replaced with "procedural") than it does for JavaScript in its original form.

      (Yes, yes, for lots of people "object-oriented" has come to be defined by behaving like C++ -- and languages influenced fairly directly by C++, like Java -- rather than Smalltalk and languages which were inspired more directly by Smalltalk rather than getting through C++, but, man, talk about ugly cludges...)

    31. Re:Ideal IDE by matthewv789 · · Score: 2

      No, I think he means "functional". Haven't you heard Douglas Crockford's quote that Javascript is "Lisp in C's Clothing"?

      (http://www.crockford.com/javascript/javascript.html)

    32. Re:Ideal IDE by Toonol · · Score: 1

      Agree. Actionscript is really a pretty nice language. Wish more people would give it a shot.

      Just like a generation learned computer programming from their C64, I think there's a lot of kids learning programming now from making flash animations, and digging into actionscript to get a few extra functions. Then, hopefully, they move to full programs in actionscript, then start studying other languages.

    33. Re:Ideal IDE by rk · · Score: 1

      Mine was IBM/360 assembler, actually. I guess that makes me really old. :-)

    34. Re:Ideal IDE by Toonol · · Score: 1

      I think in the almost 20 years since learning something other than basic I haven't written a goto statement.

      Me neither; but goto still has it's place. I'm digging into writing a forth-like scripting language interpreter/compiler, and I may end up having a huge central loop that relies on dozens if not hundreds of gotos. For this particular problem, that looks to be the clearest and cleanest solution... better than function vector arrays, or other ways of solving it.

      I had to look up the syntax for goto, never having used it in C or C++ :-)

    35. Re:Ideal IDE by Anonymous Coward · · Score: 0

      JS isn't even all that bad of a language for newbies to learn the basic concepts.

      JS is a bad language, period. It makes BASIC look good by comparison. It has horrible linguistic inconsistencies and vagaries, and the only real reason it exists is to "Git er Dun!". It's a hack of a language and people who get their start in programming are going to tend to end up as hackers. As in "take an axe and chop that there log until it looks like Marilyn Monroe!". It encourages the idea that software is something you can just screw around with and get something working quick, with no attention paid to discipline, and it has awful lot to do with the mindset that afflicts software technology today: that software should be produced fast, easy and cheap.

      Then they complain that software is insecure and unreliable. Well, you get what you pay for.

      Neither Computer Science nor Information Technology are going to be respectable professions until they start rejecting the Easy Way Out and demand that people actually take the effort to produce quality products.

    36. Re:Ideal IDE by ipwndk · · Score: 1

      Actually, I think learning a procedural language before an object oriented language is great.

      After having done some pretty heavy C programming, and being introduced to C++, it was like a miracle come true. The code stopped being this occluded mess, and things started making sense.

      I think Javascript is bad however, because it does not teach about types; learning that everything is just a number of bits, or an array of bits (such as a string), and where they reside in memory is great to know, before going into OO patterns and algorithms in general.

      --
      01 REDEFINE REALITY.
    37. Re:Ideal IDE by Panaflex · · Score: 1

      We use goto's all the time in C code. There's nothing wrong with their use. We often use them in a similar way to "try/catch" scenarios.

      For instance, we have macros like such::
      #define MEMORY_CHECK_GOTO_DONE(x) if(x == NULL) { err = REPORT_ERROR("Allocation failed", ERROR_ALLOCATION); goto DONE }

      Works nicely and far fewer typos - which is what you need when you're writing a lot of code.

      --
      I said no... but I missed and it came out yes.
    38. Re:Ideal IDE by Jane+Q.+Public · · Score: 1

      Having read it doesn't mean I agree with it.

    39. Re:Ideal IDE by Panaflex · · Score: 1

      MIT did that back in the early '90's. Maybe that was the inspiration?

      --
      I said no... but I missed and it came out yes.
    40. Re:Ideal IDE by kehren77 · · Score: 1

      Maybe. This was the mid-90's. Their CS program was fairly new and staff by the math department so....

    41. Re:Ideal IDE by Bob+the+Super+Hamste · · Score: 1

      I never said they didn't have their place, but in general it is better to avoid them especially if that is the only tool you know as you end up with code like the old apple soft basic. I think it is like the old adage goes, if all you have is a hammer everything looks like a nail, is applicable.

      --
      Time to offend someone
    42. Re:Ideal IDE by Estanislao+Mart�nez · · Score: 1

      No, I think he means "functional". Haven't you heard Douglas Crockford's quote that Javascript is "Lisp in C's Clothing"?

      (http://www.crockford.com/javascript/javascript.html)

      Every moron that wants to hype yet another crappy language as the next great thing always has compared it to Lisp. Which is stupid, since everybody hates Lisp.

    43. Re:Ideal IDE by Estanislao+Mart�nez · · Score: 1

      JS is a horrible language, but the principles it is made from are the same across all languages. It has foreach loops, it has while loops, it has if statements, it has user input and output....

      I can name several languages that don't have all of those. For example, Haskell has I/O, but not really any of the other three.

    44. Re:Ideal IDE by TheTyrannyOfForcedRe · · Score: 1

      oh god no.

      JS is a HORRIBLE language to teach newbies.

      From my point of view, JS is a horrible kludge of compromises

      You either don't know enough about javascript or aren't familiar with language design. Javascript itself is actually a very nice weakly typed prototype based object oriented functional language. Forget browsers and the DOM and all that stuff. That's not javascript. That's a very specific (and shitty) javascript runtime. Pure javascript aka ECMAScript is a nice little language with first class functions and closures. You can write in very elegant functional style that is immediately comfortable to Common Lisp hackers.

      --
      "Liechtenstein is the world's largest producer of sausage casings, potassium storage units, and false teeth."
    45. Re:Ideal IDE by leptons · · Score: 1

      You mean ECMA 3.1, not Actionscript. Actionscript is a brand name that Adobe slapped on javascript and called it their own. I code ECMA 3.1 with .NET all the time. It's pretty awesome.

    46. Re:Ideal IDE by Sulphur · · Score: 1

      And like McDonalds, it works great for the little ones. Sadly, my kids love it because of the playground and toys. Other than not being healthy and employing loads of illegals, it is not that bad.

      Well, the same is true of javascript. Stanford can use it to teach coding fundementals and still allow the kiddies a much easier transfer to say java, C++, and C.

      Javascript employs loads of illegals?

    47. Re:Ideal IDE by Anonymous Coward · · Score: 0

      So did UC Berkeley. The intro to CS class I took in '95 was all scheme and the instructor led us to believe that it had been that way for quite some time.

    48. Re:Ideal IDE by axlrosen · · Score: 1

      Every language has warts. If that's your definitely of "bad language" you can find such problems in any popular language.

    49. Re:Ideal IDE by HeckRuler · · Score: 1

      Yeah, didn't you know that most javascript is handled by cheap Chinese processors? It's a rampant problem in the industry, it's not exclusive to Javascript, but nobody is really willing to address the elephant in the room.

    50. Re:Ideal IDE by dzfoo · · Score: 1

      Actually, that's ECMAScript. JavaScript is specifically the sub-set implemented for browsers and the DOM and all that stuff.

      --
      Carol vs. Ghost
      ...Can you save Christmas?
    51. Re:Ideal IDE by Anonymous Coward · · Score: 0

      I think w_dragon's point is you're showing "OO chauvinism". You're assuming that JS failing at OO is a problem, in a way that "real OO languages" failing at functional programming is not.

    52. Re:Ideal IDE by Lennie · · Score: 1

      I think that was Macromedia at the time that gave it the name, but I could be wrong.

      --
      New things are always on the horizon
    53. Re:Ideal IDE by DragonWriter · · Score: 1

      Teaching kids JS first then real OO languages later will confuse the crap out of them.

      Not really. Unless, by "real OO" languages you mean languages that feature class-based OO where classes aren't, themselves, first class objects rather than class-based lanugages with first-class classes (e.g., Ruby).

      The class-based languages without first-class classes might be confusingly crippled to someone who learned either a prototype-based language like JavaScript or a class-based language with first-class classes first, but I wouldn't call those problematic language "real OO" as compared to either class-based languages with first-class classes or prototype-based languages.

    54. Re:Ideal IDE by Anonymous Coward · · Score: 0

      This is such nonsense. It has first class functions, that doesn't mean it's a "functional language." Are Python and Ruby also "functional languages?" Furthermore, practically all Javascript libraries are written in an imperative style and depend heavily on mutable state.

    55. Re:Ideal IDE by xaxa · · Score: 1

      Seriously though, I think this has to be a very introductory course for CS students with zero programming experience or a light course for non CS students.

      I would have thought the latter. It has some very basic stuff.

      My university started with Haskell (course page inc. lecture notes). I think part of the intention was to trip up all the know-it-alls, who (of course) didn't know as much as they thought. The notes dive straight in to dealing with basic types, functions, etc.

      Javascript is a functional language, but that's not how most people use it, and I don't think you could teach a course using it this way. When I was in third (fourth?) year I was an assistant for the first-year Haskell lab work, and for the first few hours some of the students who'd done a little programming would try and write something imperative-ish in Haskell; before they realised they needed to think in a different way.

      I remember my first job interview. "Give me a book and a couple weeks" was the answer to "We think you'll be a good fit, but what other languages can you program in."

      My first interview went like that all the way through. I hadn't heard of any of the stuff they used (except Java), but assumed it wouldn't be a problem. Although instead of the book I was given a small, real project to "learn" on... which got deployed, but has no reported bugs. (It was pretty simple, although it looked shiny and new compared to everything else, so I got way too much credit. Or else I'm too modest, who knows.)

    56. Re:Ideal IDE by xaxa · · Score: 1

      I think you should read this page: http://en.wikipedia.org/wiki/Programming_paradigm

      The languages you describe are imperative (briefly: you provide instructions on how to manipulate the computer's memory to solve your problem).
      Factorial function:
      input n
      r = 1
      while (n > 1) {
          r = r * n;
          n = n - 1
      }
      output r

      The other reply mentions Haskell, a functional language. You provide a mathematical function, which the computer executes to solve the problem.
      factorial 1 = 1
      factorial n = n * factorial (n-1)

      Another example is something like Prolog, a logic-based language. You provide a set of true statements, and the computer 'reasons' (solves) them to find a solution.
      [Yeah... I don't remember much Prolog... copied from the web: ]
      factorial(0,1).

      factorial(N,F) :-
            N>0,
            N1 is N-1,
            factorial(N1,F1),
            F is N * F1.

      Javascript can be used the imperative or the functional way. I'll leave that to you to figure out :-)

    57. Re:Ideal IDE by icebraining · · Score: 1

      Unless you think they should be using Haskell or similar, types do nothing to prove it works. Doubly so in a language like Java or C# with nulls, you just get NPEs everywhere.

    58. Re:Ideal IDE by icebraining · · Score: 1

      "Endured"? I wish my college would use Scheme instead of Java for algorithms and such; I've been learning it myself and it's awesome.

    59. Re:Ideal IDE by RyuuzakiTetsuya · · Score: 1

      ECMA != JS.

      In reality, JavaScript is rarely ever parsed through anything that's a pure ECMAScript engine. A vast majority of all Javascript is rendered by browsers and that's where JS gets messy.

      --
      Non impediti ratione cogitationus.
    60. Re:Ideal IDE by icebraining · · Score: 1

      Javascript is "properly OO". Prototyped based languages like JS and Self are no less OO than class based languages, just because the latter happen to be more common.

    61. Re:Ideal IDE by shutdown+-p+now · · Score: 2

      JavaScript is not any more functional than C#.

      I mean, sure, technically it is - if you use the pedantic definition of "functional" which is "has functions as first-class values". A more pragmatic definition revolves around things like immutability, rich type systems (ADTs etc) and related features (like pattern matching) and various other bits. By that criteria, no, JS is not a Functional language.

    62. Re:Ideal IDE by shutdown+-p+now · · Score: 1

      No, JavaScript is specifically the superset of ECMAScript implemented by Mozilla browsers.

      Of course, in real world, this kind of pedantry is as relevant as fuss about GNU/Linux. Everyone just calls the language "JavaScirpt" regardless of the context.

    63. Re:Ideal IDE by shutdown+-p+now · · Score: 1

      Pure javascript aka ECMAScript is a nice little language with first class functions and closures. You can write in very elegant functional style that is immediately comfortable to Common Lisp hackers.

      There are many languages where you can write in "elegant functional style" - by which I assume you mean having anonymous functions as first-class values in the language (aka lambdas). If you want to see a truly elegant functional language, look at SML or Haskell, or even Scheme. But just taking a C-style imperative language and slapping functions of top does not make it truly functional, and it sure as heck doesn't make it elegant.

      As a matter of fact, if you look at all languages in this "imperative with lambdas" category - which would include e.g. C# and Ruby - then JavaScript is by far the worst of the bunch. For the most distinctive feature - lambdas - its syntax is extremely verbose. Something as terse as x => x + 1 in C# or { |x| x + 1 } in Ruby becomes the unwieldy monstrosity like function(x) { return x; } in JavaScript. Heck, it doesn't even have expression lambdas - so much for "functional"!

      But even aside from that, looking at the language itself, both syntax and semantics are a mess. Explicit statement terminator that also happens to be magically inferred (sometimes with really interesting results). Insane variable scoping rules, which have the dubious honor of being identical to precisely one other language - classic (pre-.NET) VB. Convoluted rules for lookup of "this", which are also insane, but in a way different from how other variables are scoped. And so on, and so forth.

    64. Re:Ideal IDE by shutdown+-p+now · · Score: 1

      Sure you can, but the amount of such warts is a mark of design quality of a given PL. When a good half of the language consists of such warts - as is the case for classic VB, PHP or JS - then it's a bad language.

      If you don't like absolute value judgments, let's just say that JS is a worse language than e.g. Ruby or Lua, and leave it at that.

    65. Re:Ideal IDE by BatsShadow · · Score: 1

      If you think JavaScript is a hack, I suspect you know nothing about it. It really is a fantastic language - very very powerful. FYI - the DOM sucks, but that isn't the language's fault.

    66. Re:Ideal IDE by Thing+1 · · Score: 1

      Should they go on to graduate school, they'll be writing in languages their advisor has developed that many 3 other people on the planet have any familiarity with.

      LOL I wonder how many schools have professors who profess to have invented Scheme; I went to one such.

      --
      I feel fantastic, and I'm still alive.
    67. Re:Ideal IDE by smellotron · · Score: 1

      Every language has warts.

      C++ has no warts.
      <ducks>

    68. Re:Ideal IDE by on+the+8ball · · Score: 1

      My CS101 class used MIX (Knuth's artificial assembly language), SNOBOL and LISP.
      Warped me forever!
      This was far ago in the way-back machine (1968).
      All programs were written on punch cards.
      You submitted a program and got the results back the next day.
      One mistake and you waited another 24 hours for the next test results.
      But, it did make me VERY good at reviewing my code before testing it.

      --
      Do not dwell in the past, do not dream of the future, concentrate the mind on the present moment â" Buddha
    69. Re:Ideal IDE by omfgnosis · · Score: 1

      Honest question: in your preferred language(s), what does '5' + 3 do, and is it an operation you would do knowingly?

    70. Re:Ideal IDE by drolli · · Score: 1

      Getting an exception upon a failed cast is ok for me.

    71. Re:Ideal IDE by Anonymous Coward · · Score: 0

      Read this. Then read the rest of it. Then stop talking utter, utter shite.

      http://www.crockford.com/javascript/inheritance.html

    72. Re:Ideal IDE by prionic6 · · Score: 1

      var illegal = new XMLHttpRequest().open("GET", "http://thepiratebay.org");

    73. Re:Ideal IDE by icebraining · · Score: 1

      What cast?

      /* Someone's code */
      String getUsername() { return null; }
       
      /* your code */
      String username = getUsername();
      int length = username.length(); //NPE

      Does this 'work'? No. Sure, you can check to see if it's a null, but now you're doing the compiler's job, just like people who use schemaless data types. With the exception that they using such types actually has advantages.

    74. Re:Ideal IDE by Bill_the_Engineer · · Score: 1

      I'm jealous. In the 80's, I had to use IBM's MUSIC System and I want to say that the default language of that time was PL/I. I still don't remember what language was introduced in CS101. I do remember using 'ed' on a DECwriter terminal (*shudder*).

      I was lucky. The punch card machine was barely retired by the time I walked into the door. However CRTs were few and far between.

      --
      These comments are my own and do not necessarily reflect the views or opinions of my employer or colleagues...
    75. Re:Ideal IDE by j-pimp · · Score: 1

      How exactly do you code in ECMA with .net? What compiler? Is it built into Visual Studio or SharpDevelop?

      --
      --- Justin Dearing http://www.justaprogrammer.net/ We're just programmers.
    76. Re:Ideal IDE by Anonymous Coward · · Score: 0

      Thanks for that link. I was looking for a Haskell course for beginners.

    77. Re:Ideal IDE by Anonymous Coward · · Score: 0

      In JavaScript:
          '5' + 3 gives '53'

      Whereas
          '5' - 3 gives 2

      Yes... those are the correct answers. If you want strong typing, then do the type checking yourself. Javascript has a typeof operator, and you can throw an error if the type is incorrect or explicitly cast it into the appropriate type. Pray, tell, what does the following give?

      function stronglytypedsum(a, b) {
          if (typeof a != "number" || typeof b != "number") throw "Type error";
          return a + b;
      }
      stronglytypedsum('5', 3);

      (My only complaint at that point is that you can't override operators in Javascript.)

      WRT your other complaint - people who put opening braces on newlines should be shot. That would solve that problem.

    78. Re:Ideal IDE by luis_a_espinal · · Score: 1

      But no more so than other mainstream languages like Python or Ruby, and they aren't "functional languages" either.

      Why not? A language with complete and transparent support for functions as first-class types is a functional language. It might not be a pure functional one, but that's still irrelevant since pure FPLs are a subset of FPLs.

    79. Re:Ideal IDE by luis_a_espinal · · Score: 1

      JavaScript is not any more functional than C#.

      I mean, sure, technically it is - if you use the pedantic definition of "functional" which is "has functions as first-class values". A more pragmatic definition revolves around things like immutability, rich type systems (ADTs etc) and related features (like pattern matching) and various other bits. By that criteria, no, JS is not a Functional language.

      If by pragmatic you mean pedantic (or yours) and by pedantic you mean liberal/open, then maybe you have a point. Either that or you have a pretty funny dictionary.

    80. Re:Ideal IDE by shutdown+-p+now · · Score: 1

      By "pragmatic" I mean definition that lets you make some useful distinction. Under your "liberal" definition, both Haskell and C# are functional languages, but Java is not - but in practice, C# is much, much closer to Java than Haskell. So that "liberal" definition does not lead to any useful distinction, and then why bother making it at all?

    81. Re:Ideal IDE by Jane+Q.+Public · · Score: 1

      "Why not? A language with complete and transparent support for functions as first-class types is a functional language. It might not be a pure functional one, but that's still irrelevant since pure FPLs are a subset of FPLs."

      Repeat: "But no more so than other mainstream languages..."

    82. Re:Ideal IDE by robsku · · Score: 1

      I have to wonder why on earth so few old basic (pre-qbasic, that was the first I personally know to have functions) books teach you to use GOSUB/RETURN, after all, those gave basic programmers at least very primitive way for limited functional programming - without parameters (in most versions) and local variables) and eliminated the need for using GOTO... Seems the "basic causes brain damage" is more a fault of books and teachers teaching to use GOTO and not GOSUB/RETURN than the languages fault.
      I don't know if all pre-SUB/FUNCTION basic versions had this but many (I believe most, if not all) did. Yet when I was learning basic most books just described GOSUB/RETURN but I don't remember if any actually instructed to use them - and I'm talking about programming tutorials, not just language documentations.

      --
      In capitalist USA corporations control the government.
    83. Re:Ideal IDE by luis_a_espinal · · Score: 1

      By "pragmatic" I mean definition that lets you make some useful distinction. Under your "liberal" definition, both Haskell and C# are functional languages, but Java is not - but in practice, C# is much, much closer to Java than Haskell.

      It does not matter if C# is much closer to Java than Haskell, for a language is not measured as functional as a function of its closeness to Haskell, or Lisp or whatever.

      You measure a language as being functional by its transparent and convenient support (from the syntactic point of view) of functions as first-order entities.

      Syntactically, C# support functions, including closures and lambdas as first-order entities. Java does not (at least Java pre 7). Both are close to each other in evolution, but they have this fundamental distinction when it comes to functional programming.

      Case in point. C++ is not functional, but C++0x is, and the later is immediately derived from the former. Closeness is not what you use to measure if a language aligns or supports a particular programming paradigmn (.ie. C vs C++ or Ada 83 vs Ada 2005 with respect to Object Orientation support.)

      So that "liberal" definition does not lead to any useful distinction, and then why bother making it at all?

      So, you don't think that making a distinction between languages, however close they are, in terms of support of functions as first-class types (or lack thereof) is not useful?

      That's an interesting rethorical world you live in buddy.

    84. Re:Ideal IDE by shutdown+-p+now · · Score: 1

      So, you don't think that making a distinction between languages, however close they are, in terms of support of functions as first-class types (or lack thereof) is not useful?

      Not all that much, no. For example, as you rightly note, Java is not currently functional under your definition, whereas e.g. C# 2.0 was functional (it already had anonymous delegates). In practice, however, Java anonymous inner classes can be used in largely the same way as C# anonymous delegates - they're only slightly more verbose, and the only other practical difference is that they close over values of variables, not locations - which doesn't matter for a lot of scenarios.

      And even in Java 8 (there's no lambdas in Java 7), there are no function types. Interface types with a single member method are used instead, and lambdas are desugared to anonymous inner class instances implementing them.

    85. Re:Ideal IDE by luis_a_espinal · · Score: 1
      Oh yes, you are right, lambdas got dropped and pushed to version 8. I would have much preferred that now than strings in switch statements (a stupid idea IMO).

      In practice, however, Java anonymous inner classes can be used in largely the same way as C# anonymous delegates - they're only slightly more verbose, and the only other practical difference is that they close over values of variables, not locations - which doesn't matter for a lot of scenarios.

      Hmmm, no. I've had to deal with anonymous classes in the distant and no-so distant past. And affter working with lambdas in Lisp, JavaScript and Groovy, they simply do not compare from the point of view (and inherent cost) of day to day coding.

      I'm going to have to disagree with you on this (see the areas in bold). Not to tooth my own horn, but I've done almost nothing but Java development since 99, including web application and systems/network protocol development, library development, and (most relevant to this topic) Swing development. I can tell you with 100% experience-backed, with severe from-the-trenches bruises that they are *not* slightly more verbose.

      Non-trivial anonymous classes in lieu of lambdas and closures are horrendously verbose. Horrendous, abominable. No way around these monstrosities when creating action listeners and thread workers in Swing. Outside of Swing, in the realm of server side development, sometimes you can see opportunities to factor out exception and transcation handlers as lambdas to reduce boilerplate, but the verbosity of anonymous classes makes it horrendously hard. Only one time I've been able to pull that off cleanly despite the verbosity. For all other cases, we might as well deal with the typical Java boilerplate or use AOP under the hoods, or deal with them with a mix of Java and Groovy.

      And even in Java 8 (there's no lambdas in Java 7), there are no function types.

      True that - at least under the hood. And that is because the JVM does not have a notion of function handlers. Any lambda, whether in Java 8, Scala or Clojure, must under the hood resolve to a functor object (most likely an instance of an anonymous class) implementing a SAM (single abstract method.)

      Unless the JVM is revamped with some type of bytecode op that represents a function reference type, no language on top of the JVM, be it Scala, Java 8, Groovy, Jython, JRuby, Clojure, Jaskell, JScheme, will ever be able to avoid implement a lambda as something other than an instance of a SAM. Ever.

      But just because a lambda in the JVM will most likely never be a true function type (but a functor object), that doesn't stop Clojure, Jaskell or JScheme from being functional languages, does it?

      Likewise, a lambda in Java 8 will be, under the hoods, a functor. But that, to me, it is irrelevant, based on the analogies drawn in the previous paragraph.

      In everyday-coding practice (which is all that matters ultimately), it is the syntactic support that helps a programmer treat a piece of computation as a type, without having to deal with the plumbing and book keeping that comes with its true functor nature, that's what matters.

      Interface types with a single member method are used instead, and lambdas are desugared to anonymous inner class instances implementing them.

      Exactly, just like with Closure or JScheme. And that doesn't affect their nature as functional programming languages.

      And if that doesn't affect that, then obviously it is not a relevant factor in the "functionness" of a programming language in general. It would be illogical, if we use that factor alone, to say that such a factor puts Java 8's "functionness" into question, but that it has no such effect on Clojure and JScheme's nature.

      Logically, then other - possibly context-specific - factors must come into play.

      Ergo, it is both reasonable and useful to argue for the classification

    86. Re:Ideal IDE by shutdown+-p+now · · Score: 1

      Hmmm, no. I've had to deal with anonymous classes in the distant and no-so distant past. And affter working with lambdas in Lisp, JavaScript and Groovy, they simply do not compare from the point of view (and inherent cost) of day to day coding.

      I was not comparing Java anonymous classes to lambdas in general - I was very specifically comparing them to C# 2.0 anonymous delegates. Unlike C# 3.0 lambda expressions, anonymous delegates only had statement form, and did not have type inference for parameters (but did have it for return values). Like so:

      List<int> xs = { 1, 2, 3 };
      xs.ForEach(delegate(int x) {
      Console.WriteLine(x);
      });

      In Java, the same thing (provided forEach on List, and a generic Action<T> SAM interface) would be:

      xs.ForEach(new Action<Integer>() {
      public void apply(Integer x) {
      System.out.println(x);
      }
      });

      The overhead here is typing out the name of the interface (C# infers delegate type from signature of the called method), "public", "apply", and a pair of curly braces. For a bigger lambda, that's hardly significant. I would certainly claim that the above two snippets are close enough for any practical purpose - and yet C# one is "functional", but Java one is not?

      Yes, in C# 3.0+ you write:

      xs.ForEach(x => Console.WriteLine(x));

      But this is really just a shorter form of writing the above. The difference in all three cases is purely verbosity, semantics are the same.

      But just because a lambda in the JVM will most likely never be a true function type (but a functor object), that doesn't stop Clojure, Jaskell or JScheme from being functional languages, does it?

      Likewise, a lambda in Java 8 will be, under the hoods, a functor.

      I'm not talking about "under the hood" (JVM level). I'm talking about language spec. The current spec for lambdas in Java 8 has no function types. What it has is lambdas themselves, which are typeless (they have a set of possible signatures they can map to, which is either inferred or explicitly defined by type annotations), and they implicitly convert to a "single abstract method" type. But you still have to define the latter as explicit interfaces. This, by the way, also means that raw lambdas cannot be used in places where the target type is not known (e.g. as an argument to a generic method, where the type of method parameter is inferred from the argument).

      In contrast, C# explicitly has function types (delegate types), even though they're nominal and not structural. Under the hood (on CLR level) it is actually also a class with a single virtual method and a bunch of helpers, and that is even partly exposed to the language (you can call Invoke() on a delegate value, for example, rather than applying () directly to the value), but it's still a distinct type family - e.g. C# won't let you inherit from a delegate type and implement Invoke yourself; the only values of that type are functions, either named or lambdas.

      Similarly with Scala, which not only has function types on language level, but they're structural, and the corresponding JVM types matter not at all to the Scala programmer.

      In everyday-coding practice (which is all that matters ultimately), it is the syntactic support that helps a programmer treat a piece of computation as a type

      This should probably read "treat ... as a value".

      Ergo, it is both reasonable and useful to argue for the classification I'm proposing (and for which I'm not alone), in particular from the point of view of programming pragmatism and practical software engineering, from a factor different from the actual implementation of lambdas in the JVM. Syntactic support that is transparent to the programmer is one factor I

    87. Re:Ideal IDE by Anonymous Coward · · Score: 0

      Control blocks is not the entirety of "the principles it is made from". The syntax is similar, but it is a vastly different language than Java/C++/C#. The whole reason people think Javascript is a bad language is they fail to understand exactly that, and they try to use it as though it was Java.

  5. First programming course? At Stanford?? by sunderland56 · · Score: 2

    Does anyone really get admitted into Stanford without being able to program already??

    1. Re:First programming course? At Stanford?? by Anonymous Coward · · Score: 1

      My cousin went to Stanford on a football scholarship as a business major, MBA in five. He had no programming. Heck of a kicking leg, but no programming.

    2. Re:First programming course? At Stanford?? by Kamiza+Ikioi · · Score: 1

      George Bush got into Yale. Anything is possible.

      --
      I8-D
    3. Re:First programming course? At Stanford?? by ccguy · · Score: 1

      I'm sure lots of people gets admitted thinking they are able to program.

    4. Re:First programming course? At Stanford?? by Dahamma · · Score: 4, Informative

      The summary is awful.

      First, this isn't even recent news, it was added *last* year.

      Second, this isn't an intro course for CS majors (or even any engineering major, or hell, even a non-engineering major interested in programming). It's basically a really high level intro to computers and "programming principles" for "fuzzies" with an irrational fear of computers (which as you say, is definitely a small group at Stanford).

      Though the lecturer (Nick Parlante) is awesome, so it's probably a fun class, and might even get some people interested in taking the real intro to programming class (CS106A).

    5. Re:First programming course? At Stanford?? by RockoTDF · · Score: 1

      Yeah, like non-CS majors.

      --
      There is more to science than physics!

      www.iomalfunction.blogspot.com
    6. Re:First programming course? At Stanford?? by Betelgeuse · · Score: 2

      As someone who has taught classes at top universities (although not Stanford), I just have to say that the answer to this question is a resounding *yes*! In the time since computers because a thing that "everyone can do" (and not just geeks), users have become significantly less geeky. I'm a scientists and I was shocked at the number of incoming *PhD* students who have close to zero programming experience. I'm a crap programmer, but have the basic skills to hack together what I need. A lot of the students I've taught (as well as grad students who were slightly-younger contemporaries of me) had shockingly little (sometimes no) programming experience.

      --
      I couldn't tell if you were experimenting with poor-man's cryogenics or looking for the orange sherbet.
    7. Re:First programming course? At Stanford?? by idontgno · · Score: 1

      I'm a scientists and I was shocked at the number of incoming *PhD* students who have close to zero programming experience.

      PhD students in what fields? Most of the PhD types I've worked with were environmental/meteorological types, and that scientific endeavor has a long-standing and time-honored tradition of writing your own code, or maintaining your PhD advisor's. Badly. In undocumented FORTRAN. But it's programming. Even patching circa-1969 FORTRAN IV only recently transcribed from punched cards counts as experience.

      (Actually, I think it's the meteorology fraternity's equivalent of Pledge Rush.)

      --
      Welcome to the Panopticon. Used to be a prison, now it's your home.
    8. Re:First programming course? At Stanford?? by dweinst · · Score: 2

      Javascript coding was a key part of Stanford's CS105 (Intro to CS for non-majors) 10 years ago when I TAd it... same reason - the goal was to show fuzzies as much as possible and hopefuly spark an interest or at least rudimentary appreciation of the topic. Parlante is indeed a fantastic lecturer, but I'll never forgive him for pre-Java BunnyWorld. ;)

    9. Re:First programming course? At Stanford?? by Meddel · · Score: 1

      I did, as did many of my classmates in the CS department. The important bit is that Stanford does their admissions for the school as a whole. Not the School of Engineering, and certainly not individual departments. Everyone shows up undeclared and has to figure out where they want to be.

      Predictably, many people know right away or after freshman year. But there isn't actually a requirement to declare a major until it's time to get a degree. Personally, I was taking classes like an Econ major for two years, and then switched to Computer Science. It took me another year to declare CS as my major, and even then only did so because I was applying to the Masters program (which I never finished).

      It's not strictly relevant given that this isn't a class for CS majors, but the answer to your question is that there are many, many CS majors who go on to careers in software who write their first code in their second or third year.

      --
      You just come along with me and have a good time. The Galaxy's a fun place. You'll need to have this fish in your ear.
    10. Re:First programming course? At Stanford?? by ironjaw33 · · Score: 1

      >PhD students in what fields?

      As a CS PhD student, I can say from experience there are quite a few of my peers that _really_ dislike programming, surprisingly more than I would have expected. Most of these students are heavily invested in theory rather than any practical work, sticking to MATLAB for any kind of implementation and kludging together a bunch of existing libraries.

      While I was an undergrad, I found that as a percentage, more of my peers were enthusiastic about programming and were also quite good at it. I suppose most of them saw no reason to stay in school given that they could do quite well with a B.S., given their skillsets.

    11. Re:First programming course? At Stanford?? by Anonymous Coward · · Score: 0

      +1 to this. As a current CS major at Stanford, I see that this story is misinterpreted - the introductory CS sequence for majors (and even interested non-majors) is the CS106 series, starting with Java and C++ in 106A and exploring deeper concepts in C++ in 106B, or doing all of that in one quarter in CS106X if you are already pretty skilled at programming. CS107 is the weeder course, diving headfirst into C, assembly, and system design in 10 weeks. Imagine my surprise when I learned about curriculum changes to my major on Slashdot!

      On another note, Stanford's president, a former CS professor, is actually very proud because 75% of Stanford undergraduates take CS106A or X, our real intro classes, before they graduate.

      This begs the question, then, why did they call it CS101? The answer is probably that we ran out of low numbers, since CS103-143 are almost all taken.

    12. Re:First programming course? At Stanford?? by Dahamma · · Score: 1

      Wow, sounds like CS107 has changed a lot. I think it used to be called something like "Programming Paradigms" - it was basically "a language a week", going through C, C++, FORTRAN, LISP, Prolog, etc (and taught by Parlante at the time, actually). Then again, that was a while ago - CS106 was still taught in Pascal ;)

    13. Re:First programming course? At Stanford?? by jmorris42 · · Score: 1

      > George Bush got into Yale. Anything is possible.

      One can argue he got into Yale as a legacy because of Bush Sr., however that doesn't explain also getting a degree from Harvard and having grades on par with "super smart" Al Gore or Kerry. Btw, when are we going to actually see the grades of the 'smartest man to ever sit in the Oval Office?' Time to face up to reality, W isn't stupid and making fun of a minor speech impediment on anyone else would get you sent to the reeducation camp because making jokes about the disabled is a major no-no these days. Disagree with his policies all you want (I certainly do.... although probably different ones than you do) but the joke is old.

      --
      Democrat delenda est
    14. Re:First programming course? At Stanford?? by jpapon · · Score: 1

      Right. I'm pretty sure this course is for non-cs majors. I went to Stanford, and I promise that no serious CS major is taking this course anyways. They will already have had 2-3 years of programming in HS.

      --
      -- Let us endeavor so to live that when we pass even the undertaker shall be sorry. -- M. Twain
    15. Re:First programming course? At Stanford?? by jpapon · · Score: 1

      I've had a similar experience, at Stanford (and in Germany) in Elegtromagnetics, Computational Neuroscience & Computer vision departments (Heh I guess I get around). Avid programmers are rarer, mostly only people interested in theory are left. This depends in large part on the interests of the head Prof. in the group of course.

      --
      -- Let us endeavor so to live that when we pass even the undertaker shall be sorry. -- M. Twain
    16. Re:First programming course? At Stanford?? by gewalker · · Score: 1

      I agree, Bush did not start out stupid. I wonder how many brain cells he cooked along life's path though?

    17. Re:First programming course? At Stanford?? by sakonofie · · Score: 1

      The parent hit it right on the head. Stanford CS still believes in teaching the people -- who are likely to professionally program -- using Java and C++. Seriously, the only reason this is being discussed like this is because of Stanford's unusual course numbering system. This is not the usual meaning of a "101" course. This is not a required intro course and most technical people will not bother taking it. (Knowing Stanford students, "techies" would probably consider it beneath them.)
      The first programming class most people [who can hack it] take is the 106 series. The 106 series are the classes you expect all of the engineers, and most of the hard scientists (bio, chem, etc.), some of the economics majors, etc. This also includes the CS majors that don't skip to 107. Stanford has had an introductory non-majors class in Javascript for a while, CS 105. I only knew a couple of people who took 105 (both econ majors), and more than I am going to bother to count who took 106. (I hung out with techies.)
      Just to give some perspective, lets check the numbers. Enrollment for 106A in 2009-2010 was 1087 over the year . The number I am pulling up for CS105 was approximately 300 a year in 2007. Final FYI, next year CS101 is only offered 1 quarter and CS105 is offered for all 3.
      tl;dr non-event becomes headline due to misleading name

    18. Re:First programming course? At Stanford?? by An+Onerous+Coward · · Score: 1

      >> One can argue he got into Yale as a legacy because of Bush Sr., however that doesn't explain also getting a degree from Harvard and having grades on par with "super smart" Al Gore or Kerry.

      Harvard is kinda tough to get into, really difficult to pay for, but otherwise not that difficult to graduate from. Especially if you're getting an MBA rather than a real degree.

      Constitutional Law without the backing of Daddy's political connections is a higher bar to clear.

      >> Btw, when are we going to actually see the grades of the 'smartest man to ever sit in the Oval Office?'

      Write to the College of William and Mary. I'm sure they'll send you Thomas Jefferson's transcripts for the price of postage.

      Oh, wait. You were referring to Obama, as if the claim of :::googles a bit::: some random history professor on the Don Imus Show has to be defended by everyone left of Joe Lieberman.

      >> Time to face up to reality, W isn't stupid and making fun of a minor speech impediment on anyone else would get you sent to the reeducation camp because making jokes about the disabled is a major no-no these days.

      W wasn't just a brilliant mind hamstrung by a speech impediment. He was narrow, dogmatic, intellectually disengaged, and had absolutely no interest in ideas that were not already his own. Worse, he surrounded himself with people who were incompetent and vicious, but loyal to him. It doesn't matter how smart you are if you're too busy clearing brush to read memos entitled "Bin Laden Determined to Attack Inside U.S."

      Whatever intellectual firepower Bush had was expended in the pursuit of passing tax cuts that we couldn't afford and selling a war we never should have entered into. He clearly didn't give much thought to whether they were good ideas.

      --

      You want the truthiness? You can't handle the truthiness!

  6. From C++ to Java to Javascript by Anonymous Coward · · Score: 0

    And I was angry when schools switched from C++ to Java..

    1. Re:From C++ to Java to Javascript by Toonol · · Score: 1

      I would rather have them learning in Javascript than Java. Probably better Javascript than C++, too, but that could go either way.

      Straight C would be best, imo. Less noise and clutter getting in the way. I think getting people writing simple programs as fast as possible is important, so that they can keep their interest, so that they can play. If you start trying to teach programming by first trying to force people to use more abstract concepts, such as OO, many of them will just hit a brick wall.

      If you want your kid to learn carpentry, you give them a lot of wood, nails, a hammer, and a saw, and let them spend a year just playing. Learning the most basic concepts. You don't start by discussing building codes.

  7. Good idea... by wsxyz · · Score: 2

    Why wouldn't they use javascript? I think it's a much better learning language than most of the alternatives (java) because not drowning in crufty committee-designed latest-fashion constructs. It's got all of the iterative basics, but it's also got it's lispy functional side. And it's simple.

    1. Re:Good idea... by Anonymous Coward · · Score: 0

      Why wouldn't they use javascript? I think it's a much better learning language than most of the alternatives (java) because not drowning in crufty committee-designed latest-fashion constructs. It's got all of the iterative basics, but it's also got it's lispy functional side. And it's simple.

      Maybe because most web developers are currently trying everything they can to not use javascript? Including but not limited to writing superset languages like Objective J and even making Java to javascript compilers like GWT. Javascript is fine for scripting, but god awful for any complex application development.

    2. Re:Good idea... by DragonWriter · · Score: 1

      Why wouldn't they use javascript? I think it's a much better learning language than most of the alternatives (java)

      Java is not "most of the alternatives" to JavaScript as a learning language.

    3. Re:Good idea... by Anonymous Coward · · Score: 0

      Because its error messages are rarely meaningful in JS and often misleading.

      dom

    4. Re:Good idea... by Anonymous Coward · · Score: 0

      ... if you think Javascript is simple compared to, well, anything else, then you probably don't know Javascript very well. It is a painfully poorly designed language. The original author is on record making public apologies for having ever created the language. Sure, it has plenty of good features, but it has enough very bad ones (see the "with" keyword for an especially bad example) along with overall poor design that make it a language to avoid at all costs. That said, it's something students can use to program web scripting, which may very well be a good enough reason to use it for some students.

    5. Re:Good idea... by Lennie · · Score: 1

      You've been talking to the wrong webdevelopers.

      JavaScript definitely has bad parts, the environment that JavaScript is used in most, the browser isn't much fun either.

      But if you stay away from both of those, it is very lean and expressive.

      That is why there has been a lot of interrest from webdevelopers trying to use JavaScript on the server as well, like with NodeJS ( http://nodejs.org/ ).

      --
      New things are always on the horizon
  8. No compiler? by Mia'cova · · Score: 2

    cs101 without even seeing a compiler? Tragic :)

    1. Re:No compiler? by Fantom42 · · Score: 2

      cs101 without even seeing a compiler? Tragic :)

      MIT's CS 101 course used to use a book called "Structures and Interpretation of Compter Programming" and was based on a LISP-variant called MIT Scheme. No compiler. Now, I think they use Python. Still no compiler.

      Javascript isn't half bad of a language to use for an intro course, although I think it is far from ideal. Javascript as implemented in a browser, with the DOM and all is kind of a mess. Having examples to run in a browser is a nice perk though. You get to mess with a GUI without knowing much more than HTML.

    2. Re:No compiler? by Anonymous Coward · · Score: 0

      Computer Science isn't even about programming, so a programming-specific device shouldn't be required.

    3. Re:No compiler? by Anonymous Coward · · Score: 0

      Like CS students even bother to look at the compiler output anyway..

    4. Re:No compiler? by vlm · · Score: 2

      Having examples to run in a browser is a nice perk though. You get to mess with a GUI without knowing much more than HTML.

      In the 80s there was an absolute fixation on teaching kids control flow etc by making them write little animated graphics on apple2s and C64s using basic. We mostly turned out OK anyway. This is pretty much the 10s version of the same concept, kids like looking at things.

      --
      "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
    5. Re:No compiler? by Z_A_Commando · · Score: 1

      Certain versions of Scheme are compiled. My Intro to CS course was taught in Chez Scheme and it's interpreted variant Petite Chez Scheme by the man who actually wrote the compiler. A compiler does not make a better programming language, it just makes a faster one. It's not like these kids are going to be writing anything that's going to perform that much slower in an interpreted vs. a compiled language.

      However, JavaScript is not a good beginner language because of its inherent workarounds. The biggest issue I can think of are closures, which are handled differently from any other language I've had to deal with on a regular basis (Java, C#, Python, C, PHP, etc.). I think that alone should be reason enough not to each JavaScript to beginners.

    6. Re:No compiler? by MindStalker · · Score: 1

      A little bit of reading shows that CS101 is for people who essentially have no computer experience. I don't think its part of a CS major as much as it is a class other majors can take to meet a computer requirement.

    7. Re:No compiler? by Anonymous Coward · · Score: 0

      This class is mainly an intro class for liberal arts majors and other students not majoring in a science or technology. Stanford requires all students to take 1 computer programming class to graduate (at least they use too).I took a similar class there years ago when they taught it with Visual Pascal. Anyone actually majoring in CS, Symbolic Systems or Engineering or any science or technology field will take many more programming classes beside this one. When I went there, all the freshmen interested in studying CS or Symbolic Systems already had advanced programming skills when they arrived, but there are liberal arts majors that will be challenged by Javascript. I think it makes a lot of sense to teach Javascript as an intro computer language. For one thing it is a language someone in business or the liberal arts might use while compiled languages are mainly appropriate for full developers. Actually, this class when I took it was a great foundation, so much so that after 3 years of struggling to make money with my liberal arts degree, I was able to pick up some programming books and build on what I had already learned to jump start a career in IT that has now lasted well over 15 years.

    8. Re:No compiler? by Mia'cova · · Score: 1

      Let me be more specific. A c-style language that isn't type-safe can be a royal pain in the ass to debug if you don't know what to look for. While compilers can often give "cryptic error messages," students aren't going to have too much more fun when their scripts aren't working. Maybe the fun/power of the browser will make up for some of it and keep people interested. And these days, learning the structure of the web is fairly important and fundamental. Still, it sounds more like an "introduction to web programming" than cs 101.

    9. Re:No compiler? by Trepidity · · Score: 1

      I think it highlights some of the angles of CS that are actually important as well. It's not just about learning a set of tools, but about a sort of meta-skill of computational thinking: conceiving of ways that you can code procedures to do things, and understanding how changing code will result in changed doing-of-things. For an intro class, quick visual feedback so you can see that changing your code made different stuff happen on screen is a nice way of highlighting that, as well as hopefully building students' interest in "hmm, I wonder if I can make it do [x]?" type questions.

    10. Re:No compiler? by TangoMargarine · · Score: 1

      We had a program that basically interpreted a subset of C++ for our "intro" CS course.

      --
      Unity? Screw that: XFCE. Slashdot Beta? Screw that: SoylentNews. Australis? Screw that: Pale Moon. UX developers DIAF
    11. Re:No compiler? by StripedCow · · Score: 1

      I thought most popular javascript implementations do have a JIT compiler inside.

      --
      If Pandora's box is destined to be opened, *I* want to be the one to open it.
    12. Re:No compiler? by Anonymous Coward · · Score: 0

      CS106 is intro to programming at stanford

    13. Re:No compiler? by nschubach · · Score: 1

      I'm sorry, how is a closure handled differently than those languages?

      Sure, there's some shorthand involved in certain languages and closures ( {x, y => x + y} ) but Python closures and JavaScript closures are almost identical in shape/form/function:

      Python:

      def makeInc(x):
          def inc(y):
                return y + x
        return inc
      inc5 = makeInc(5)
      inc10 = makeInc(10)

      JavaScript:

      function makeInc(x) {
          return function(y) {
                return y + x;
          }
      }
      inc5 = makeInc(5);
      inc10 = makeInc(10);

      --
      Every time I start to have faith in humanity, I ruin it by driving to work between 7 and 8 am.
    14. Re:No compiler? by Anonymous Coward · · Score: 0

      Scheme can bite it. (Awful (syntax (that (everyone (hates))))

    15. Re:No compiler? by fatphil · · Score: 1

      Weird. The T (a dialect of Scheme) we used as we worked our way through Abelson & Sussman had a compiler. However, learning to use the compiler was nothing more than learning what it's name was - there's really nothing else to learn. (This was in the UK, not MIT).

      --
      Also FatPhil on SoylentNews, id 863
  9. Might be a good thing by Bob+the+Super+Hamste · · Score: 1

    This might be a good thing. We might actually have some people learn how to develop proper java script instead of most of the junk that is churned out now. My first real language was pascal (I knew the old apple soft basic but that was a kludge at best), granted it wasn't the easiest to learn but you did get a feel for structure using it.

    --
    Time to offend someone
  10. Douglas Crockford explains... by rock_climbing_guy · · Score: 1

    Douglas Crockford explains why you think JavaScript is a bad programming language: http://www.crockford.com/javascript/javascript.html

    --
    Wh47 d1d j00 541, 31337 15n't t3h r0xor5 ne m0r3???
    1. Re:Douglas Crockford explains... by HellYeahAutomaton · · Score: 1

      Your use of Crockford's explanation to explain your position is a bit confounding.
      Crockford is seen as one of the most respected experts on the language and its modern use.

    2. Re:Douglas Crockford explains... by Anonymous Coward · · Score: 0

      I think rock_climbing_guy's phrasing was a bit confusing. Crockford's article explains why some people think of JS as a bad language, which was rock_climbing_guy's intent.

    3. Re:Douglas Crockford explains... by Tablizer · · Score: 1

      Replies by topic:

      The Name - Perhaps confusing, but if you let the OSS community name it, it would be something like "Sniffdrivel" or "Gorf".

      Lisp in C's Clothing - This is not necessarily a bad thing unless you are complaining it's not Lisp itself.

      Typecasting - Everybody has their favorite type management techniques, and nobody will ever agree on which is the best. Some do argue that strong or strict typing is better for making general-purpose software tools, and loose or non-typing is better for custom end-user applications. But it's difficult to be everything to everybody.

      Moving Target - Unless there is a single implementation in C or C++ that every browser uses, this is generally expected. I don't think Microsoft would cooperate on such, and they still control a large browser market share. Any alternative risks similar reaction from Microsoft.

      Design Errors - Every language has warts. Show us a perfect language and we'll give you sainthood and free parking for life.

      Lousy Implementations - See above on "Moving Target".

      Bad Books - That's not a language fault.

      Substandard Standard - This is also common. The only practical way to solve such seems to be with a standard reference implementation (see "Moving Target" above).

      Amateurs - That's not a language fault; it's merely a sign of popularity. Something esoteric like Prolog may scare away casual newbies, but may also dampen acceptance as a de-facto standard. There's probably a general tradeoff here.

      Object-Oriented - I've seen long debates over the definition of "object oriented". Unfortunately, nobody ever reached a consensus. Let's just say JS has a certain "flavor" of OO, which some may like and others not.

    4. Re:Douglas Crockford explains... by Anonymous Coward · · Score: 0

      The sad thing is not about the Quality of JS. It is about why any language should be taught at all instead of principles of CS such as Data Structures, Algorithms, Compilers/Assemblers, O/S, DBMS, Numerical Analysis etc.

      Back in my day (20 years ago), we had assignments and tests contributing to final grades in C/C++, Pascal, COBOL, Fortran, Prolog, and even BASIC but no time was wasted by trying to teach these languages. We were expected to pick up these languages all by ourselves and turn in working code listings for real tough problems on 8" floppies (punch cards if it was FORTRAN), of course.

      University should not waste time teaching any language whatsoever.

  11. whither MIX? by smoothnorman · · Score: 2
    Has Professor Knuth no longer any proper influence over those at Standford? http://en.wikipedia.org/wiki/MIX

    [curvy bend] Task 4.2.31: Write a LALR parser for MIX in Javascript

    1. Re:whither MIX? by Nimey · · Score: 1

      Probably they don't want to scare off the freshmen by diving right into assembly.

      --
      Hail Eris, full of mischief...

      E pluribus sanguinem
    2. Re:whither MIX? by idontgno · · Score: 3, Insightful

      You have to separate the Real Programmers from the whiny trembling wannabees. Assembler is the equivalent of using blanks during "live-fire" training. Any high-order language is like a bunch of guys shouting "POW! POW! BANG! RATATATATAT!" at the trainees while they lackadaisically low-crawl through the not-very-muddy mud.

      If you want programmers that won't flinch when the loading ramp on the assault boat drops, you need to start them on machine code. Maybe a rational and internally-consistent architecture, like VAX; after all, this isn't special forces training. (For that, we should use architectures like Intel 80286.)

      --
      Welcome to the Panopticon. Used to be a prison, now it's your home.
    3. Re:whither MIX? by Anonymous Coward · · Score: 1

      This is a course for non-CS majors. They should not have to learn opcodes.

    4. Re:whither MIX? by Anonymous Coward · · Score: 0

      Why ever not? Every other established discipline begins with a solid grounding in the fundamentals, and then builds upwards from there. Even if you never actually see the fundamentals in your line of work, your mental models are solidly grounded in those fundamentals nonetheless. I suspect most mechanical engineers leave differential equation solving to Autocad or Matlab in their line of work, but they could certainly do it with pencil and paper if pushed. Not in software engineering though, apparently the little darlings have to be given some shiny graphical toys to play with otherwise they might get bored, for Pete's sake. This just breeds a magical view of computing, where programs consist of opaque spells recited verbatim, but devoid of understanding.

      How about the following: Lesson one, introduce memory consisting of bytes, put integers, words, two's complement integers, strings, opcodes into that memory and get it into their heads that everything's just bytes in memory, and their actual semantics are a matter of context and interpretation. Lesson two, introduce a CPU, which has an ALU and a bunch of registers in it. There's nothing complicated about a CPU, it shovels data between registers and memory, performs arithmetic, branches, or halts. Once you've been over procedures and stacks and loops enough times that it gets tedious, then pull them up to the level of C where they don't have to care about registers any more. Hopefully by that point the concept of a pointer won't be quite so slippery in their minds.

    5. Re:whither MIX? by DrFalkyn · · Score: 1

      Has Professor Knuth no longer any proper influence over those at Standford?

      Probably not. He's been Emeritus for a while now.

    6. Re:whither MIX? by Nimey · · Score: 1

      To use a math analogy, going straight to assembly is like doing calculus first, then algebra, at least on a "level of difficulty" scheme.

      Best to start off with an easier language then gradually ramp up the difficulty while on a parallel track make sure they can do math and Boolean algebra, then at some point not too far in the future get into the low-level stuff. Compilers and interpreted languages abstract that stuff away anyhow.

      --
      Hail Eris, full of mischief...

      E pluribus sanguinem
    7. Re:whither MIX? by rrohbeck · · Score: 1

      Exactly. Any Real Programmer used mostly PEEK, POKE, SYS and USR on their C64.
      Plus a book on C64 internals and the MOS 6502 programming manual (although the instruction set is so small that you know it by heart within two weeks.)
      Now try that with the Intel 386 manual (the last one I read) or even more newfangled hardware...

    8. Re:whither MIX? by Anonymous Coward · · Score: 1

      There are plenty of other ways to separate people. I know many programmers who are quite good with assembly language and low-level C but choke on fundamental high-level concepts like recursion, functional programming, information hiding, and threading. Provided the project isn't too large and you can work around the development tool problems, developing low-level code isn't that hard. I have worked on many different types of projects in different industries and fail to see why there is a large group of embedded programmers who think all other types of programming is easy in comparison. The types of problems you solve are different in different fields, but they all have their own difficulties.

    9. Re:whither MIX? by shutdown+-p+now · · Score: 2

      If you want programmers that won't flinch when the loading ramp on the assault boat drops, you need to start them on machine code.

      MOV, MOV, MOV!

    10. Re:whither MIX? by Thing+1 · · Score: 1

      To use a math analogy, going straight to assembly is like doing calculus first, then algebra, at least on a "level of difficulty" scheme.

      Best to start off with an easier language then gradually ramp up the difficulty while on a parallel track make sure they can do math and Boolean algebra, then at some point not too far in the future get into the low-level stuff. Compilers and interpreted languages abstract that stuff away anyhow.

      I like the way you're thinking, and I can't help but wonder if there might be a better path towards understanding. What I mean is, most often it's best to teach someone something new, using a paradigm of something old (i.e., something the listener already knew, so they can fit the new knowledge better into the old knowledge). So for someone who has only ever used a web browser for Facebook and email, perhaps a good start would be to begin taking a look behind the scenes of their email platform, or social media platform. And, for this, one would want to know HTML and JavaScript, so it does seem to make sense that Stanford is moving in this direction.

      --
      I feel fantastic, and I'm still alive.
    11. Re:whither MIX? by Anonymous Coward · · Score: 0

      mod parent up, funny

  12. A long way from SICP by cpghost · · Score: 1

    While MIT used Scheme as an introductory programming language, as seen in the legendary Wizard Book, in 2011 Stanford have dumbed down CS introductory classes to ... what? JavaScript? Sad, just sad.

    --
    cpghost at Cordula's Web.
    1. Re:A long way from SICP by mfwitten · · Score: 1

      Some years ago, MIT threw out Scheme in favor of Python because the latter has more 'vocational' merit...

    2. Re:A long way from SICP by Samantha+Wright · · Score: 2
      --
      Bio questions? Ask me to start a Q&A journal. Computer analogies available for most topics!
    3. Re:A long way from SICP by Anonymous Coward · · Score: 0

      Whereas Stanford's rival, the far superior* Cal Berkeley still uses SICP for its introductory CS courses, even using Scheme in its equivalent course for non-majors, when even MIT no longer does so. Go Bears!

      *Disclosure of bias: None. Honest. ;)

    4. Re:A long way from SICP by rrohbeck · · Score: 1

      ... with lots of warts added.

    5. Re:A long way from SICP by shutdown+-p+now · · Score: 1

      If all you know is Scheme, then I guess any language with first-class functions looks like Scheme. Doesn't make it true, though.

      JS fails to be Scheme on the most basic level: it has separation into statements and expressions. The differences rapidly multiply from there - consider variable scopes, or linked lists as a basic (or at least well-supported) data structure, or call/cc.

    6. Re:A long way from SICP by colinrichardday · · Score: 1

      Perhaps a silly question, but does Cal teach BSD?

  13. The things they will NOT learn are interesting by Opportunist · · Score: 2

    Linked lists. Recursion. Calling by reference. Strong typing. Explicit declaration (or at least the need of it). There are some ways around those, but these hacks are even going to warp their minds worse than not learning those things would.

    Of all the languages out there, why JS? Aside of VB there's no worse choice to learn programming. Sure, it offers quick satisfaction, but when you hit the wall (and you do soon in JS), you hit it hard because what you learned will not translate well into a more powerful and flexible language.

    --
    We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
    1. Re:The things they will NOT learn are interesting by dealmaster00 · · Score: 1

      Linked lists. Recursion. Calling by reference. Strong typing. Explicit declaration (or at least the need of it). There are some ways around those, but these hacks are even going to warp their minds worse than not learning those things would.

      You certainly don't need to learn those things in your first semester of programming.

    2. Re:The things they will NOT learn are interesting by halivar · · Score: 1

      Exactly. At my college, a CS 101 class was for interdisciplinary programs, anyway (and was taught in VB). My CS degree started with 201, where we dove right into C++; classes, pointers and all.

    3. Re:The things they will NOT learn are interesting by wsxyz · · Score: 2

      Hmmm....

      cons = function(a,b) { o=new Object(); o.car = a; o.cdr = b; return o; }
      car = function(o) { return o.car; }
      cdr = function(o) { return o.cdr; }
      find = function(o,t) { if (o == null || car(o) == t) return o; else return find(cdr(o),t); }
      p = cons(1,cons(2,cons(3,cons(4,null))));

      > find(p,2)
      Object
      > find(p,5)
      null

      Ok, you're right. It sucks.

    4. Re:The things they will NOT learn are interesting by Tablizer · · Score: 1

      At the risk of starting a fun and tasty language flamewar, please define "more powerful and flexible language".

    5. Re:The things they will NOT learn are interesting by Needlzor · · Score: 1

      Then when? The sooner you get this stuff carved into the students' minds, the better. Are you going to spend a whole semester on looping and conditional structures ?

    6. Re:The things they will NOT learn are interesting by drinkypoo · · Score: 1

      When I was in jr. high we studied logo. It was useful in that it separated those with interest from those without, and quickly. Same here.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    7. Re:The things they will NOT learn are interesting by Anonymous Coward · · Score: 0

      Linked lists. Recursion. Calling by reference. Strong typing. Explicit declaration (or at least the need of it). There are some ways around those, but these hacks are even going to warp their minds worse than not learning those things would.

      Of all the languages out there, why JS? Aside of VB there's no worse choice to learn programming. Sure, it offers quick satisfaction, but when you hit the wall (and you do soon in JS), you hit it hard because what you learned will not translate well into a more powerful and flexible language.

      While I respect your position and your point of view, I think the issue you're raising is moot. If the class at Stanford is well taught, then these concepts will be singled out with placeholders so that students will know there is a lot of simplification going on in Javascript, and those hungry to know more can take more advanced CS courses to learn it. The moot issue is whether a CS 101 class is intrinsically more valuable with those concepts included, and it seems pretty clear that it depends entirely on the quality of instruction, as I could provide an example of a poorly taught CS 101 class with those concepts that would still leave students befuddled.

      CS 101 is not only to indoctrinate potential CS majors to the hierarchy of computer programming languages, it's also to provide greater computer literacy to the Stanford undergraduate body and attempt to instill some interest in the subject for people who might be on the fence. The best way to do this is to demonstrate the power of what can be accomplished at a high level, not bore those fence-riding students with essential but incredibly technical and unsexy topics.

      I say this as an ivy-leage cs grad who thinks that programming has much to offer the average student who never intends to spend his/her life as a programmer or an academic. To this end, an introductory course should be as palatable as possible (do not confuse this with easiness; academic rigor can be established in many other ways in such a course), and I think JavaScript is a strong move towards making this possible.

    8. Re:The things they will NOT learn are interesting by Anonymous Coward · · Score: 0

      keep your scheme out of JS for the sanity of the universe.

    9. Re:The things they will NOT learn are interesting by Anonymous Coward · · Score: 1

      Wait, you think you can't create linked lists in JavaScript? I've done it. You think you can't teach/learn/use recursion? Have you ever written JavaScript code?

      Lack of strong typing was an explicit design decision in JavaScript. Weak typing has it's benefits as well as its drawbacks. You can teach those.

      The lack of a requirement for explicit declaration was another explicit design decision. Again, you can *teach* people why it is still a good idea, and the problems it can cause if you fail to do so. Even better, because the language doesn't *require* explicit declaration, you can *show* the problems it causes if you fail to do so. What better way to make the effects clear?

    10. Re:The things they will NOT learn are interesting by Anonymous Coward · · Score: 0

      At my college, CS101 was about learning hexadecimal, binary, two's complement, ASCII, and other topics that would be completely foreign to a new student. There was absolutely no programming in this course. We had other classes like "Programming in C", "Assembly" (on a PDP11, this was a while ago), and "Data Structures" (linked lists, binary trees, etc) that we took concurrently with the CS101 series of classes.

    11. Re:The things they will NOT learn are interesting by DragonWriter · · Score: 1

      Linked lists. Recursion. Calling by reference. Strong typing. Explicit declaration (or at least the need of it). There are some ways around those, but these hacks are even going to warp their minds worse than not learning those things would.

      None of which are important to the process of problem analysis and programming, though obviously those are important tools for implementing programs in some common languages, which are sometimes used for good reasons. They are certainly things that are important to learn in the course of a degree in computer programming, but they aren't things that are important to learn an introductory class for non-majors.

      Sure, it offers quick satisfaction, but when you hit the wall (and you do soon in JS), you hit it hard because what you learned will not translate well into a more powerful and flexible language.

      JavaScript is a more powerful and flexible language than most of the popular ones that would make learning the things you reference meaningful. (It may not be, in its available implementations, as fast, but that's often diametrically opposed to powerful and flexible.)

    12. Re:The things they will NOT learn are interesting by IICV · · Score: 1

      Linked lists. Recursion. Calling by reference. Strong typing. Explicit declaration (or at least the need of it). There are some ways around those, but these hacks are even going to warp their minds worse than not learning those things would.

      Umm just so you know (since you seem to be having such a good time bitching about it), the normal Stanford undergraduate computer science curriculum does not include CS 101. The first programming class CS majors will take is one of the versions of CS 106, and they'll go on from there - and just guess what's covered in CS 106B/X? (warning: pdf, it's on page 3)

      CS 101 is for people who are not computer science majors and who might not ever program again in their lives. Thus, by teaching them Javascript, they're taught something that may potentially become useful - after all, most non-technical people have access to a web browser, but very few of them have access to a C compiler or a Python interpreter.

    13. Re:The things they will NOT learn are interesting by comp.sci · · Score: 1

      Because they are not learning CS with this class but how a computer works. This class is meant for humanities students who never took a "computer" class and looks very good for that purpose. Did you really think that the Stanford CS curriculum will stop teaching recursion...?

    14. Re:The things they will NOT learn are interesting by DragonWriter · · Score: 1

      Then when? The sooner you get this stuff carved into the students' minds, the better.

      I disagree. Most of that stuff is peripheral to the important skills in programming. (Though they are important skills to coding in certainl languages.) The later you get people to focus on those kinds of low-level details, the better, more flexible programmers they will end up being.

      Minimize those kind of incantantions, and students can focus on problem analysis, logical design of the solution, and implementation of the solution using high-level code.

      Its certainly useful if people are going to do much more with programming that they will need to learn languages that are closer to the machine and understand more low-level implementation details and the differences between different low-level approaches, but in an introductory course focus on those things is, IMO, a distraction from the focus on designing solutions to problems.

    15. Re:The things they will NOT learn are interesting by Opportunist · · Score: 1

      Hxadecimal numbers, 2s complement and so on were covered in a separate class here, translated it would be called "theoretical CS". And IMO that's where thy belong, they have nothing direct to do with algorithm development.

      --
      We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
    16. Re:The things they will NOT learn are interesting by Opportunist · · Score: 1

      You can do linked lists in JS. You can also deliver a metric ton of flour with your Austin Mini. Neither is very sensible, though.

      --
      We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
    17. Re:The things they will NOT learn are interesting by matthewv789 · · Score: 2

      Linked lists. Recursion. Calling by reference. Strong typing. Explicit declaration (or at least the need of it). There are some ways around those, but these hacks are even going to warp their minds worse than not learning those things would.

      What on earth makes you think you can't write a linked list, use recursion or call by reference in Javascript? You can even use strong typing and explicit declaration through programming practice (though if you omit them, it won't complain, so you can't enforce their use.)

    18. Re:The things they will NOT learn are interesting by Anonymous Coward · · Score: 1

      Uuum:
      Linked list (not that you would need it often, and not that it isn't blatantly obvious how to implement it if you need it) and recursion (which language can't do that??):

      // Implementation
      function Item(prev,data,next) { // This is a linked list.
        this.prev = prev; this.data = data; this.next = next
        this.insertBefore = function (item) { this.prev.next = item; item.prev = this.prev; item.next = this; this.prev = item }
        this.insertBehind = function (item) { this.next.prev = item; item.next = this.next; item.prev = this; this.next = item }
        this.toArray = function () { var item = this; var arr = []; while (item) { arr.push(item.data); item = item.next }; return arr }
        this.clone = function () { return Item.fromArray(this.toArray()) } // quick and dirty
      }
      Item.fromArray = function (arr,prev) { if (arr.length > 0) { var data = arr.shift(); var it = new Item(prev,data,undefined); it.next = Item.fromArray(arr,it); return it } else { return undefined } } // RECURSION HERE
      Item.fromData = function (data) { return new Item(undefined,data,undefined) }
       
      // Usage
      var linkedList = Item.fromArray([1,2,3,4,5,6,7,8,9,10])
      alert(linkedList.toArray().toSource())
      var linkedList2= linkedList.next.next.next.clone()
      alert(linkedList2.toArray().toSource())
      linkedList2.next.next.insertBefore(Item.fromData("Hello Baby!"))
      alert(linkedList2.toArray().toSource())
       
      // Result:
      // [1,2,3,4,5,6,7,8,9,10]
      // [4,5,6,7,8,9,10]
      // [4,5,"Hello Baby!",6,7,8,9,10]

      Calling by reference is the only calling you make in JavaScript. If you want a copy, you have to write a clone function. A generic clone function can be written, if required, and I think is already available in libs.

      You will be warned if you don't use explicit declarations, when strict warnings are on. Which is something I expect from a development machine.

      Only strong typing is left. Which should be known, but not in CS101!! They barely understand what a program is at all. As long as it is taught properly later, it should work.

      By the way: Did I mention the beauty of being able to concentrate on the algorithm, because memory management has already been solved, and I don't have to re-invent the wheel?

    19. Re:The things they will NOT learn are interesting by Panaflex · · Score: 1

      Uh, maybe because this course is for those seeking their 1 credit hour of computer science required to graduate - and likely the only language most of these folks will *ever* see or use is Javascript.

      I think it's a fantastic idea actually. Yes, JS is convoluted and a bit strange. But, perhaps they will learn a thing or two as they go on to manage their fellow compsci graduates in the future.

      --
      I said no... but I missed and it came out yes.
    20. Re:The things they will NOT learn are interesting by StripedCow · · Score: 2

      Linked lists. Recursion. Calling by reference.

      It is not difficult to program linked lists in javascript. Recursion is also possible, and in fact quite natural to use. Objects are passed by reference by default, so no problem there either.

      Strong typing.

      This becomes an issue only when the system you're building becomes large and complex. In a CS101 class, this will not be the case. So I think it is reasonable to leave type-checking for a more advanced course.

      --
      If Pandora's box is destined to be opened, *I* want to be the one to open it.
    21. Re:The things they will NOT learn are interesting by TheTyrannyOfForcedRe · · Score: 1

      Linked lists. Recursion. .

      What???? Are you saying that you can't write a linked list or do recursion in javascript?

      --
      "Liechtenstein is the world's largest producer of sausage casings, potassium storage units, and false teeth."
    22. Re:The things they will NOT learn are interesting by Needlzor · · Score: 1

      "Linked lists. Recursion. Calling by reference. Strong typing. Explicit declaration" With the exception of calling by reference and maybe linked lists nothing here is low level: these are programming language features that you need to know as soon as possible so you can focus on the interesting stuff (designing efficient algorithms for instance). How can you even program if you don't know how to use recursion ? Even if it's introductory, it's supposed to be CS, not "how to hack up a CRUD in 12 steps". But I guess that's also a cultural thing. When I was taught the basics we had that in two separate modules: algorithms (pen and paper) and programming languages (the gory details). We didn't type in a single line of code until we knew how to build basic algorithms and how to implement it (we began with C++, then C and finally Java).

    23. Re:The things they will NOT learn are interesting by toriver · · Score: 1

      No, he is saying he doesn't know how.

    24. Re:The things they will NOT learn are interesting by mudimba · · Score: 1

      Javascript can have linked lists and recursion. It is not uncommon for me to use recursion in my js code. Linked lists are less common since js arrays can do most of the things that you would normally use a linked list for, but there is no reason why you couldn't have students build their own list implementation for the sake of instruction.

      There may not be pointers in js, but there is enough of a concept of references to explain it. Similarly, you can show a student typeof() show them how types are mutable in js, and explain that in some languages that is not how it works. Any halfway smart student will understand the implications that strong typing would have.

    25. Re:The things they will NOT learn are interesting by Anonymous Coward · · Score: 0

      That's not very theoretical. Try starting with the proof that 3-SAT belongs to NP complete, starting with a n-taped non-deterministic Turing Machine. That's what undergraduates jump into in some places, in engineering departments. For CS it is occasionally recommended taking a full BS amount of mathematics courses, math "major" if you like. Group theoretic arguments for working algorithm are probably easier to get that way. Now this is theoretical (with a thick Australian accent).

    26. Re:The things they will NOT learn are interesting by Anonymous Coward · · Score: 0

      Personally, I wouldn't think it's a great choice just because it has proven to be particularly difficult to debug for me (i.e. fix the line, keep getting random errors on perfect lines, rewrite the script and it works, compare the two versions and see no real difference). But, one thing that is very useful about JS is it's accessibility.

      IMHO, the worst mistake beginning programming classes can make is to use a language that's got a barrier to entry that students aren't going to fool with outside of the class. What you want is to, first, teach students to use a programming language to solve their problems, and if it takes two hours to setup the development enviroment that isn't going to happen. Second, you want students to be able to share useful programs, a 'tangible' product so-to-speak. TI-BASIC is a good example of what happens when you have these two factors. Traditional CS class BASIC is a good example of what happens when you don't. Personally, I'd probably label the intro class 'programming du jour' and teach whatever's popular at the moment, such as using Java to make android apps.

    27. Re:The things they will NOT learn are interesting by Ceriel+Nosforit · · Score: 1

      Some of the things you think are good others think are bad. That's why there are many programming languages. Take a look at node.js if you want to know about some of the things JS is really good at.

      --
      All rites reversed 2010
    28. Re:The things they will NOT learn are interesting by shutdown+-p+now · · Score: 1

      For the sake of starting a fun and tasty language flamewar, either Python or Ruby will do.

      (I could say Common Lisp, of course, but then everyone would agree that, yes, it doesn't really get any more flexible and powerful than that - since, after all, you can use reader macros to turn it into any other language whatsoever. Hence no flamewar, and where's the fun in that?)

    29. Re:The things they will NOT learn are interesting by b4dc0d3r · · Score: 1

      Who is the audience? What should they learn? What should they not learn? I don't think you answered these questions first.

      Being able to put javascript: code in the address bar and pull out stuff like all of the links in the page is pretty cool. You don't even need a compiler, web page, or save a file. Use the address bar, and if Firefox then the error console too. Change pages, add stylesheets, learn Greasemonkey. jQuery has some interesting additions as well, interesting syntax to learn. Given how much programming involves the web, I don't see any reason not to learn it first.

    30. Re:The things they will NOT learn are interesting by uarch · · Score: 1

      What they wont learn is exactly what worries me.

      I've been interviewing a lot of candidates at work for the past several months and the complete lack of knowledge in recent college grads scares the hell out of me. I've seen several people with 3.7-3.9 GPAs in comp sci from top10 (using us news rankings, yes I know they aren't perfect) engineering schools who couldn't do even basic tasks with pointers.

      They spent all their time writing java. That's great if you need to write java but the fact that they didn't learn enough to be able to generalize their skills to other languages while still doing well in school does not day good things about that (and other) schools.

      A pointer is not _that_ hard. You should at least be able to copy a linked list in an interview question. I used to have higher standards but the string off candidates I've seen lately has crushed all faith I once had.

    31. Re:The things they will NOT learn are interesting by Anonymous Coward · · Score: 0

      you can show a student typeof()

      Nitpick: typeof is not a function; it is an operator. Parentheses aren't required.

    32. Re:The things they will NOT learn are interesting by Anonymous Coward · · Score: 0

      Linked lists (and other common data types) are just as implementable in JavaScript as in Scheme, C, C++, Java, etc.
      Recursion: JavaScript supports recursion.
      Pass-by-reference: All JavaScript calls that pass an object reference, er, pass an object reference.
      Strong typing: Well, this one's true, at least.
      Explicit declaration: if you don't in JS, you get a bunch of globals. They'll learn to use var before the week's out if they're worthwhile (or linting).

      You get 1/5.

      I'm deeply curious as to the "wall" that one might hit in JavaScript. I'm deeply curious as to what constitutes a "more powerful" language and a "more flexible" language. (Particularly, JS is a strikingly flexible language -- see wsxyz's comment above.)

    33. Re:The things they will NOT learn are interesting by Tablizer · · Score: 1

      In some ways, Lisp is really a meta-language, not a language.

    34. Re:The things they will NOT learn are interesting by Anonymous Coward · · Score: 0

      But not because JavaScript would be bad. Rather because linked lists rarely serve a purpose with modern languages anymore.
      Look at Haskell. A awesome, elegant, powerful, perfectionist (and admittedly hardcore) language.
      It has lists. But what point would there be in manually managing linkage? (Not that you couldn't do it.)
      Haskell expects all elements of a list to be of the same type. Which means they will all have the same size. So a simple field at the beginning, containing the number of elements, will suffice. You can just always add the length of one item to the pointer. No need for space-wasting links.

      And if you want variable lengths, you can use abstract data types. Which will just make it a list of pointers internally. Still with every item having the same length.

      I always preferred that over the mess of linked lists. Especially the FAIL of having those without knowing when they end. I bet half the security holes come from such FAILures in language design.

  14. 101 101 101 by Anonymous Coward · · Score: 0

    Surely if it is a 101 - that's binary and we should be using assembler

  15. Javascript on the James Webb Space Telescope by ToSeek · · Score: 3, Insightful

    The James Webb Space Telescope - if it's ever actually launched - will run its onboard science operations using scripts written in a tailored version of JavaScript.

  16. Looks like a solid class by makubesu · · Score: 1

    for non cs majors. But there's a big gap between javascript and languages like C++, Java, etc, and it seems like you'll just waste time in future CS courses having to make up for that.

  17. Know your Stanford classes before pontificating by Anonymous Coward · · Score: 0

    CS101 is for non-techies - it's basically "how computers work". CS105 is a more detailed introduction to programming for non-techies.

    CS106A/B is the techie's programming class, and the actual start of a CS degree.

  18. Good and Bad by Anonymous Coward · · Score: 0

    It's great that we have one language to do everything, server side, client side, etc. But it's terrible that it's javascript.
    Thank God, we have transpilers, and new languages popping up on top of it, such as Coffeescript.

    More flexible and expressive syntax (ala python or ruby), more functional capabilities, better performance, jquery...
    Better standards, widespread adoption. This is starting to look good after all.

    1. Re:Good and Bad by Lennie · · Score: 1

      The only reason JavaScript is still JavaScript the way it is now, is because doing radical changes with all the old browsers still out there would be hard to do.

      Compatibility is the price you pay for popularity (or atleast widespread use).

      --
      New things are always on the horizon
  19. I guess I'm old by idontgno · · Score: 1

    I was trying to remember what my CS101 equivalent was 30 years ago.

    Turns out, I didn't have one. I got to skip it because the programming and math curriculum in my high school was strong enough that the university credited me.

    So, then question became, "WTF do they teach in a CS101 class?"

    Turns out, a whole bunch of miscellany. Rudiments, elements, cats, dogs, little green ponies. Stuff I though people picked up by osmosis nowadays.

    So, if they're not trying to teach Architecture and Organization (mainframe assembler, and later VAX assembler), or data structures (PASCAL, C, etc.), or Objects (pick your OO poison), I don't think language-of-choice is particularly relevant.

    But that's just my crusty old-man opinion. Looks harmless from my lawn.

    --
    Welcome to the Panopticon. Used to be a prison, now it's your home.
  20. Functional programming by Anonymous Coward · · Score: 0

    It's the way to go.

  21. CS 101 is not the introductory programming course. by Anonymous Coward · · Score: 0

    The class that the vast majority of students who plan to continue in the CS track take at Stanford is CS 106A, which is Java-based, and is designed with students who have never seen a line of code in their life in mind. This may be /an/ introductory class, but it is not /the/ introductory class.

    (A full listing of classes under the CS department at Stanford can be found here: http://explorecourses.stanford.edu/CourseSearch/search;jsessionid=C05909CBF4C2E990D48059C809E93A19?view=catalog&catalog=&page=0&q=CS&filter-catalognumber-CS=on&filter-coursestatus-Active=on)

  22. What's wrong with JavaScript for CS? by Animats · · Score: 2

    It's a reasonable language in its modern form. It has a reasonable, if not great, syntax. (Compare Perl.) Someone wrote that it doesn't support recursion. Yes, it does. It even supports closures. The object model is adequate, if not inspired. It's a memory-safe language. About the only thing it doesn't support is concurrency.

    The current generation of JIT compilers do a reasonably good job on performance. Free implementations are easily available. So there's no problem running it.

    The problem with Javascript is mostly that the code quality seen on many web pages is appallingly bad. (Or, alternatively, the source code has been run through some obfusicator/compressor.) That's not the fault of the language. Javascript's interface to browsers is also rather clunky; the primitives for manipulating the DOM were ill-chosen. But, again, that's not a language problem.

    1. Re:What's wrong with JavaScript for CS? by Anonymous Coward · · Score: 0

      What is wrong with Javascript?!
      It has a totaly f-cked up dictionary stack and lack a lot of basic functionality a dictionary based language should have!

      I guess the problem is that it wasn't designed to be a dictionary based language, it just happened to become one by accident. I don't think JavaScripts designers realised that they created a flawed clone of PostScript, they thought they created something similar to self or sceme, or something, but adapted to be less resource hungry (but because they implemented the dictionary stack wrong, it is also unessecery resource hungry).

      People who like JavaScript have never used a good dictionary based language. If the dictionary-stack model of PostScript was used in JavaScript, JavaScript would be so much more powerful and easy to use.

      Summary: If all the f-ck ups in the dictionary stack was corrected, JavaScript would be wonderful language, now it is just a slightly bad language.

  23. Nothing new here by Anonymous Coward · · Score: 0

    In 1990, Huddersfield University in the U.K. were starting students off with JS on software engineering courses.

  24. First they should learn how to save an HTML file.. by AveryT · · Score: 1
  25. Important: This is NOT their "Intro to CS" class by comp.sci · · Score: 4, Informative

    To clarify, this class is a cursory overview of how computers work, a few basics on whats makes them tick and how to make them do fun things. This class is meant as a general education "learn about computers" effort, this is NOT their intro to CS class. Look at CS106X for programming, CS103X for discrete math, ... To repeat: Stanford is NOT teaching CS majors javascript, they are showing off what computer can do for humanities students with CS101. On a side note: I can see why most commenters would not catch this but how did the editors miss this obvious fact? Do a tiny bit of background research (aka click their link) and you will see how this summary is entirely misleading.

  26. Does the specific language really matter much? by FoolishOwl · · Score: 1

    It's a first semester course, introducing elementary concepts in programming such as variables, data types, control structures, and input and output. Any programming language which has those standard features and isn't too far from the mainstream of programming languages really ought to fit the bill, and the simpler, the better.

    The introductory course in programming I took used C++, but really, most of the material was in pseudocode; the idiosyncracies of C++ were a distraction, for the most part.

  27. And I learned on by h1q · · Score: 1

    APL / CDC Cyber

    just kidding, HPBASIC on HP 2000C time-share

    assembly on IMSAI 8080

  28. Scheme? Nope. by Estanislao+Mart�nez · · Score: 2

    Repeat after me: "JavaScript is Scheme in C's Clothing."

    Ok, let's test this claim:

    1. Does Javascript have anonymous lexically scoped closures? Yes.
    2. Does Javascript have tail call optimization as an implementation requirement? No.
    3. Does Javascript have first-class continuations with unlimited extent as an implementation requirement? No.
    4. Does Javascript have hygienic macros? No.

    Score: 1/4. I call this a failing grade.

  29. yes PL/1everything including the kitchen sink ... by Anonymous Coward · · Score: 0

    and the dishwasher for free.
    I hated shit PL/1. Had to learn it for a course another a(sshole)IBM language. When something has everything iut becomes shit to everybody. JAVA in today's shit COBOL.

  30. Not really Javascript by jbum · · Score: 1

    The first few examples do not appear to be Javascript. It's implemented in Javascript, yes, but Javascript does not have the BASIC-like functionality that is used in the examples.

    1. Re:Not really Javascript by Lennie · · Score: 1

      I guess the existing examples got ported from an other language. :-)

      --
      New things are always on the horizon
  31. Javascript the good parts by deysOfBits · · Score: 1

    The above is a title of a book.

    IF you read the above book and just use the subset specified, it's not bad in my opinion.

    I don't actually program in javascript but may eventually. Intodays world you have to realize it exists. It's like a standard language that you will have to use sooner ot later.
    Before reading this book I thought Javascript was the shit. The language to me was a fsckn mess but after reading the above book everything became golden..

    Personally I like Ruby.

    1. Re:Javascript the good parts by Anonymous Coward · · Score: 0

      I think you have an extra "the" in that sentence.

  32. Priorities by DragonWriter · · Score: 1

    With the exception of calling by reference and maybe linked lists nothing here is low level: these are programming language features that you need to know as soon as possible so you can focus on the interesting stuff (designing efficient algorithms for instance).

    Well, no, you can optimize efficiency within the constraints of an environment without any of those things, if you know the performance characteristics of the elements of the language you are using. You can analyze and optimize the efficiency of algorithms in languages in which things like strong typing and explicit declaration do not exist.

    And, while optimizing algorithmic efficiency becomes important, its only important after you know how to analyze a problem and implement a correct solution in code. So even if knowing those things was necessary to be able to learn how to do that (its not, in general, though of course it is when you are working in an environment in which those things are present.)

    How can you even program if you don't know how to use recursion ?

    By using iteration. Which tends to be safer than recursion in most languages where learning any of the other things on the list would be meaningful, because they tend not to feature tail-call optimization, and so even the cases of recursion that are safe to use without worry in languages that feature tail-call optimization aren't safe. (On the other hand, the poster upthread was wrong to feature recursion on the list, since recursion in JavaScript is just as easy as in most modern languages.)

    But I guess that's also a cultural thing. When I was taught the basics we had that in two separate modules: algorithms (pen and paper) and programming languages (the gory details).

    I think its a matter of focus. Its important for people who are going to be CS majors to understand computers at a low level, and that should probably happen fairly early on in the major (maybe in the introductory class using a model like you describe hear, maybe a little later, but definitely the coding part of that should use things that are fairly low level for the platform they are implemented on, like C/C++ for most platforms or Java on the JVM.)

    OTOH, I think for non-majors -- and possibly for a first course in the major, with the lower-level course as a second course -- the important thing is to focus on the higher level analytical and programming process of building and validating correct (whether or not optimal, from a performance standpoint) solutions to problems.

    If you aren't majoring in CS, its quite likely that the main value you will get out of learning programming (assuming that you end up working in whatever field you are majoring in) is doing solo projects to support whatever your field is, or doing requirements analysts on a project where professionals are doing the actual coding; in either of those areas, its more critical that you can analyze a problem and understand how to approach a correct solution (and, in the first case, that you can actually implement that correct solution) than that you can optimize performance.

  33. The course is fun by Anonymous Coward · · Score: 0

    Did any of you go look at the course? It is actually pretty fun. I will recommend it to people who would like to touch their toe in the programming waters.

  34. Non standard DOM by Anonymous Coward · · Score: 0

    I love that they are using non standard DOM components, so that the homework assignments cannot be done in Internet Explorer.

    1. Re:Non standard DOM by Anonymous Coward · · Score: 0

      I just read that back to my self, and something does not seem right.... NON Standard DOM not working in IE??
      Still, no other way to put it.

  35. I think you missed your calling, by Anonymous Coward · · Score: 0

    Sergeant Major.

    Bloody programmers! Don't know what the world is coming to!

  36. Re:Scheme? Nope. by Anonymous Coward · · Score: 0

    Only a person that doesn't know either Lisp or Scheme would equate Javascript to a "Lisp/Scheme in C's clothing." It's sad how often this saying is repeated by the Javascript community.

  37. This is just fucking awfull by FlyingGuy · · Score: 1

    lets start with print out a string. Lets introduce a variable and a loop then lets go directly to screwing around with images.

    WTF!

    --
    Hey KID! Yeah you, get the fuck off my lawn!
  38. Time machine? by colinrichardday · · Score: 1

    According to this, Javascript wasn't developed until 1995.

    http://en.wikipedia.org/wiki/JavaScript

    Or did you mean some other JS?

  39. FORTRAN lessons kount by dbIII · · Score: 1

    I was at another place and like all the engineering students learned FORTRAN and LISP while the CS students taunted us for using dead languages instead of Pascal or Modula-2. That's very funny in hindsight.
    People who've used FORTRAN will understand why I've spelt "count" with a "k" above.

  40. In any sane language by warrax_666 · · Score: 1

    it's a type error. (Whether or not that type error should be caught at compile time or run-time is debatable. This is about weak vs. strong typing, not dynamic vs. static type checking.)

    Weak typing is a horrible, horrible idea with almost no redeeming value whatsoever.

    --
    HAND.
    1. Re:In any sane language by omfgnosis · · Score: 1

      Point is... it's hardly a fair criticism of JavaScript to say "look, this thing you should never ever do has seemingly unpredictable results".

  41. Re:Writing missile control in BASIC by presidenteloco · · Score: 1

    That gives a whole new meaning to the phrase:

    GOTO considered harmful.

    Good thing you never got into the ADVANCED language, with its COMEFROM statements.

    --

    Where are we going and why are we in a handbasket?
  42. Ones and zeroes? Bloody Luxury! by presidenteloco · · Score: 1

    WE had to run error correction codes on the smoke signals to even have any hope of having ones and zeroes!
    And only if the wind was favourable and the tinder dry.

    And you tell that to the young people today, they wouldnay believe you.

    --

    Where are we going and why are we in a handbasket?
  43. Haskell course by presidenteloco · · Score: 1

    You might try this handy reference book: "Monads for Morons" [Amazon.com]

    It's the 23rd in an ongoing series of books attempting to explain the elusive concept behind and application of Haskell Monads.

    See also:
    "A Monad is a Wrapper"
    "A Monad is syntactic Sugar"
    "A Monad is an (endo-)functor"
    "The Analogy between Monoids and Monads"
    "A Monad is a Box"
    "A Monad is a Composable Computation Description"
    "A Monad is a Burrito"
    and the classic
    "Spam, Spam, Spam, Monads and Spam"

    --

    Where are we going and why are we in a handbasket?