CS 112, Fall 2003. Course Information

CS 112 Course Information, Fall 2003

Last modified: 11/09/2003 10:02 PM -0500.

Content


General Information

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

Title:
CS112: Introduction to Programming (Fall 2003)
 

Lectures:
MWF 10:30 AM-11:20 PM, in DL 220
 

Instructor:
Richard Yang, 202 Watson, 432-6400, yry@cs.yale.edu
Office hours: MW 2:00 PM -3:00 PM or by appt.
General office hours: F 2:30-4:00 PM.
 

Teaching Assistants (TA office hours are held at Dunham 120):

Ana Cerejo,  AKW 5th floor; ana.cerejo@yale.edu
Office hours: T 10:30 AM - 2:00 PM; Th 3:00-4:30 PM or by appt.

Liwen Huang, AKW 313; 432-1267; liwen.huang@yale.edu
Office hours: F 12:00 PM - 5:00 PM or by appt.
 
Diego Montenegro, AKW 5th floor; diego.montenegro@yale.edu
Office hours: MTh 8:00 - 10:30 PM or by appt.

 


Textbooks

The required textbook is:

  • H.M. Deitel, P.J.Deitel, J. Listfield, T.R. Nieto, C. Yaeger, and M. Zlatkina, C# How to Program, 1568 pages, 2002. ISBN: 0130622214, Prentice Hall, Inc.
  • Another good book, which I highly recommand, is:

  • Karli Watson et al, Beginning Visual C#, 903 pages, August 2002. ISBN: 1861007582, Wrox Press Inc.
  • Additional course materials will be available "on-line," as described below:

  • Homework and Grading.  All homework assignments will be available on-line, demonstrated in class, handed in electronically by the students, graded on-line, comments mailed electronically to students on-line, and grades posted on-line for each student to review.

  • Class Lectures.  Many of the class lectures will be conducted on-line, using the projection facilities in the classroom.  The instructor will be able to demonstrate C# programming concepts, and respond interactively to student questions.  Most lecture notes and sample programs will be available to students on-line.

  • Electronic Mail, course Web page, and newsgroup.  Students are encouraged to send electronic mail to the TA if they have problems or questions.   Students typically will receive a response to email within a few hours.  If the question and response may be of general interest to the class, the response may also be posted to the class Web page or newsgroup, which students are encouraged to read regularly.  The class newsgroup is yale.cs.cs112.

  • Software Libraries.  All example programs in the textbook will be available online so you don't have to type it in from scratch to try them out. We will be using the Microsoft Visual Studio.NET software (abbreviated VS.NET) to do C# programming. VS.NET comes with a very rich library (called .NET Framework) which you can use to build powerful programs.


  • Java vs. C#

    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:

  • Simplicity. Their relative simplicity is their prime attraction as an introductory programming language.

  • Safety. Java and C# were designed to be robust. Their type systems are a major source of this robustness, and the absence of pointers removes one common source of problems. They also provide exception handling and other methods for creating programs that are less likely to crash.

  • Cost. Free implementations of both Java and C# are available.

  • Cross-platform. A Java program written for one platform, such as a PC or Mac, will run on any other Java platform automatically. Java programs are compiled into platform-independent byte-codes. C# is not quite as platform-independent, but new port to Unix is under development.

  • Object-oriented. In Java and C#, (almost) everything is an object. In fact, there are no functions or procedures -- just class methods. C#'s treatment of objects is a bit more uniform than that of Java.

  • Client-Server and Network support. Java and C# applets are client-server programs that run on the Internet.

  • Multimedia support. The standard Java and C# libraries have support for graphic images, animation, and sound.

  • Ubiquitous. Java and C# applications are spreading throughout the Internet. Students learning these languages can find numerous examples, as well as employment opportunities.

  • Related to C/C++. Java and C# are perhaps 80% of C++, and vice versa. Students who already know C or C++ will have little problem learning Java or C#. Students who learn Java or C# first will have little difficulty picking up C or C++.


  • Computers

    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

    There will be weekly or biweekly homework assignments -- about 8-9 in all.  For the most part, these will be computer programs written in C#.  Each student is expected to do each assignment on her/his own -- collaboration is not acceptable -- although group discussion of general concepts is encouraged.

    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.

    Collaboration Policy

    Programming, like composition, is an individual creative process. Individuals must reach their own understanding of the problem and discover a path to its solution. During this time, discussions with friends are encouraged. However, when the time comes to write the code that solves the problem, such discussions are no longer appropriate -- the program must be your own work (although you may ask teaching assistants or lab assistants for help in debugging).

    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.


    Attendance

    Attendance at lectures is expected but will not be recorded. Students are, however, fully responsible for all material presented in lectures, even if some of it does not appear in the "official" lecture notes. Class attendance is recommended strongly.

    Lecture notes will be made available. Watch for an announcement of their availability.


    How to Submit Assignments

    For each assignment, you must turn in two things: your programs; a README file for the write-up, the write-up is an important part of your work and will contribute significantly to your assignment grade.

    Please follow the procedure described at this page to submit your solutions to the assignments.


    Keeping In Touch

    The best way to contact the instructor and the TAs is by electronic mail. To get help quickly, your best bet is to send email to cs112ta@cs.yale.edu or cs112@cs.yale.edu (where your message will also be forwarded to the newsgroup), or to directly post your question to the yale.cs.cs112 newsgroup.

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


    Copyright (c) 1998-2003, Yang Richard Yang, Zhong Shao and Paul Hudak, Dept. of Computer Science, Yale University.