7 ms·
I'm not sure I'd consider a decision to move from Java to JavaScript an improvement. They are going from a bloated syntax to a bad-habit goldmine. Why not go Ja
by anthonybsd 9y ago
I'm not sure I'd consider a decision to move from Java to JavaScript an improvement. They are going from a bloated syntax to a bad-habit goldmine. Why not go Java -> Python instead?
- ashnehete 9y agoI agree. Although JS is a powerful language, it is not suitable to teach in an introductory environment. How about C? It makes the student grasps not only logical constructs but also introduce a portion of computer organisation and architecture.
- maxxxxx 9y agoI would also go with C first. It takes the magic out of the computer and you understand what's going on under the hood.
- csciutto 9y agoThe Stanford curriculum goes from Java to C++ to C in the first core year of classes. Our final project is a memory Allocator (Malloc, Realloc, Free). By the end, students really do grasp computer organization and architecture.
- ashnehete 9y agoMumbai University curriculum goes from C to Java (actually its more of Object Oriented Methodology) and then we have a separate subject for Computer Organisation and Architecture. This is in 3 contiguous semesters. By the end, we know from low-level to high-level.
- ryandrake 9y agoFunny--I learned in pretty much the opposite order: Assembly -> C -> C++ -> Java. Seems odd to go top-down but who's to say which way is better..
- cillian64 9y agoI've taught introductory programming to undergraduates in both C and Python at different times. In my experience students struggle to grasp computer architecture and memory management at the same time as learning to think like a computer and formulate ideas in code. They have coped much better with Python and enjoyed how time/effort is spent solving useful problems rather than boilerplate. Ideally they would all learn about computer architecture and memory management at some point. But at least with this course motivation and interest is a big problem, and producing confident Python programmers seems a better result than terrified students who can't produce competent C.
- jacquesm 9y agoJS is a powerful language for a narrow domain. That makes it totally unsuitable as an introductory language because if the domain you wish to move to is not web development you now have to restart all over again with another language. Python would be better, java wasn't all that bad as a universal language it is applicable to many domains. But the ECT cycle of java could be seen as a drawback, python would remedy that to get the instant gratification factor.
- scarface74 9y agoI'm no lover of JavaScript -- especially without TypeScript -- but JS is the most universal language. There are frameworks to create server side components, Android apps, iOS apps and windows app Not that JS is optimal for any of those use cases.
- hocpoc 9y agoyeah this is my exact reaction. not sure if they are thinking that knowing JavaScript allow students to sell themselves for internship since webdev internship is getting much more popular.
- enraged_camel 9y ago>>They are going from a bloated syntax to a bad-habit goldmine. That's precisely why I think it's a good idea: with proper instruction, you can teach people good habits from the start.
- phailhaus 9y agoNot sure how that follows. You can try to teach good habits, but you're still throwing intro students into a language that doesn't care if you follow them or not.
- Lev1a 9y agoHaving gone from Python and a little C++ to Python and a certain REALLY pedantic language, I wish I had had one such unforgiving language/compiler from the start...
- enraged_camel 9y agoBut surely a university environment is the best place to experiment and learn what works and what doesn't. I mean, the majority of these students will have to write JavaScript sooner or later. Better they learn it in a controlled environment.
- phailhaus 9y agoUniversity is hardly a controlled environment; students are encouraged to get their projects working and then ditch them. There's very little incentive to write good code. Remember, we're talking about intro languages here. It's a much better idea to teach languages that encourage good habits because then going to "wild west" languages like javascript is much easier.
- deleted 9y ago[deleted]
- detaro 9y agoIn the first programming course many students can't judge "what works and what doesn't" yet, or even appreciate the details if you tell them, and are busy enough with the basic concepts behind what they are doing. You also can't really teach only an opinionated subset of the language, since students use all kinds of material to learn. Material about JS is often steeped in environment details (browser, nodeJS, JQuery, ...), and thanks to transpilation right now multiple versions are popular, which makes it even more confusing. It wouldn't be impossible to teach a good intro course with JS, but I don't see any benefit in doing so, and it wouldn't make the students very effective JS programmers.
- csciutto 9y agoI'm curious if a combination of JavaScript: The Good Parts, and a professor that emphasizes good practices can offset JS's inherent problems. Very few people formally learn JS. It's usually more of a read up on syntax, read documentation of a library, apply concepts.
- atarian 9y agoBecause you only need a browser. When you're just a beginner, setting up an environment can be extremely painful.
- misingnoglic 9y agoWith python you just need a browser too: www.repl.it/python
- Ductapemaster 9y agoWhile that's true, you learn a lot from going through those troubles. I disagree that we need to make it "easy" for students to get into programming by glossing over very important details like environment configuration. Someday they'll have to do it at their job - why not prepare them for it?
- lazyjones 9y agoIt's 2017. We have other options available in a browser: https://trinket.io/python https://trinket.io/python
- ghaff 9y agoI've gone through a couple online courses and some percentage of people obviously really struggled to get setup. It's probably significantly less of an issue at schools where "Intro to Programming" mostly assumes that you already have at least the basics of hacking around with a computer down. But it's probably hard for most people here to appreciate how daunting "never seen a command line before" is for many beginners.
- wlesieutre 9y agoEspecially once you get into managing dependencies. Virtual environments (whatever this year's flavor is, venv I think?) are a mess. I was trying to get VS Code to execute a python project in its virtual environment but gave up and just went back to running it in a terminal. There's probably a way to do it, but I poked at it for a while and didn't figure it out. Javascript might have its hassles, but even when you get to dealing with npm it's still more of a self contained thing.
- delecti 9y agoAgreed. Java was my intro language, and probably my favorite (those are probably related); conversely, I still haven't gotten the hang of Python, and it's one of my least favorite languages, but I still recognize that Python is a massively better first language than Javascript of all things.
- ashnehete 9y agoActually, Java was my first language too. And I still don't regret learning programming using Java. How much ever I love JS, I wouldn't have traded it for Java.
- pmarreck 9y agoI'm good with it. The more people they crank out learning the wrong languages, the more value I have working with the right ones. :P
- RUG3Y 9y agoSetting up Java or Python isn't that difficult. At the very least, being able to follow the instructions to set up either environment is a screener for people who aren't suited for something as detail oriented as programming, IMO.
- jhpriestley 9y agoPython has its own issues. Magic `__foo__` methods everywhere. Significant whitespace (there are arguments for or against it, but it's bad for beginners). One-line lambdas, `def wrapper`. Tuples versus lists, `(x,)` syntax. `global foo`. Ongoing split between 2.x and 3.x means that documentation is confusing. I think ES5 would be a legitimately better first language. Now that ES6 is everywhere though, javascript is a really terrible first language, certainly worse than python... the online learning material for a `for` loop, for instance, is now split between `for(var ii = 0; ...`, `for(let ii = 0; ...`, `for(var x in obj)`, `for(const x of obj)` (but make sure that something called `webpack` is set up with something called `babel` so that all of these will actually work). You'll find similar confusion when approaching variable declaration, module imports, etc.
- cpburns2009 9y agoThe magic methods in Python are used to support common, built-in functionality. E.g., `__init__` is the constructor (you rarely need `__new__`), `__len__` supports the standard `len()` function, `__str__` is equivalent to JavaScript's `.toString()`, etc. Signification white-space should actually help students when programming because it forces code to be properly indented instead of having an indentation disaster or misplaced braces. One-line lambdas and decorator functions are no worse than JavaScript's. The tuple syntax is clunky, but there is an important distinction between it and lists: mutability of the list itself. Frankly no one should be using `global` without a very good reason. The split between 2 and 3 is hardly worth mentioning. 2 is the legacy version. 3 is actively maintained and most major libraries have supported 3 for a while. Very little changed syntax wise between them. The split was necessary because of a fundamental improvement and disambiguation between textual and binary strings.
- smsm42 9y agoSignificant whitespace won't be much of a problem for a beginner that doesn't have a precocieved notion about whitespace not being significant. After all, in humanwrittenspeechwhi tespa cematters, doesn't it? So the concept shouldn't be too hard to grasp. As for magics, don't see why it would be an issue either. For a beginner, it's a magic incantation just like any other, for more advanced student, it's a callback/override just like any other. You can argue that this system has its disadvantages, but if you understand enough to argue about such matters, your education as a beginner is a definite success. 2/3 gap is an issue, yes. Fortunately, one can just teach python3 and leave python2 for advanced studies. It's not like students would be deploying in industrial production right after the class...
- cableshaft 9y agoMost do. From the article: "According to research published by Philip Guo on the ACM (Association for Computing Machinery) website in 2014, Python is now the most popular language for teaching introductory computer science in the United States. Eight of the top 10 U.S. computer science departments, and 27 of the top 39 (69 percent) use the language to teach the fundamentals of Computer Science."