9 ms·
Stanford dumps java as intro language
- rogocopH 9y agoI am really curious if this actually makes things better..Maybe I am just getting old.. But this seems like everything else. Let's dumb it down so people can get it. But if you really want to be a programmer, you will get it. You will spend hours debugging and feeling like you know nothing. That is what makes you grow. On the other hand....I ran into some Senior CS students who were incapable of programming in javascript...so...maybe it is not so bad.
- edem 9y agoNo you are not getting old. This was a horrible decision.
- xaa 9y agoI read this more as a nod to the fact that Stanford is the feeder school for SV. And pretty much all SV churns out these days is webapps. Javascript is just a very mediocre language in virtually every way. There is only one thing it's good at, webapps, and it's only good at that by virtue of the fact that it's the only game in town for complicated front-end stuff. The only thing that could be said in Javascript's favor as a teaching language is that it has basically no standard library, so teaching the entirety of the language can be done quickly.
- Grazester 9y agoJavascript, really? Why not Python?
- edem 9y agoThat's a very good question.
- copx 9y agoJS is the new lingua franca, what C used to be. And unlike C it is easy to get started programming in it. Thus a good choice for an intro language if you ask me.
- copperx 9y agoLearning to program is hard enough without having to worry about hoisting, truthiness, function vs block scope, prototypes, the many rules of this, "classes" that don't behave like classes, and other quirks unique to JS. Do you need to know all of the corner cases in order to write a simple script? No. But good luck trying to get someone to debug a JS program without a solid foundation. JS is a pedagogical disaster.
- UncleMeat 9y agoA lot of these things don't matter to new people. Prototype based inheritance vs class based inheritance will confuse exactly zero new people, since they will have zero prior experience with class based inheritance. Heck, if the goal is to teach algorithmic thinking and imperative programming (Stanford classes are 10 weeks long) then different forms of OOP don't matter at all. Hoisting is weird, but is one of those things that can be worked around by teaching proper patterns and is no more mysterious to new people than whitespace errors in python or the magic word "static" in java or operator overloading in C++ or nightmarish type error messages in haskell.
- paulddraper 9y agoHow could you pass up an opportunity to use npm, browersify and webpack?
- droidist2 9y agoCompared to pip/pip3/conda/virtualenv, npm is very straightforward
- paulddraper 9y agoNever heard of conda, and Python has been stable enough that I haven't (yet) ever uses virtualenv.
- copperx 9y agoFinal exam: Create a working webpack config by hand, on paper.
- edem 9y agoThey could have chosen a thousand better languages for starters like Python or Ruby to mention some useful ones or Scheme for example which has literally no syntax. They chose an abomination instead. Now we'll have even more influx of javascript-only coder hussars who have never seen an ecosystem which is not rotten to the core. Congratulations.
- xaa 9y agoI went to a completely unranked school, not even a CS major. But took Programming I anyway. It was for freshmen, and was in C++. IMO, for an intro language, you need either something close to the metal, so that students can work their way up the abstraction chain, or something very high-level with flexible constructs if it's desired to teach things from the algorithmic level. I also think that any dynamically typed language is a bad choice for a first language. We're all used to holding the types in our heads, but beginning programmers don't even know what they are, and it's a really core construct.
- laveur 9y agoI agree. When I first started out I learned java on my own. But when I first started taking college level CS classes it was all C++. And to be honest I prefer it.
- flukus 9y ago> IMO, for an intro language, you need either something close to the metal Agreed. They aren't just learning to program but they are learning how computers work so the less abstraction the better. On the plus side, I imagine this will be great for our salaries in 10-20 years.
- RandyRanderson 9y agoIf you have 1M bad programmers 1% will make terrible libraries. In 10-20 years at least a few of those you'll be forced to port to some other shitty library made by that 1%. I'm doing this right now...
- jghn 9y agoDisagree, I think it is the exact opposite. I say that as someone who did their CS education in the early 90s when that was the case. We used C for everything unless the class material implied something else. We got into the down and dirty details quite fast. IMO that's the wrong way to do it. Using myself as an example it took me far longer to learn things like data structures than it should have. Why? Because I still hadn't wrapped my head around pointers. The fact that the two are coupled is an implementation detail IMO. It turned out that I never had a problem understanding the structures, I had trouble writing code which didn't segfault. I'd prefer to see CS education start with the more theoretical constructs and then start diving towards the metal as the basic concepts are known. In other words, treat it more like computer science and less like computer engineering.
- z1mm32m4n 9y agoI'm sure I'm biased, but I'm a huge fan of how they taught our first two semesters where I went to school. Semester 1 freshman year was imperative programming in C (learning pointers, bits, the stack and heap, memory, ...). Semester 2 was functional programming in SML (learning recursion, types, function composition, formal reasoning, ...). When it comes to other programming language features, there are few that can't be understood as some combination of imperative and functional features. Introducing them freshman year, students take these lessons with them to every subsequent language they learn.
- danso 9y agoI teach at Stanford though not in CS. I think this headline is a bit off. There is a CS 106J class that follows the CS 106A curriculum using JS instead of Java, but as far as I know, the CS 106A Java curriculum has not been tossed out for the academic calendar of 2017-2018 (syllabuses aren't up yet, so I can't confirm). As the article states, CS 106J was spearheaded by Professor Roberts this past year. I would imagine it'd take some more time for it to become a curriculum that all of the profs teach, though JS is being used in several other CS classes. For example, CS 142: Web Applications, used to be taught with Rails: https://web.stanford.edu/~ouster/cgi-bin/cs142-winter14/index.php https://web.stanford.edu/~ouster/cgi-bin/cs142-winter14/inde... Now it's taught with MEAN (Mongo, Express, Angular, and Node): http://web.stanford.edu/class/cs142/info.html http://web.stanford.edu/class/cs142/info.html
- aduffy 9y agoI've TA'd all of Stanford's intro programming classes, including the first course in programming CS 106A, so a few things: - unlike a lot of other schools, CS 106A is mostly taken by non-majors (90-something percent of undergrads take at least one CS course before graduation, and for non-majors that means 106A) - the follow up course, 106B, is in C++ and focuses on OOP, pointers, memory, data structures, etc. - 106J was crafted as a replacement for 106A by in JS. It had limited enrollment, and word on the street is 106J's first offering this past spring was an experiment and it didn't go all that well, so who's to say if it'll still be around next year. Maybe they should switch from Java to something hipster and trendy, but there's about 10+ years worth of assignments that will need to be rewritten, including autograding infrastructure for the 600-800 people who take it every quarter. I personally feel like JS is an awful language with few opinions or guard rails, and thus a bad language to teach people who are looking for programming principles. It works for the web but I think for a course almost entirely consisting of non-majors it's not a good first language.
- dx034 9y agoThanks for the insight. With your experience, what would be a good language for non-majors so that they can make use of their experience later? Python, Go, C?
- chii 9y agoI would definitely say Haskell. Second is python, but i feel Haskell teaches concepts better and more efficiently. Everybody has used spreadsheets before, and I think most people can draw a m mental link to spreadsheets with Haskell.
- posterboy 9y agoThat's completely out of the question at the moment. True, it could potentially be most useful to know haskell for a lot of programmers, but at the moment, the opportunities to use haskell in the work place are actually rare and not to a small part because an understanding of haskell is barely achievable in an introductory semester, while the steep learning-curve of the language is kind of intended as it's usefulness only really plays out at a higher complexity. Whereas, python has a focus on scripts, shortness and quickness are even symbolized in it's name. Script languages with introspection and reflection are best suited for REPL, especially with good integrated documentation. Javascript in the browser suffers at that because it's opinionated towards web, but OP sees that as a plus and web programming certainly is an applicable skill with a future. Not everyone would have to use facebook as homepage, for example
- RandyRanderson 9y agoIt's funnny how, when java first came out, everyone was writing applets and not doing a good job of it (incl myself). This was due to it being way easier to code and deploy as opposed to C/C++ at the time. This gave ppl the impression that java was slow, when in fact the code was terrible (and ms was constantly submarining sun). Now I'm sitting here with 16GB of really terrible Javascript code running in my browser using 5% constantly of the fastest intel chip you can buy today. No one says it's slow probably because no one knows it's running. If chrome and ff put a task in the process list with all the Javascript CPU usage I'm guessing things would be way different. I really do think K&R C should be taught to university level students. It's important to understand pointers and mallocs, even if you don't use it often.
- charlie-r 9y agoStudents who start by learning Java will learn solid principals which may be applied to Javascript (or any other language). Students who start by learning Javascript won't learn solid principals.
- dx034 9y agoYou assume that the course is for CS majors. For students who'll only have 1-2 CS courses in their life, teaching some practical skills could be the better choice.
- chii 9y agoIf that's the case, there's a good argument to be made about teaching automation of common tasks using bash or Perl, rather than JavaScript.
- inimino 9y ago"Principles" not "principals". Everything depends how the course is taught, not on the language used.
- romanovcode 9y ago> Everything depends how the course is taught, not on the language used. Usually this statements holds true, but not in this case. I mean, after all we are talking about language where `'0' == false` is `true`.
- inimino 9y agoEvery language with loose typing has some edge cases. Once students know that JS has type coercion, and how to avoid this entire class of problems, they never need to know or think about what "0" == false evaluates to.
- chobytes 9y agoHonestly dropping Java or C++ as intro languages is fine imo... But why not something like Lisp, SML, or even Ruby...?
- kronos29296 9y agoOr Haskell if you want to go the FP route while CL or Clojure for the Lisp. Or python for dynamic (atleast more popular than Ruby which is more concentrated on Rails ecosystem).
- copperx 9y agoI don't like Python, but I have to admit that it ticks most of the boxes of an ideal starter programming language, unlike CL, Clojure, other Lisps, Ruby, or C/C++.
- geezerjay 9y agoTeaching marketable skills that are already popular and actively sought after may be an important aspect influencing the decision.
- xoroshiro 9y agoI'd say Python would've been the 'safe' and 'sane' choice, but maybe it's just my bias against Java and JavaScript talking. Just curious, has anyone ever heard off choosing to teach something like bash / PowerShell? It might seem less intimidating than downloading a lot of stuff and students can play around with stuff already in their computer. Hell, maybe even something like VBA (as much we might dislike it) since non-majors will likely encounter it in MS Office anyway.
- dx034 9y agoIn the department I work, 5 people recently started using Python who never wrote a line of code before (except some limited VBA). While the coding itself was relatively smooth, we spent a majority of our time consolidation which Python version works with which packages and how to create code that can be executed by computers that use Python 2 vs Python 3. Some people had to use packages that only worked with P2, others only worked with P3. There's still not really a solution for this. We'll probably just switch to Julia once it gets enough support in areas we need.. So I disagree, Python is actually not a good language for beginners. The language is great but the ecosystem can be extremely frustrating.
- Doxin 9y agoThe mistake here is not just making a choice but instead having people pick at random. Hardly pythons fault, every programming language has multiple incompatible versions.
- shishy 9y agoCould you elaborate more about why you don't like JavaScript? Asking out of curiosity -- I just started learning it yesterday, although most of my experience is with C/C++/Python/Java.
- romanovcode 9y agoIMO Python would be 'safe', but not 'sane'.