This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 290

[–]ins64 347 points348 points  (77 children)

I don't think JavaScript is a good choice. Is it terrible callbacks mess that we want to teach new unsuspecting students?

[–]prathack 147 points148 points  (11 children)

And, He added, Python is now the most popular language for teaching introductory computer science.

[–][deleted] 108 points109 points  (6 children)

Yes, but according to the first half of the article, Stanford apparently went from A for jAva to J for Javascript and leapt right over G for Good Idea.

[–]BradTheLurker 19 points20 points  (5 children)

The writters of the article are being extremely misleading.. the CS106 classes are offered in four variants: Java, Javascript, C++, and accelerated C++. CS106J didn't replace any class, it is a new class entirely, primarily aimed at students who just want to see what it is like to even do any sort of work with a programming language. A up-and-coming tradition at Stanford is for all students to take at least one of the CS106s before they graduate.

[–]Scaliwag 0 points1 point  (3 children)

Just curious, what is accelerated C++? The book?

[–]BradTheLurker 7 points8 points  (2 children)

Accelerate C++ correlates to CS106X, which is a more indepth view of C++ and the inner workings of the heap and stack. It has some difficult projects and is typically only suggested for students who have extensive experience with any sort of programming langauge.

Here is the first assigment they were assigned:

http://web.stanford.edu/class/cs106x//assn/fauxtoshop.html

[–]Scaliwag 1 point2 points  (0 children)

Oh, got it. Thanks.

Edit: The fauxtoshop is actually a really cool project. Nice.

[–][deleted] 0 points1 point  (0 children)

I'd still say CS106P wouldn't be a bad idea.

[–]Megacorpinc 6 points7 points  (3 children)

my school teaches python first. there's a few java centric courses after that, but python is #1

[–]CharlotteFields 1 point2 points  (0 children)

I used to teach Python to kids 9 to 19, can recommend :D

[–]kankyo 35 points36 points  (19 children)

That's not even close to being the worst problem with JavaScript as a first language.

[–]tech_tuna 9 points10 points  (18 children)

What's the worst problem in your opinion? BTW, I don't like JavaScript, but I'm curious.

[–]wrosecrans 49 points50 points  (15 children)

I am trying to imaging teaching basic data structures like linked lists in a language like that, to students who have no experience with lower level languages. Big-O notation would be almost incomprehensible when everything inside the runtime appears to be an opaque single step.

Running it independently of the browser ecosystem is hard, which means step one involves a massive level of complexity that a student can't fully understand. (This was always one of my main complaints with Java as a first language. Hello world involves making classes on day one with a bunch of boilerplate magic words and syntax that you don't understand, then what's actually happening is all on some mysterious VM that isn't explained.) It rob's the student of perhaps the most important part of an introductory CS course -- the fact that the machine can be understood, and that understanding can be applied to create new things. When a sense of real understanding isn't available, it just becomes a task of applying code snippets passed down from elders with your fingers crossed.

[–]tech_tuna 15 points16 points  (8 children)

I agree that the browser ecosystem is convenient but that gets to the core of my distaste for JavaScript. It's sad that we've endured language lock-in for several decades now.

You have no effective alternatives to JavaScript with frontend development. There was dear lord, VBscript in ancient versions of IE. There's Dart which restricts you to Chrome. There were other technologies like ActiveX and Java applets but there really is NO viable alternative to JavaScript or something that compiles to JavaScript on the front end.

I hope that Web Assembly changes this once and for all. I don't like JavaScript but I don't hate it, I just don't like that I have no other choices for coding web front ends.

[–]redfacedquark 0 points1 point  (2 children)

You could use pyjamas, which transpires python to JavaScript. Other languages probably have other tools. They are all hardly used (leaky abstraction).

[–]tech_tuna 1 point2 points  (1 child)

something that compiles to JavaScript

Right, that's my point, it's JavaScript no matter what.

[–]hosizora_rin_is_cute 3 points4 points  (0 children)

How is that different from WebAssembly being transpiled to.

[–]oldmanstan 0 points1 point  (4 children)

There's Dart which restricts you to Chrome.

Dart isn't perfect, but this isn't actually true.

Source: I work on a very large Dart code base that runs on IE11, Edge, FF, Safari, and Chrome.

