CS210: Welcome
Table of Contents
Overall Information
CS210 is an undergraduate level introductory programming course. The key words here being undergraduate and introductory. This class does not take for granted your ability to program a computer competently. We will go through in excruciating detail what it means to program a computer and how to do it using the Java programming language.
Goals of This Course
The purpose of this course is to get you from not knowing how to program at all to being capable of reading/writing simple to intermediate Java programs. This means by the end of the course you will have familiarity with all facets of the Java programming language including its syntax, type system, runtime behaviour and much more. You'll also be picking up on general programming practices through the use of popular tooling and techniques. You'll be exposed to programs like make, git, and javac. Towards the end of the semester we'll also be covering a few simple, but essential, data structures including linked lists, stacks, and queues. If all goes well, we'll also learn a bit about Java programming best practices with Effective Java.
Why Java?
A short trip to the TIOBE index shows that there's at least 49 other languages to choose when deciding on a first programming language. To further confound matters, at the School of Computing we teach Python as the beginner programming language for first year computer science majors. So it only feels natural to ask: Why bother learning about Java? Is there something special about Java? Why not continue with Python?
The cop out answer would be that there's no such thing as a "perfect" introductory programming language and we might as well use Java, but that only side steps the question. We can boil down the answer to a few points:
- Java is high level
- Java is imperative
- Java is statically typed
- Java is historically significant
(1) means that Java is easier to read and write than "machine level" languages; (2) means that Java code is represented as step-by-step instructions that affect the state of the program (this behaviour is shared with many other popular languages); (3) means every variable must be explicitly assigned a type by the programmer; (4) means that the Java programming language has been around for a long time and there is quite a lot of legacy code that is still floating around many different firms—in addition to all of the new code written in Java. Since everyone taking this course is looking to get an all around education in computer science all of these points are relevant to your future needs.
Here's a tiny example of a Java program:
1: public class HelloWorld{ 2: public static void main(String args[]){ 3: System.out.println("Hello, World!"); 4: } 5: }