CS 112 is an introductory programming course, using the
C# (pronounced "C sharp")
programming language. There is no
prerequisite for the course -- in particular, no prior programming
experience is required -- although it helps to be "computer
literate."
By the end of the course you should be able to write
C# programs to perform, for example, simple
graphics, and multimedia.
But the focus of the course is
programming concepts, so besides learning
how to write cool artifacts like these you will also learn things like
object-oriented programming (classes, methods, objects, etc.), control
structures (conditionals, looping, recursion, etc.), data types
(arrays, strings, numbers, lists, queues, stacks, etc.), basic
algorithms (sorting, searching, etc.), and some advanced ideas
(exception handling, input/output streams, etc.).
Another good book, which I highly recommand, is:
Additional course materials will be available "on-line," as described below:
You might have heard of the programming language called Java through reading about it in the New York Times. It has received more media attention than probably any other programming language ever. Most of this attention is unfortunately hype, but nevertheless, Java is a good programming language, and has many pedagogical advantages over other languages.
Sun was the company that introduced Java, and understandably it wanted to control its design and evolution. Unfortunately, Microsoft also wanted a piece of the action, and in particular wanted to change Java in certain ways that suited its needs. This situation became a legal nightmare, and eventually Microsoft decided that instead of trying to influence Java, it would simply design its own language, which is called C# (pronounced "C sharp"). This is the language that we will be using in CS-112. It is better than Java in certain ways, but is so similar in most ways that once you have learned how to program in C#, it will be trivial to transfer your knowledge to Java.
You may have also heard of other programming languages, such as BASIC, C, C++, Ada, Lisp, COBOL, FORTRAN, Haskell, ML, and others. Although all of these languages are billed as "general purpose," some are better at certain things than others, and thus one's application often dictates one's choice of a language. For example, in the Computer Science Department at Yale, FORTRAN is taught in CS-130 (for scientific computing), C in CS-323 (systems programming), Lisp in CS-470 (artificial intelligence), Haskell and ML in CS-429 (functional programming), etc. Using this line of reasoning, Java and C# are usually billed as being good at programming the World Wide Web (WWW), i.e. the Internet.
But it so happens that Java and C# are good general-purpose programming languages suitable for much more than just the Internet. They use many recent innovations in programming language design, yet are also simple enough to use in a course such as CS-112. Furthermore, once you know one programming language, it is much easier to learn another. Java and C# have many attractive characteristics, including:
We will be using Microsoft's Visual Studio.NET (VS.NET) integrated development environment (IDE) for C# programming. It is what I will demonstrate in class, and it is what you will use to develop your own programs and turn in homework assignments.
Unfortunately, VS.NET is a large and complex software package. Rather than have every one of you install it on your own machine and to avoid problems with installing it on public machines distributed around campus, we have installed it on three dedicated computer servers that you will be able to login to as a client. The three machines are named as:
cs112-a.cs.yale.edu
cs112-b.cs.yale.edu
cs112-c.cs.yale.edu
In order to log on to these servers, you will have to install
on your machine the client software, which is called
Remote Desktop Connection. This is a relatively
small application and should be very easy to install and it works on
Win9x and higher. The software is usually located in the
Start-->Programs-->Accessories-->Communications
menu.
Alternatively, you can use one of Yale's cluster machines (Windows 2000, Macintosh, and even the Linux machines in the Zoo); all of which already have the Remote Desktop Connection client software installed. Other than the default location mentioned above, the shortcuts to remote desktop client could also be contained in the Start-->Programs-->Instructional Software-->CS112 menu.
After you start the Remote Desktop Connection client, first pick a computer (cs112-a or cs112-b or cs112-c) and click "Connect"; then a new desktop window will show up, with an "ADVISORY" message, click "OK"; after the "Log On to Windows" window shows up, type in your net id and password, and select "YALE" (not "CS112") as the "Log on to" domain, and click "OK", this will log you into the remote computer.
For many of the programming assignments, you can also use a standard editor (e.g., SciTE, Wordpad) to edit your program, use the batch C# compiler (named csc) to compile it to machine code, and finally run the result under the Command Prompt window. The batch compiler is much smaller and available free for download at Microsoft (the whole package is called Microsoft .NET Framework Software Development Kit (SDK), it is 110 MB vs. >3 GB for VS.NET).
Of course, you can also install VS.NET (or .NET Framework SDK) on your own PC (or laptop). Your machine should at least have 256 MB memory and 3.3 GB free disk space. VS.NET is freely available across the Yale campus through the MSDN-AA program (you would need a fast internet connection to download though).
Grading will be based not just on whether your program runs or not, but also on how well it is written: it should be well-structured, documented, and generally easy for someone else to read and understand. In other words, the style of your program is important, and the style guidelines in Appendix G of the text should be used.
There will be two in-class open-book exams. Each homework assignment will be given equal weight. Each exam will be worth two homework assignments. So you see, homework assignments will constitute a large part of your grade!
To allow for the exigencies of computer failures and personal crises, each student will have 10 discretionary late days for homework assignments, but any one assignment may only be up to 3 days late (this is because we will discuss solutions to assignments in class). These are calendar days, not business days. As the homework assignments will be submitted electronically, the "write date" on the student's homework file will be considered the completion date for late assignments. Thus, a student may "hand in" a late assignment on a Saturday or Sunday.
Of course, a Dean's Excuse may be used to wrangle whatever deal you are able from the instructor.
After you use up all of your discretionary late days, assignments turned in late will be graded according to the following formula: S = R * (1 - t / c), where S is the grade given, R is the grade the work would have gotten if turned in on time, t is the amount of time by which the work was late, and c is equal to 6 days. Thus, the value of a late assignment decays daily, with a half-life of just over 3 days. Examples: work turned in five minutes late gets 99.9% credit, one hour late gets 99.3% credit, six hours late gets 95.8% credit, one day late gets 83.4% credit, two days late gets 66.7%, and three days late gets 50.0%. Assignments submitted more than 72 hours late (after the official deadline) will not be accepted, i.e., S = 0.
Do not, under any circumstances, copy another person's program. Writing code for use by another or using another's code in any form violates the University's academic regulations and will be dealt with harshly.
Lecture notes will be made available. Watch for an announcement of their availability.
Please follow the procedure described at this page to submit your solutions to the assignments.
Also, yale.cs.cs112 is a local newsgroup specifically for CS 112. You should read both the course home page and the newsgroup rather frequently as they appear for important information, such as lecture notes, instructions on submitting your assignments, clarifications and hints, last minute schedule changes, etc.
You can use Outlook, Internet Explorer, or netscape to browse yale.cs.cs112. If you live off campus, you can log onto the three cs112 servers and click on the CS112 News icon on your desktop to read news. You can also log onto any Pantheon machine and use rn to read unread news (To view unread articles in yale.cs.cs112 using rn, just type "rn yale.cs.cs112"; if you add the line "rn -c yale.cs.cs112" to your .login file on pantheon, you'll be advised of unread articles in yale.cs.cs112 every time you log in).