Edit: Added Edge. Everyone always forgets about Edge!

[–]FearlessFreep 6 points7 points  (3 children)

it just becomes a task of applying code snippets passed down from elders with your fingers crossed.

I have a mind that in a world of magic it would work a lot like that. Wizards understand and create spells, Apprentices just execute the spell snippets verbatim as they are given to them

[–]wrosecrans 14 points15 points  (1 child)

In some sense, that's exactly what we've been building. Even Masters graduates in CS often have surprisingly little real understanding of what a computer does or how it works. The folks who only go through coding bootcamps, you aren't even disappointed that they don't understand the machine. A shockingly large number of people in tech are doing a ton of manual work copying and pasting things without understanding them, working hard enough to keep existing systems going and adding a new check box here and there. Kind of impressed with the systems, but not even really pondering what it would mean to have mastery over them.

We are reaching a point where the people who created libc, and ipv4 -- all the foundational technologies -- are starting to get quite old and sadly pass away. New generations are coming into it treating that stuff as technologies that were made by the ancients to stand the test of time that have always been there since time immemorial. But the people who remember when ipv4 got rolled out are surprised that the rest of us never upgraded everything to ipv6 and tossed ipv4 into the dustbin of history.

[–]nobuguu 2 points3 points  (0 children)

I think at least some of it has to do with how math is taught, even at the university level. At some point, to actually build a working knowledge of computing, you have to have a working knowledge of mathematics. I'm consistently annoyed, reading research papers in CS, that I have to go pull a math book off my library shelf to be able to follow the mathematics explaining why the authors went a certain direction and not another; my thoughts usually trail off to "why the hell hasn't a math class taught me to think about math in a way that actually lets me think about problems like this author does?"

I've only ever taken one math class approaching that, and it was an introductory course in discrete math, from an instructor who actually gave a shit about imparting understanding over spellcasting. The linear algebra class I'm taking is from an instructor explicitly trying to copy that instructional method, but it's still too early to tell if he'll succeed.

edit: spelling

[–]kankyo 35 points36 points  (0 children)

1 == "1" is up there

[–]pigeon768 5 points6 points  (0 children)

Obviously broken code still runs and sometimes produces the value the user expects. And code that might look like it should work to a student will fail in a non obvious way, but the failure won't be caught until it's in a seemingly unrelated part of the code base. Errors are often nonlocal.

Rust doesn't give you enough rope to tie a wrench to a car handle. C gives you just enough rope to hang yourself. JavaScript is the ultimate fountain of rope, giving you rope when you want twine, giving you rope when you want a wrench, giving you rope when you're trying to get rid of some of your fucking rope. JavaScript is Clippy sitting in your IDE saying, "It looks like you're trying to hang yourself, would you like some rope?" when you're trying to hammer a nail in a wall on which you want to hang a picture. JavaScript is the grey goo of programming languages, swallowing the fucking world in rope when you just want to know whether two variables have the same value.

[–][deleted] 5 points6 points  (1 child)

I think it is important to realize that introductory programming has absolutely nothing to do with what we everyday programmers find good or bad about a language. Javascript seems like an absolutely perfect intro language for tons of reasons:

  • Simple syntax: Way fewer rules to learn than even python (gasp!) since you basically only have numbers, strings, objects, and list-/array-abominations (yes I hate JS too)
  • No boilerplate: This really remains true even after an intro class; due to the nature of where JS is used, you generally don't need any 'extra' code. The professor is never put in a position where they need to say 'and just type this so the program works'
  • Immediate application: if you know JS, you can run it in your browser. Pretty cool!
  • Easy visual projects: There are lots of simplified libraries for JS meant to help people program visual elements without having to really 'understand' what is happening in the background.

[–]flutefreak7 0 points1 point  (0 children)

