6 ms·
Stanford's CS 101 course uses Javascript
- pingswept 15y agoThis course is not the first CS course that most Stanford students (who take a CS course) take-- that's CS106A, which is based on Java. This CS101 class is a small, recent addition aimed at people in non-technical majors. I believe there's only one class of ~30 people, taught by Nick Parlante. The full CS course listings are here: http://explorecourses.stanford.edu/CourseSearch/search;jsessionid=C05909CBF4C2E990D48059C809E93A19?view=catalog&catalog=&page=0&q=CS&filter-catalognumber-CS=on&filter-coursestatus-Active=on http://explorecourses.stanford.edu/CourseSearch/search;jsess...
- fossuser 15y agoI always thought it was interesting that a lot of the top CS schools seem to use Java as their teaching language rather than C++ (or C). I've heard that MIT is using python (switched from scheme) and I know the University of Chicago uses Scheme. My school (RPI) uses C++, but I don't know anyone else who does. I recognize that the teaching language is largely irrelevant to the material, but I wonder why the departments choose the different languages.
- wisty 15y agoThere are a few factors - whether the academics are in love with some particular language (i.e. Haskell, Eiffel, Smalltalk, or Lisp); whether there is pressure to use a language that will help students "hit the ground running" (i.e. industry buzz words that may be obsolete by the time the students graduate, or Java/C#); and whether it's easy to teach.
- hatter10_6 15y agoCS106B, which is the second course at Stanford CS, is on C++.
- arihant 15y agoThat's only true for introductory and some algorithms courses. After that, it diverges mostly into C and a bunch of custom languages, such as MATLAB for theoretical courses. I go to CMU and I haven't really touched Java since freshmen year. But upperclassmen CS is still done in C majorly. Yes, MIT shifted to Python for intro level CS classes. CMU is doing that following this fall.
- fossuser 15y agoThanks, I suspected this might be the case. How you like CMU?
- turnersr 15y agoUniversity of Chicago also uses Haskell, C, Python, and AWK.
- razzmataz 15y agoMichigan State has two intro classes now, one in python and a follow on class in C++.
- mtinkerhess 15y agoThe University of Michigan is also pretty heavily C++.
- akavi 15y agoYale (not considered a top CS school, I know) still uses scheme for its introductory classes. With both Berkeley and MIT switching away, I wonder if Yale's one of the last holdouts. I'm not sure I agree with you that language is irrelevant to material. I definitely notice the influence of scheme on my thought-processes when programming.
- jorgeortiz85 15y agoStanford's intro CS sequence is CS106A, CS106B, CS107, and CS108. 106A is taught it Java. (It was taught in C until 2004. It's nice to be able to teach for-loops without also having to explain pointers.) 106B is taught in C++. 107 is now the first introduction CS students get to C and Unix. While 106B focuses on basic algorithms and learning to use abstractions, 107 goes into the guts of low-level C. 108 is on OOP and is taught in Java. Higher level classes are either in C++ (all the systems classes) or Java (e.g., Natural Langauge Processing).
- rasmusrygaard 15y ago108 is not actually part of the core. The third required systems class is CS110, Principles of Computer Systems, which is also taught in C.
- mkjones 15y agoIt's worth noting that at least CS140 / operating systems (and I think some other systems classes - networking?) are taught in C, not C++.
- zerovox 15y agoAt my university (Oxford University) in the first year they teach Haskell in the first term, Oberon in the second and finally Java in the third term.
- emplynx 15y agoMy school (http://gcc.edu/ http://gcc.edu/) used C++ in intro classes (circa 2004).
- sarsntony 15y agoCMU recently changed from java to python as well. Personally, I think python is better than java in terms of educational purposes
- wollw 15y agoThe local (to me) junior college (http://www.santarosa.edu http://www.santarosa.edu) and college (http://www.sonoma.edu http://www.sonoma.edu) both start out by teaching C++.
- alexbowman 15y agoImperial College Joint Maths Computing first year was Haskell, Turing, Fortran, Mathematica. And was undocumented - no books, had to turn up to the lecture and scribble. That was 1997, I have no idea what's done there now.
- roundsquare 15y agoWhen I was a freshmen at Cornell (2002) there were two possible intro classes: CS 101M was half java and half matlab CS 101J was mostly java with a week or two of matlab (recommended for CS majors) After this class (or the AP test) our next two classes to qualify for the major were in Java and SMLNJ. Interestingly, our algorithms class (considered upper level but required) was purely theoretical (no programming at all).
- yaix 15y agoThink about performance for (var x = 0; x < im.getWidth(); x++) { for (var y = 0; y < im.getHeight(); y++) { That would repeatedly call the get*() methods, and for a 1000x1000px image, that is a lot of calls. Better call them once and then use variables for the loop boundaries. var w = im.getWidth() var h = im.getHeight() for (var x = 0; x < w; x++) { for (var y = 0; y < h; y++) {
- danking00 15y agoYour insight into performance is obviously good, but I'd rather see the students focus on writing code which is obvious to them and have the compiler/interpreter realize there's a ton of redone work. I think you can do this with flow analysis.
- pgbovine 15y agothe compiler also needs to figure out that getWidth() and getHeight() are pure. but yes, i agree with you that for an intro class, students should focus on writing clear code and then optimizing for performance later.
- kmfrk 15y agoIt shouldn't confuse students with optimization advice, but with the authority the lecture holds on malleable students, your asterisk should still be mentioned as an FYI for good measure.
- sheffield 15y agoI find the efficient version much clearer, too. It extracts one layer of abstraction: a beginner may wondering, how can a variable being less than a function (a<func()), then find out, that the function returns a value, etc. Two more lines worth it.
- danking00 15y agoI've been back and forth about how to respond to your comment. My initial reaction was "'func()' is a call and therefore returns an expression." Having thought about it, I don't really remember what my neophyte reaction would have been.
- danking00 15y agoThe approach of WeScheme is very different, but they provide syntax highlighting and saving code files. It'd be great if this guy can borrow some of their work. http://www.wescheme.org/ http://www.wescheme.org/
- hmart 15y agogreat!!! I'm fan of Nick Parlante work the old javabat.com now http://codingbat.com/ http://codingbat.com/ and the Google Python Class are awesome.
- lucian1900 15y agoIn Newcastle University, they also did this. The only advantage over teaching Python was that they planned to teach us Java later, and the syntax is more similar.
- Goladus 15y agoI would say another advantage of Javascript is that virtually everyone can run Javascript in their browser, while python is a separate environment. There's the step where you have to install the interpreter or at least use something you might never have used before, and there's the step where you have to connect command-line oriented problem-solving with presentation.
- ianl 15y agoAt my university (Dalhousie, Halifax NS), they still use Java for the first 3 classes (CSCI1100,CSCI1101,CSCI2110) which are basic data structure and algorithm classes, they include a mixture of Linked Lists, Binary Trees, Search Algorithms, etc. Afterwards its a mixture of C, C++, Matlab, Perl, and Scheme. Generally the more mathematical based courses like Digital Signal Processing use MATLAB, Operating Systems and Algorithms in C, Graphics (Computer Graphics, Animation, etc) in C++, Object Orientated Programming in C++, and Principles of Programming Languages (Compiler Design, Grammars, Scoping etc..) in Scheme and C/C++. All other courses give the student free reign on what language they choose. It's interesting to note that atleast from my year there seems to be a uniform distribution of C#,C++,Java,Python, and Perl used in these courses. They tend to be the more project based such as Information Retrieval, Network Computing, Software Engineering etc. However, a large amount of the faculty no longer supports Java as the language that is taught in first year computer science (Java and C are the only languages that are taught in class at all) and moving towards Python after they have had great success in the last several years with intro courses for non-cs majors.
- njloof 15y agohttp://www.acsu.buffalo.edu/~jconte/Images/eyes.jpg http://www.acsu.buffalo.edu/~jconte/Images/eyes.jpg
- bauchidgw 15y agofrom the todo list >I need to add the ability to use any image you want, not just the canned ones I have. This is not some feature I just left out. It turns out that the browser/javascript system deliberately screens out access to images coming from other domains i solved this here http://www.barbafan.de/farbzauber/w http://www.barbafan.de/farbzauber/w but yeah, u need some server side code that takes an url and returns the image data as a base64 string, i havent found another workaround yet and i doubt that there is one.
- Seus 15y agoMy university is actually changing the major to Python for the first 3 courses, and then switching over to C++ for the remainder of the program. With our languages class still using Scheme and having to learn an additional 2 scripting languages. Sadly, I took the curriculum when the beginning and through most of it was Java. I guess I just get to learn it on my own then :)
- FrojoS 15y agoGreat! I already liked to try Python in the browser and I was thrilled to find the WeScheme that was posted here. But using something, literally so visual as image processing is an awesome idea. One comment: Maybe, I'm the only person in the world so tired and stupid. But at first I got the impression that it didn't execute in chrome or was so slow that it takes forever. So I fired up Firefox to test it there. Only then, did I realize, that the new computed picture would show up to the right of the code. I had zoomed in too much in chrome. I guess the average Stanford student is smarter, but if you would force the picture to be below the code you might have one source of confusion less.
- gubatron 15y agonoooooooooooooooooooooooo