Live data from Hacker News

Stanford dumps java as intro language

neowin.net

41–50 of 50 posts

Re: Stanford dumps java as intro language

#41

I'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 n…

Could 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.

Re: Stanford dumps java as intro language

#42
post #37
post #26

Earlier quoted context omitted.

Thanks 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?

I 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.

That'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

Re: Stanford dumps java as intro language

#43
post #14

Earlier quoted context omitted.

Disagree, 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 sti…

> 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. How do you expect to understand anything about data structures if you fail to wrap your head around one of the most basic data structure mechanism around: referencing a memory address? In fact, how exactly do you ex…

Because a memory reference isn't necessary to be completely understood to understand the concept? It's just a low level implantation detail. I can draw a structure on a whiteboard and indicate that element a points to b. That doesn't need to imply a "pointer". I'm. It saying avoid the topic altogether in saying one doesn't need to understand memory management to do structures

If anything learning things this way would likely make learning about memory references easier?

Re: Stanford dumps java as intro language

#44
post #17

Earlier quoted context omitted.

I keep hearing that people have (or had) trouble understanding pointers. As someone who has never had that problem or met such a person, I am struggling to understand why...

It's not so much as trouble with pointers as trouble with visualizing algorithms and data structures. Try implementing some moderately complex one in C. It reads like a monster. A dynamic language like Python would have a simpler implementation but at the cost of performance (Why do beginners need performance).

This is more or less what I was getting at. Do these things in a simplified language first and then drop down

Re: Stanford dumps java as intro language

#45

I'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 n…

IMO Python would be 'safe', but not 'sane'.

Re: Stanford dumps java as intro language

#46
post #31

Students 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.

"Principles" not "principals". Everything depends how the course is taught, not on the language used.

> 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`.

Re: Stanford dumps java as intro language

#47

Earlier quoted context omitted.

How could you pass up an opportunity to use npm, browersify and webpack?

Compared to pip/pip3/conda/virtualenv, npm is very straightforward

Never heard of conda, and Python has been stable enough that I haven't (yet) ever uses virtualenv.

Re: Stanford dumps java as intro language

#48
post #31

Earlier quoted context omitted.

"Principles" not "principals". Everything depends how the course is taught, not on the language used.

> 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`.

Every 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.

Re: Stanford dumps java as intro language

#49
post #37

Earlier quoted context omitted.

I 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.

That'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…

Haskell used to be the introductory language at UT Austin a few years ago IIRC. So it's been done before.

The point of an introductory programming class is not to teach a language for vocational purposes, but to teach the basics of computation. Someone who understands computation can reasonably be expected to pick up most languages.

Re: Stanford dumps java as intro language

#50
post #28
post #11

Earlier quoted context omitted.

JS 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.

Learning 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.

A 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.

Post reply on HN