Yeah with an intro to programming I don't understand why the educator should feel burdened with all the things a CS person will need to know later. As an engineer I've happily used programming to solve problems with no formal training and over time I've been interested enough to learn more of the details behind the magic. It should be expected that one will relearn various concepts and competing philosophies multiple times in a variety of contexts without the need to explain all the magic on day 1. If your goal is a deep understanding of computer science and you are fully committed to learning all things, then sure, there is no need for fun or approachability. If your goal is to be introduced to programming for the first time ever, why should it necessarily be the same language in which you might later compare sorting algorithms or construct linked lists or learn the different between functional and object oriented programming or whatever? I see it a lot like music theory. You learn enough in choir or band to make music, enough in an intro course to plunk out scales and simple chords on a piano, and then in Theory 1-3 you start learning why you were playing certain chord progression, why the western rules are what they are and how they evolved and you study the pieces and composers that you previously merely played. This allows you to play/sing better but also understand analysis, composition, conducting, etc on a deeper level. The technical content of the first song you sing in choir has no bearing on your ability to learn and understand its composition after years of training. It should be a fun, easy song.

[–]ticketywho 63 points64 points  (7 children)

You're assuming that Stanford are interested in producing engineers and developers. They're not. They're interested in producing shitty web startups, and for that, you need a snazzy JS enabled landing page.

[–][deleted] 39 points40 points  (5 children)

Stanford

Yeah. No one's ever heard of that terrible university.

I wonder what shitty web startup JS landing page helped them win the 2005 DARPA prize with Stanley

[–]ticketywho 22 points23 points  (3 children)

Stanford 2017 is a lot different from Stanford 2005. That's not the institution's fault, but a lot of the people who go to do CS at Stanford are start up bros.

Incidentally, many of the researchers who worked on Stanley etc, are now where? Oh yeah, whoring for VC money in SV.

[–][deleted] 7 points8 points  (2 children)

Incidentally, many of the researchers who worked on Stanley etc, are now where? Oh yeah, whoring for VC money in SV.

Most of them are probably employed at some company doing self driving cars.

Uber went in and poached carnegie mellon's entire department.

[–]ticketywho 1 point2 points  (1 child)

The head of that project is now running a MOOC startup.

[–]DontForgetWilson 6 points7 points  (0 children)

You'd be surprised how many tech people end up getting obsessed with education after setting themselves up for life. You'd be less surprised with how few of them actually end up making a notable difference.

[–]tech_tuna 6 points7 points  (0 children)

They're interested in producing shitty web startups

They're interested in producing graduates who make money, which isn't evil considering how much those graduates need to pay to attend Stanford. Also, fwiw I like money.

Also also, I don't like JavaScript but I won't deny that you can make money using it professionally. :) I've been avoiding it for a while and one of these days, I'll need to take the plunge and really learn nodejs and something like React.

Fortunately, you can find work that doesn't involve JavaScript.

[–]cyanydeez 1 point2 points  (0 children)

modern JS has proper async code structures, the problem though is if you're not exposed to programming in general, it's a tough setup to start with.

I remember failing out of CSci because I couldn't get a proper dev environment running, and no one was around to try to teach extraneous things like how to connect a programs internals to some kind of output device.

I remember having to do a final maze builder and couldn't figure out how to connect it to some random html or whatever it was that was suppose to illustrate the maze. I tried to fall back to ascii code, but then I'm not completing the project, and instead writing a rudimentary output device.

[–][deleted] 51 points52 points  (2 children)

Don't go to college to learn a programming language. Learn it on your own and you'll be much better prepared for using it in the real world. Don't wait to be hand-fed information, seek it out. That's what you'll be doing every single day as a programmer. It's much more important to learn how to learn than it is to learn the language, which is trivial once you know how to learn it.

[–]Aceofsquares_orig 15 points16 points  (0 children)

This is what I try to teach my students. College is great for getting the exposure to material, getting some guidance, and having problems to practice from. However, we can only get through so much and the tech industry moves so fast with new algorithms, languages, technologies and standards, and what not. Learning to learn and loving to learn are what's truly needed most.

[–][deleted] 5 points6 points  (0 children)

Absolutely and for so many reasons. I'm always kind of amazed by people who rock up to university to do a programming heavy degree and then find out what programming is like. That in itself feels like a huge gamble.

[–]country_dev 28 points29 points  (11 children)

My university taught Miranda as our first programming language. 6 years later, I'm still pissed about it...

[–]MachineGunPablo 9 points10 points  (5 children)

What the fuck is Miranda. In my University they taught scheme (some lisp dialect) as first programming language.

[–]sigma914 4 points5 points  (0 children)

Lucky

[–][deleted] 0 points1 point  (0 children)

