CS559 in JavaScript

Warning: this page didn't transfer directly, so I had to re-create it.

For this year, CS 559 will be using web-based technologies exclusively for the programming assignments and projects in class.

Yes, that means no C++ - you'll be programming in JavaScript.

We won't teach you much JavaScript, but you will need to learn a bit. We'll also provide you with some help in learning it (see below).

In the past, we didn't teach people C++, and just expected them to figure it out. While many people survived the experience, it was often a disaster. See https://graphics.cs.wisc.edu/Courses/559-f2010/posts/main-cpp/  for some philosophy on C++. If you were hoping for an excuse to learn C++, sorry.

There are a lot of reasons why JavaScript should be a superior choice for 559:

  1. We don't have the pragmatic issues of trying to get everyone to use the same compiler, libraries, operations system, toolkits, ... Everyone has a web browser.
  2. We don't have to restrict people to the CSL Windows 7 computers. You can develop anywhere. We can run your demos anywhere. You can show your cool projects to people anywhere!
  3. The technologies for supporting graphics programming are more accessible. We don't need image loading libraries, or windowing toolkits, or to worry about driver versions, or ....
  4. The language gets in the way less for learning graphics.
  5. We will have fewer compatibility issues.
  6. Giving students experience with Web Development is giving them a useful skill.
  7. There are many graphics libraries available, including a version of OpenGL (called WebGL), as well as others. And its easy to use these.
  8. We don’t have to worry about forcing students to
  9. It's a modern, functional, memory managed language with impressive compilers, good debuggers (integrated into the web browsers!), and has lots and lots of resources on the web. JavaScript is not so bad.

OK, there are downsides:

  1. Students associate C++ for graphics, and want it for "game engine" programming. But this isn't really a good reason: few people develop new game engines, and even a good reason: the number of people who develop low level graphics engines is small. And many of these are designed so that most of the programming is done in higher level languages.
  2. We did C++ for 15 years. We have a lot of experience. We have a lot of example code and project frameworks. This means that
  3. I am not an expert JavaScript programmer - I will be learning along with you!

If you’re concerned that JavaScript isn’t a “real language” or a “good enough language” – think again. JavaScript has its problems (all practical languages do), but its benefits outweigh its problems. JavaScript’s flexibility makes it really easy to do bad things, but it also makes it possible to design very nice things. The excess flexibility is frustrating at times, and often leads to buggy code.

from "JavaScript, the Good Parts", p2 (this is a book you should read, by the way):

JavaScript is most despised because it isn’t some other language. If you are good in some other language and you have to program in an environment that only supports JavaScript, then you are forced to use JavaScript, and that is annoying. Most people in that situation don’t even bother to learn JavaScript first, and then they are surprised when JavaScript turns out to have significant differences from the some other language they would rather be using, and that those differences matter.
The amazing thing about JavaScript is that it is possible to get work done with it without knowing much about the language, or even knowing much about programming. It is a language with enormous expressive power. It is even better when you know what you’re doing. Programming is difficult business. It should never be undertaken in ignorance.

Learning Javascript:

If you need to learn Javascript - or you need to learn more Javascript - you are in luck. Because Javascript is so ubiquitous, there are tons of resources available. Many of them are free on the web.

We will provide suggestions: books, websites, tutorials that we like.

We will also provide you with tons of example code. In general, for 559 you won't write anything from scratch. We'll give you examples and a good starting point.

But, we will also provide you with the option to learn Javascript in a more traditional setting of a class.

559 and 638

There is a tradition in 559 of making students pick up a new programming language in order to do the assignments for the class. Historically, we have provided a little help (pointers to books, help sessions). This semester we will try to provide another option.

We are going to offer a 1 credit class (a section of CS638) that will "teach" Javascript and Web programming. Another way to phrase it is: if you're going to spend the time learning Javascript, you might want to get credit for it. For this semester, it will be offered with a 638 number and be offered Pass/Fail only. In the future, it may get it's own number, or it might be a 368 (Learning a New Programming Language) section.

If you're a 559 student, taking 638 is optional. We expect that students will be able to succeed in 559 the "old fashioned way" of teaching themselves enough of the new programming language.

We also appreciate that many students won't be able to sign up for 638 because of the timing. We're only telling you about this now (late August), so you might not be able to fit a 2:30 Tuesday class onto your schedule. You are welcome (encouraged) to look at the readings and assignments for the class, even if you aren't taking it.

We will take care such that 559 students who are not signed up for 638 will not be at a disadvantage (other than, missing out on some Javascript experience that they could get elsewhere).

If you do sign up for 559 and 638, we will try to make it overlap well. For many of the 638 assignments, you will be able to use your 559 assignments.