Beta

Slashdot: News for Nerds

×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

cancel ×

255 comments

Why not PL/1? (0)

Anonymous Coward | about 3 years ago | (#36724362)

They should be teaching PL/1 or FORTRAN.

Re:Why not PL/1? (1)

crashumbc (1221174) | about 3 years ago | (#36724474)

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

Re:Why not PL/1? (1)

hedley (8715) | about 3 years ago | (#36724816)

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.

Re:Why not PL/1? (1)

sensei moreh (868829) | about 3 years ago | (#36725466)

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

Re:Why not PL/1? (2)

Dast (10275) | about 3 years ago | (#36725676)

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.

Big Improvement! (2, Funny)

Anonymous Coward | about 3 years ago | (#36724390)

When I was in school we had to use ECMAScript!

Re:Big Improvement! (1)

Anonymous Coward | about 3 years ago | (#36724428)

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.

Re:Big Improvement! (1)

oh_my_080980980 (773867) | about 3 years ago | (#36724540)

Dude Javascript is not Java. Javacsript does not run in a virtual machine like java. Do research before posting!

Re:Big Improvement! (1)

SuricouRaven (1897204) | about 3 years ago | (#36724610)

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.

Re:Big Improvement! (1)

myurr (468709) | about 3 years ago | (#36724918)

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.

Re:Big Improvement! (0)

Anonymous Coward | about 3 years ago | (#36724934)

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.

Re:Big Improvement! (0)

Anonymous Coward | about 3 years ago | (#36724626)

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

That's odd. (0)

Anonymous Coward | about 3 years ago | (#36724402)

Given the uncertainty surrounding the future of Javascript.

Ideal IDE (3, Interesting)

vlm (69642) | about 3 years ago | (#36724416)

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.

Re:Ideal IDE (0)

Anonymous Coward | about 3 years ago | (#36724538)

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.

Re:Ideal IDE (3, Funny)

djdanlib (732853) | about 3 years ago | (#36724588)

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.

Re:Ideal IDE (1)

WindBourne (631190) | about 3 years ago | (#36725076)

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.

Re:Ideal IDE (1)

j-pimp (177072) | about 3 years ago | (#36724772)

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

Re:Ideal IDE (3, Insightful)

memyselfandeye (1849868) | about 3 years ago | (#36725062)

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

Re:Ideal IDE (3, Informative)

_0xd0ad (1974778) | about 3 years ago | (#36725142)

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.

Re:Ideal IDE (2)

Bob the Super Hamste (1152367) | about 3 years ago | (#36724628)

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.

Re:Ideal IDE (1)

Dog-Cow (21281) | about 3 years ago | (#36724724)

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.

Re:Ideal IDE (1)

Bob the Super Hamste (1152367) | about 3 years ago | (#36725094)

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.

Re:Ideal IDE (1)

i.r.id10t (595143) | about 3 years ago | (#36724764)

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

Re:Ideal IDE (2, Insightful)

RyuuzakiTetsuya (195424) | about 3 years ago | (#36724636)

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.

Re:Ideal IDE (1)

w_dragon (1802458) | about 3 years ago | (#36724734)

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.

Re:Ideal IDE (1)

RyuuzakiTetsuya (195424) | about 3 years ago | (#36724830)

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.

Re:Ideal IDE (0)

Anonymous Coward | about 3 years ago | (#36725276)

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.

Re:Ideal IDE (0)

Anonymous Coward | about 3 years ago | (#36725380)

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.

Re:Ideal IDE (1)

Richard_at_work (517087) | about 3 years ago | (#36724840)

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.

Re:Ideal IDE (1)

vlm (69642) | about 3 years ago | (#36724942)

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.

Re:Ideal IDE (1)

Inda (580031) | about 3 years ago | (#36725210)

So true.

They should have chosen Perl. ;p

Re:Ideal IDE (1)

drolli (522659) | about 3 years ago | (#36725680)

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.

Re:Ideal IDE (1)

Bill_the_Engineer (772575) | about 3 years ago | (#36725732)

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.

Re:Ideal IDE (1)

kehren77 (814078) | about 3 years ago | (#36724882)

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

Re:Ideal IDE (0)

Anonymous Coward | about 3 years ago | (#36725002)

They were right.

Re:Ideal IDE (1)

gl4ss (559668) | about 3 years ago | (#36724964)

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?

Re:Ideal IDE (3, Informative)

Anonymous Coward | about 3 years ago | (#36725164)

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

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'
};

First programming course? At Stanford?? (2)

sunderland56 (621843) | about 3 years ago | (#36724458)

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

Re:First programming course? At Stanford?? (1)

Anonymous Coward | about 3 years ago | (#36724880)

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.

Re:First programming course? At Stanford?? (1)

Kamiza Ikioi (893310) | about 3 years ago | (#36724966)

George Bush got into Yale. Anything is possible.

Re:First programming course? At Stanford?? (1)

ccguy (1116865) | about 3 years ago | (#36724990)

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

Re:First programming course? At Stanford?? (4, Informative)

Dahamma (304068) | about 3 years ago | (#36724992)

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

Re:First programming course? At Stanford?? (2)

dweinst (218284) | about 3 years ago | (#36725686)

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. ;)

Re:First programming course? At Stanford?? (1)

RockoTDF (1042780) | about 3 years ago | (#36725030)

Yeah, like non-CS majors.

Re:First programming course? At Stanford?? (2)

Betelgeuse (35904) | about 3 years ago | (#36725032)

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.

Re:First programming course? At Stanford?? (1)

idontgno (624372) | about 3 years ago | (#36725268)

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

From C++ to Java to Javascript (0)

Anonymous Coward | about 3 years ago | (#36724460)

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

Good idea... (2)

wsxyz (543068) | about 3 years ago | (#36724462)

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.

Re:Good idea... (0)

Anonymous Coward | about 3 years ago | (#36725482)

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.

Re:Good idea... (1)

DragonWriter (970822) | about 3 years ago | (#36725548)

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.

No compiler? (2)

Mia'cova (691309) | about 3 years ago | (#36724468)

cs101 without even seeing a compiler? Tragic :)

Re:No compiler? (2)

Fantom42 (174630) | about 3 years ago | (#36724614)

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.

Re:No compiler? (2)

vlm (69642) | about 3 years ago | (#36725046)

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.

Re:No compiler? (1)

Trepidity (597) | about 3 years ago | (#36725788)

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.

Re:No compiler? (1)

Z_A_Commando (991404) | about 3 years ago | (#36725140)

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.

Re:No compiler? (1)

Mia'cova (691309) | about 3 years ago | (#36725534)

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.

Re:No compiler? (0)

Anonymous Coward | about 3 years ago | (#36724826)

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

Re:No compiler? (0)

Anonymous Coward | about 3 years ago | (#36724938)

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

Re:No compiler? (1)

MindStalker (22827) | about 3 years ago | (#36725168)

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.

Re:No compiler? (0)

Anonymous Coward | about 3 years ago | (#36725212)

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.

Might be a good thing (1)

Bob the Super Hamste (1152367) | about 3 years ago | (#36724518)

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.

Douglas Crockford explains... (1)

rock_climbing_guy (630276) | about 3 years ago | (#36724524)

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

Re:Douglas Crockford explains... (1)

HellYeahAutomaton (815542) | about 3 years ago | (#36724732)

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.

Re:Douglas Crockford explains... (0)

Anonymous Coward | about 3 years ago | (#36724916)

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.

Re:Douglas Crockford explains... (1)

Tablizer (95088) | about 3 years ago | (#36725776)

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.

whither MIX? (2)

smoothnorman (1670542) | about 3 years ago | (#36724572)

Has Professor Knuth no longer any proper influence over those at Standford? http://en.wikipedia.org/wiki/MIX [wikipedia.org]

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

Re:whither MIX? (1)

Nimey (114278) | about 3 years ago | (#36724834)

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

Re:whither MIX? (3, Insightful)

idontgno (624372) | about 3 years ago | (#36725356)

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

A long way from SICP (1)

cpghost (719344) | about 3 years ago | (#36724708)

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

Re:A long way from SICP (1)

mfwitten (1906728) | about 3 years ago | (#36724904)

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

The things they will NOT learn are interesting (2)

Opportunist (166417) | about 3 years ago | (#36724770)

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.

Re:The things they will NOT learn are interesting (1)

dealmaster00 (904299) | about 3 years ago | (#36724862)

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.

Re:The things they will NOT learn are interesting (1)

halivar (535827) | about 3 years ago | (#36725050)

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.

Re:The things they will NOT learn are interesting (1)

Needlzor (1197267) | about 3 years ago | (#36725154)

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 ?

Re:The things they will NOT learn are interesting (0)

Anonymous Coward | about 3 years ago | (#36725618)

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.

Re:The things they will NOT learn are interesting (2)

wsxyz (543068) | about 3 years ago | (#36725104)

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.

Re:The things they will NOT learn are interesting (0)

Anonymous Coward | about 3 years ago | (#36725298)

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

Re:The things they will NOT learn are interesting (1)

Tablizer (95088) | about 3 years ago | (#36725138)

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

Re:The things they will NOT learn are interesting (1)

drinkypoo (153816) | about 3 years ago | (#36725174)

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.

Re:The things they will NOT learn are interesting (0)

Anonymous Coward | about 3 years ago | (#36725224)

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.

Re:The things they will NOT learn are interesting (1)

Anonymous Coward | about 3 years ago | (#36725542)

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?

Re:The things they will NOT learn are interesting (1)

DragonWriter (970822) | about 3 years ago | (#36725620)

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

Re:The things they will NOT learn are interesting (1)

IICV (652597) | about 3 years ago | (#36725654)

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 [stanford.edu] CS 106, and they'll go on from there - and just guess what's covered [stanford.edu] 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.

Re:The things they will NOT learn are interesting (1)

comp.sci (557773) | about 3 years ago | (#36725770)

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

101 101 101 (0)

Anonymous Coward | about 3 years ago | (#36724790)

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

Javascript on the James Webb Space Telescope (3, Insightful)

ToSeek (529348) | about 3 years ago | (#36724810)

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.

Looks like a solid class (1)

makubesu (1910402) | about 3 years ago | (#36724914)

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.

Know your Stanford classes before pontificating (0)

Anonymous Coward | about 3 years ago | (#36724950)

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.

Good and Bad (0)

Anonymous Coward | about 3 years ago | (#36725060)

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.

firSt!? (-1)

Anonymous Coward | about 3 years ago | (#36725116)

Fas,ter chip

I guess I'm old (1)

idontgno (624372) | about 3 years ago | (#36725190)

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.

Functional programming (0)

Anonymous Coward | about 3 years ago | (#36725220)

It's the way to go.

CS 101 is not the introductory programming course. (0)

Anonymous Coward | about 3 years ago | (#36725300)

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)

What's wrong with JavaScript for CS? (2)

Animats (122034) | about 3 years ago | (#36725386)

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.

Nothing new here (0)

Anonymous Coward | about 3 years ago | (#36725452)

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

Important: This is NOT their "Intro to CS" class (4, Informative)

comp.sci (557773) | about 3 years ago | (#36725698)

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.

Does the specific language really matter much? (1)

FoolishOwl (1698506) | about 3 years ago | (#36725728)

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.

Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Create a Slashdot Account

Loading...