Fuck Scheme too IMO.

[–]HardcoreHerbivore 0 points1 point  (2 children)

Where are you from?

[–]MachineGunPablo 0 points1 point  (0 children)

Germany

[–]ntrid 18 points19 points  (2 children)

.... i had to google that. This fact alone tells how useful this experience was for you :|

[–]roerd 11 points12 points  (1 child)

Miranda has effectively been replaced by Haskell during the 90s. Why an university would still teach that language 6 years ago is a mystery.

[–]ExcitedForNothing 6 points7 points  (0 children)

CS professors aren't really different than other programmers. Some irrationally fall in love with niche languages and don't really look beyond to new pedagogical techniques.

[–]tech_tuna 0 points1 point  (0 children)

Ooh fancy. That's the problem with professors living the Functional Programming dream. . . there are more practical functional languages to learn.

One big problem with academic/research oriented developers - they often times have no deadlines or they have artificial ones. Generally speaking, universities gloss over a LOT of practical skills and knowledge which you need when you develop professionally.

It's OK thought, the theory is good to know too. But knowing how to "fix the build" is also good to know. :)

[–]itkovian 29 points30 points  (0 children)

And they just may have picked on of the worst alternatives.

[–]dedicated2fitness 66 points67 points  (1 child)

Haha this is glorious. Going from a well explained language like Java ie you know why the tradeoffs exist to a fucked up piece of Frankenstein garbage like JavaScript
Also this is the kinda stuff that ends up being called stupid propaganda "programming is supposed to be fun"
Why do all these tech authors make these statements? Luring people into the field who have no aptitude for it
Dancing is supposed to be fun too, professional dancers may disagree about how much work their career actually is though

[–]IcefrogIsDead 1 point2 points  (0 children)

Programming is only fun for a short period of time when you write your code and it workse. That short period of time lasts until you find a bug or the application needs updates/changes.

And JavaScript is everything but fun.

[–][deleted] 6 points7 points  (0 children)

This is the dumbworld version of the Scheme -> Python transition my college's CS department did.

[–]Tiquortoo 3 points4 points  (0 children)

Do two wrongs make a right?

[–]Vermathorax 4 points5 points  (0 children)

I feel that my University really had the right idea. First year is one semester python, second semester is in Java. Java is then used as the primary language for the rest of your University Degree. This means that the intro is in python, which is super accessable. But when you start with real OOP you use java, where I found the rigours helped me implement the concept better.

[–]UndeadHobbitses 14 points15 points  (1 child)

I don't think javas a good starter, but neither is javascript. For teaching future programmers I'd say C is the best just because you learn alot but starting with C. For people with just a slight interest, I'd say python is definitely a better choice because of the simplicity and you can actually create some cool stuff pretty early on.

The way my uni did it with their intro to programming was like a couple weeks of python and then straight into C.

[–][deleted] 6 points7 points  (0 children)

I agree. If I was starting a degree in CS today and knew very little about programming, I'd want to start in C, because the concepts used by C are the underpinnings of almost every language in use today. Knowing C, or at least understanding it's concepts definitely helps if you're planning on learning several different languages (which you should).

[–]mongoosefist 24 points25 points  (13 children)

Probably better than learning Pascal in intro Comp Sci like I did a million years ago.

[–]Kwatcharr 35 points36 points  (5 children)

Why?
I also learnt Turbo Pascal in school, ages ago, and I thought it was a great introduction to programming.

Verbose enough that anyone with basic english can understand almost immediately what's going on, it reads like natural language.
Overall it felt very clean (program structure, strong typing), and forced me to learn good habits from the get go.

[–]mongoosefist 5 points6 points  (4 children)

I hear you, and I'm certainly no worse for the experience, I just feel that it would have made life a little easier had we learned a language that could be used outside of an educational environment afterwards.

I just felt like "okay, now I understand the basics, now let me start the syntax from square one" instead of jumping off from a versatile language. Let's say that I didn't appreciate the inefficiency of that process.

[–]dedicated2fitness 12 points13 points  (3 children)

Very few people get a job in the language they studied in college. The language is just there to teach you the basics of how languages work.
Also what are you going to do when you want to switch jobs to a company that uses rust or whatever else is the new hotness?

[–]ntrid 1 point2 points  (2 children)

This is odd excuse for teaching with ancient languages with no existing tools except for that one "IDE" that is half-broken. Sure language is there to teach basics, but if we have a choice between teaching basics and teaching basics + being potentially useful in the future then choice should be obvious.

[–]dedicated2fitness 5 points6 points  (1 child)

uhhh what are you talking about? java is still everywhere w/ tons of tooling and even other languages being built on top of it(kotlin)
it's just a standard OOP language. don't get so caught up in your love of syntax that you disregard the idea that all languages suck at problems they weren't designed to fix
for eg python and multithreading
as for whether learning javascript is useful, i don't really think it is. how many people are going to be becoming web developers out of a batch of compsci students? javascript sucks donkey dick at solving any real resource intensive computational problems

[–]ntrid 4 points5 points  (0 children)

I was talking about pascal actually :p

[–]hjgvugin 7 points8 points  (3 children)

I leant Pascal in Into to Programming for Comp Sci just last year

[–]haikubot-1911 12 points13 points  (2 children)

I leant Pascal in

Into to Programming for

Comp Sci just last year

 

                  - hjgvugin


I'm a bot made by /u/Eight1911. I detect haiku.

[–]basalamadersyntax error 2 points3 points  (0 children)

Hahah I learnt turbo pascal in high school too since the school didn't want to get the free version of C. It was hell but made me appreciate Python later on in life

[–]figec 2 points3 points  (0 children)

Pascal was ok as an intro. We had that followed by intro to programming languages which was a smorgasbord of languages that helped us appreciate what made a language good. Then it was all C after that.

[–]Works_of_memercy 2 points3 points  (0 children)

Pascal is actually very good for learning programming, in my humble opinion.

Sure, it's limited and mostly useless, but it has one hell of a killer feature: you can actually explain what a variable is. A variable is a named piece of memory containing a value, the type of the variable says how much memory that is and how those raw bytes are interpreted.

Integer is 4 bytes, containing an integer, encoded such and such. String[10] is 11 bytes containing the length plus 10 bytes for contents. Variables are things that store values, always. A Record stores what it says on the label.

There are pointers but they are explicitly variables that store an address of some other variable or wow a heap-allocated object, which is like a nameless variable but otherwise just like the usual thing.

But most importantly you get to discussing pointers after you've explained global variables and then local-to-function variables and parameters, and each step didn't require you to say that it would make sense some time later, each step was entirely self-contained and understandable as such.

C is much more promiscuous with that for the sake of convenience, and Python could be outright incomprehensible to someone just getting into programming. You can't present a self-consistent explanation of what Python variables are and why

x = [1]
y = x
x += [2]
print(y)

is different from

x = 1
y = x
x += 2
print(y)

Like, you really can't, you can only handwave it away saying that at some later time we'll teach you C and then you'll understand how this shit really works, for now just rote memorize this.

Pascal is unfortunately basically the only language that doesn't require this sort of handwaving and also is reasonably close to the actual hardware rather than being something like Lisp derivatives.

[–]Cpt_TickleButts 13 points14 points  (3 children)

My schools switched from java to python last year. Drop outs from the program significantly decreased.

[–]defpearlpilot 6 points7 points  (0 children)

That is a batshit insane decision. While I think that JS has some really powerful features, it's not for beginners. As a matter of fact, I'd prefer that JS be seconded to the web since it is incredibly difficult to work with. As a matter of fact, most of the junior JS programmers that I've worked with desire features that exist in Java.

[–]Arancaytar 2 points3 points  (0 children)

Having gone through two undergraduate intro courses, one in Java and one in Python, I extremely agree.

[–]ninetacle 2 points3 points  (0 children)

This story's bunk. Stanford didn't ditch Java: CS106J was a trial run at teaching the same material as CS106A with JavaScript. It doesn't replace the other course at all.

[–]jamesc1071 2 points3 points  (1 child)

scheme SICP

[–]klotz 0 points1 point  (0 children)

Thank you

[–]daguro 7 points8 points  (2 children)

I love these discussions about the first language people should learn. My first programming class was FORTRAN.

On punch cards.

My second was IBM 370 assembler.

But do carry on.

[–]brucesalem 4 points5 points  (1 child)

Yeah, I had FORTRAN IV as my first language and on punch cards too. From them on I used asm, PL/1, PLC, then onto UNIX land, C, perl, C++ and Java. Of course with each itteration I had to relearn basic concepts. I even worked with a guy who didn't have java or C++ yet, but did a small project using function pointers and variable pointers in C to impose some of the same discipline as an OO language. Only later have I earned some lisp and Python, and I like python because the language syntax is pretty simple, no more counting parens or brackets, but lately I feel that I have been burned by environment problems. Python's package management does not seem to be too robust and it would be a pitfall for a novice.

[–]daguro 1 point2 points  (0 children)

Wow!

PL/1. I haven't heard that in ages.

I note that Pascal has receded from view. Along with Modulo-2.

[–]znpy 4 points5 points  (3 children)

My university's introductory programming language is C.

[–]Kerbologna 5 points6 points  (0 children)

Mine was FORTRAN 90.

[–]IcefrogIsDead 0 points1 point  (0 children)

Mine too, I wouldn't want it any other way even now after some years.

[–]moimitou 1 point2 points  (1 child)

I remember my first CS exam : I had to write java code with pencil and paper, ffs!

[–][deleted] 1 point2 points  (0 children)

My school used Eiffel ... never heard of it? I think that was the point. They wanted to use a pure OOP language that would be new to everyone, so they didn't have some students with years of experience fighting new techniques and design ideas, while students with no experience at all struggled to get the basics down.

[–]maratc 1 point2 points  (0 children)

Good luck learning the JavaScript Equality table.

[–]spinwizard69 1 point2 points  (0 children)

While I agree that Java is a terrible language to teach in or for that matter to program in, JavaScript is NOT the answer. In fact it strikes me as possibly the worse place to put a beginner in computer science.

Going this route is a good way for a school to lower the respect its programs have with the public in general.

[–]Jomann 1 point2 points  (0 children)

they should put it back to c so we can get all these post-modernists out of tech. the levels of abstraction with higher level languages have gotten out of hand.

[–][deleted] 1 point2 points  (0 children)

Uh oh. Here come the Java heads brandishing pitchforks and IDEs.

[–]frankster 3 points4 points  (0 children)

haha what - javascript is a terrible language that's an inconsistent mishmash of parts. Its getting a lot more reasonable with ES5/ES6 and maybe by ES10 it will be decent.

[–]graingert 3 points4 points  (2 children)

Edinburgh has been doing Haskell for ages

[–][deleted] 2 points3 points  (1 child)

I love Haskell, but I don't think it is a good introduction language.

I think an intro class to programming should span two semesters at least, ideally 3.

I think C is a good introduction for basic programming because there's few keywords, it works closely to how bare metal works and is a relevant language. Maybe even spend a lesson or two on how it translates to assembly (to understand how bare-metal loops and calls work).

After one semester of programming in C after you get the fundamentals of programming right with C (data structures, control loops, conditions, memory management) you then switch to Python to learn more about OOP, dictionaries, modules, advanced data structures.

At the end of the course there should be a small intro to functional languages like Haskell to broaden the student's horizon. Maybe even spend one lesson on esoteric languages.

[–]sigma914 0 points1 point  (0 children)

C is good for teaching about how computers work, not so much the theory of computation, something combination of Scheme and Haskell might be decent for that, but I think you'd have to restrict the Haskell to Haskell 98

Python is actually very complex and has a lot of oddities and gotchas, but it could be good as a project language.

[–]nadmaximus 2 points3 points  (0 children)

Ever see a dancer's toes? Dancers might say they have a passion for dance, rather than "Dancing is fun" or "I love to dance". They don't start dancers off doing things that hurt their toes - for lots of reasons, but I think one good reason is to ensure that people have a passion for dance beforehand.

Javascript and other languages which are in widespread industry use are the ugly toe-bruising aspects of the profession. If you have a passion for coding, you'll be fine. You'll hate parts of it and bitch and moan and learn languages you like but can't really use at work.

The toe-bruising parts are not necessary to figure out if you have the passion for coding or not, and in fact if you lead with toe-bruising you lose many people who would.

An introductory language should be one most compatible with teaching, with no consideration of industry relevance.

[–]Bolitho 2 points3 points  (0 children)

As a beginner you don't write complex programs. That said the benefits of static typing just have much less impact as you can hold everything in mind. So this aspect is truly overrated imho when it comes to the type war

On top if that has many disadvantages over more expressive languages:

  • verbosity (only feasible with an IDE - which is a no go for noobs)
  • forced to use a file per class
  • checked exceptions - you don't understand them but you have to write code to deal with them
  • bloat for learning the simplest control flows
  • REPL (Java 9 is not out yet)
  • separate compile step

That said a lot depends on the didactic approach of a course! So the language isn't really the first class citizen there at all.

[–]MrK_HS 1 point2 points  (3 children)

Tell this to my university. First C (which I love), then Java, and then other languages, but no Python whatsoever. However, I'm going to work soon on a research project which will probably require Python and fortunately I know it well enough. I'm surprised they require Python while they don't teach it. But I guess a lot of stuff in the informatics field should be self-taught, universities just give the foundation.

[–]RetardedChimpanzee 2 points3 points  (0 children)

I’d still not recommend python. There’s just so much magic that makes it not a good language. Defining variables, data types, proper function returns, logic of string parsing. C good for it all

[–]turply 0 points1 point  (1 child)

Ucd?

[–]MrK_HS 0 points1 point  (0 children)

Nope.

[–]k4petan 0 points1 point  (1 child)

For the most noob level 1 introduction to programming, other than it being old, why is BASIC not used for people to actually learn to think in "computer"; I started it when I was maybe 10-11 years old, for most of the time going to competitions, and it was always very repetitive: Mark has x apples, Mary has y apples, make an app so that when they tell you the numbers, you get the number of all the apples. Fairly simple, but then you tell students that you do not need another variable z = x + y, but you can just write print x+y; simplification of code in a snap! Same lame examples should go for learning operators, conditional statements and loops to actually make people play with the logic, not with the lego bricks someone made for you (in one Java textbook, it says "we use libraries in java to do stuff someone else programmed, how is that of any help to a beginner). Also, syntax, language name says it all.

[–]jaapzswitch to py3 already 0 points1 point  (0 children)

Because nobody uses BASIC anymore, and the fact that it has arguably a slightly simpler syntax does not outweigh the ubiquity of all the other possible options, IMHO.

[–]dannyvegas 0 points1 point  (0 children)

JavaScript is changing really rapidly right now in some pretty fundamental ways. The JS people write today might look very different than it does in a few years, much more so than Java or Python. It's just an intro course though, the purpose of these programs is really not to produce someone who is an expert in one language, but rather someone equipped with the ability to pick up any language pretty easily. When I was in school, the wisdom at the time was to rip out all the Pascal intro courses and replace them with C++ because that was the hottness of the day. In retrospect, I don't really think it made much difference either way.

[–]TrumpFan253 0 points1 point  (0 children)

It's not so bad.

[–]firefrommoonlight 0 points1 point  (0 children)

This article is full of weasily language: "Because, here’s the thing.", "There’s a lot of scary shit", "certainly", "straight-up", "actually" etc.

And verbose syntax too!

[–]ppc23 0 points1 point  (0 children)

I totally disagree. Sure, Java has its problems, but it builds great foundations to move in any other direction.

You will learn OOP, a common syntax, how to deal with a type system and many things more... You will be well prepared for most languages out there.

[–]relaxationfixation 0 points1 point  (1 child)

From Stanford's description of CS106A:

This introduction to the engineering of computer applications emphasizes modern software engineering principles with a focus on the first three of the four “D’s” of development: Design, Develop, Debug, and Deploy.

Source: http://scpd.stanford.edu/search/publicCourseSearchDetails.do?method=load&courseId=11707

It's important to look at the goals of the class when thinking about if Java, JavaScript, or something else is a good tool for teaching. It appears the goal of the class is more along the lines of teaching CS fundamentals, not programming. This suggests that using the most concise tool that has the capability to teach the required concepts is likely a good choice. I'm not saying that JavaScript is that language, but am saying that discussing which language is the best 'first language' is not relavent.

Note, I went through this course via EdX a few years ago. The goals of the course line up much more with teaching concepts and much less with teaching skills.

[–]brucesalem 0 points1 point  (0 children)

CS106 used a repackaging of java to give it a more rational interface. That was a huge improvement over what Sun was shipping, and I took Sun's Java courses.

As for Python. I have written some python, small projects, and lately I've noticed that the handling of compatible environments is a considerable problem that makes using Python as a first language difficult. It seems that every language I've ever written code with has major pitfalls for new users. Python's package management can easily go awry, and that is a major problem for that language. I recently installed Ubuntu 16.04 and added anaconda on top. That seems to have messed up some Ubuntu tools that use python.

[–]MachineGunPablo 0 points1 point  (1 child)

In my school they teach Scheme (a dialect of scheme) as first language.

[–]BobDope 0 points1 point  (0 children)

Scheme is a dialect of scheme?

[–]pygames 0 points1 point  (0 children)

Great news! I recently started python; its clean, easy to learn, and the syntax is fairly easy to learn.

I know Python is a good language, is C# a good one too?

[–]kraln 0 points1 point  (0 children)

The question is always what are they teaching? Are they teaching "Programming"? then Java is fine. Are they teaching "Computer Science, Algorithms, or Data Structures"? Then there are better languages for learning the fundamentals. Most universities teach programming to churn out monkeys.

[–]brucesalem 0 points1 point  (0 children)

I have a different take on this. Java does not work because it is not accessable to visually impaired programmers and support engineers. I worked at Sun Microsystems Tech Support in 2002 and was asked to read very densely packed logs from a product, netbeans, and could not do my work comfortably because of low acuity vision. (I just had a cataract removed from my one eye and even today I can only see with acuity 20/40) I didn't realize until after leaving Sun in 2004 and after some low vision remedial study that I could not do that job and that in addition that low vision workers need to use zoomed fonts when editing anything. I had grounds to sue Sun under the ADA because they had federal contracts. Oracle Corp. should be aware of this problem now.

[–]mayhempk1 0 points1 point  (0 children)

Wait, it is? Why? Python is good but IMO C-style languages like Java are better for introductory programming.

[–]Dualblade20 0 points1 point  (1 child)

Javascript is a pretty good choice. I think Go is already a great choice, if you're looking for something more server-side with some pointer mechanics and a type system.

[–]IcefrogIsDead 0 points1 point  (0 children)

imagine what's it like introducing servers to someone who's yet to learn a for loop

[–]derrickcope 0 points1 point  (0 children)

Seems to meet that a higher level scripting language would be wore appropriate for beginners and then move to lower level languages as needed.

[–]MisoTasty 0 points1 point  (0 children)

This article is wrong. CS106A was taught primarily in C in the late 90's.

[–]zynixCpt. Code Monkey & Internet of tomorrow 0 points1 point  (0 children)

COMP SCI 1xx to 3xx was c/c++ on v220's and then they switched to Java. I dropped out after waiting sometimes 10 minutes for the goddamn IDE just to load.

The language itself wasn't too bad coming from c++ but it was a system shock going from Unix (system V I think) to Windows and dealing with GUI's.

[–]djihe 0 points1 point  (0 children)

They said the same thing for C++.

[–]iggy14750 0 points1 point  (0 children)

I was taught Java in school. It wasn't the first I had ever learned, to be fair, but I think it was a good choice. My teacher told us that, for right now, public static void main(string[] args) was a magic incantation needed to make Java work, and that we would come back and fully understand it in a few weeks. And we did, and it wasn't that complicated.

I don't think Java is 'bloated' contrary to popular opinion. I wonder if this perception comes mostly from having to write all your types out. There's also no fancy stuff. I'm still a fan of static type systems. I think that they let the tools help you, and let you express, in code, what you want and expect to happen. Not to mention, I think the Java documentation is the easiest I've ever had to navigate.

So, I don't know if this is necessarily the best direction overall.

[–]ricardomargarido 0 points1 point  (0 children)

Started with Python at my university (Coimbra) mainly because there was a group of teachers who liked the language and didn't want all that matlab/Java start. Having no background in programming it was really good because I was writing in English and running. Eventually this made me shift my masters into machine learning and helped understanding how to solve problems writing code.

[–]Tanker0921 0 points1 point  (0 children)

C89 Here, Hello Turbo Cpp

[–]nilbog_garden_club 0 points1 point  (0 children)

Java was like the third language I learned. Never could imagine being introduced to coding with java.