CS 3343/3341
 Analysis of Algorithms 
Fall 2012
Computing:
  Information and Policies   


Computer Language:

  1. For programs in this course I expect that you will use Java or C. (I have no bias in favor of either of these.) You can also use C++, but you should tell me ahead of time. You should definitely ask for permission to use more exotic languages.
  2. If you use Java (or C++), I would prefer that you not use exotic and generalized features. Usually there will be no reward for the use of such features. You should confine your programs to the features asked for. (We are studying basic algorithms here, and this is not a software engineering course.)


Details About Programming in Java:

I want you to program using Abstract Data Types (ADTs), but without distracting complications and details. In practice this means:

  1. Separate classes for separate data types. The goal is that we could replace one implementation of a data type with another without rewriting the calling code.
  2. No generics, to keep code simpler. (In C++, even Stroustrup recommends implementing first without templates.)
  3. Often using specific types, constants, and constraints, rather than writing code in a general and extensible fashion, again to keep the code simpler. For example, most of my code in this course for matrices is specific for 2-by-2 ones.
  4. No interfaces. Same reason: keep it simple.


Details About Programming in C:

Here again I want you to program using Abstract Data Types (ADTs), but without distracting complications and details. In practice this means:

  1. Use a separate file to implement a data type. This increases complexity a bit, but there is no other way within C to provide an object in a reasonable way. In no other way can we meet the goal of changing an object's implentation without changing the calling code. In C we can recomplile new code for a data type without recompiling the rest of the program.
  2. Employ user-defined header files (.h). These correspond roughly to Java's interfaces, but here we have to use them if we want our C objects in separate files.
  3. In other respects keep the code as simple as possible, including using specific simple types (like the 2-by-2 matrices mentioned above).


Computer System:

  1. You may use any computer system and environment that you like.
  2. Java programmers have probably been using the Eclipse Development Environment, and you may continue to do so. You should realize that the submission of a recitation (see submissions) should nevertheless be a single data file (*.txt) with your program files and output concatenated together. Absolutely not a zip of your project directory, as you did in CS2123. (I don't even have access to Windows or Eclipse at home.)

Standard Libraries:

  1. Usually I do not want you to use your language's standard library for something like a collection (a queue or list or such), but I want you to write these from scratch. Mostly such collections will be very simple.
  2. One mark of professional programmers is that they do use the standard library where appropriate. This is especially important in a language like C++, where memory management is difficult and a garbage collector is often not used. You are in an artificially small environment, trying to study algorithms, and often writing experimental programs.

Your textbook's pseudo-code: See Pseudocode Conventions.
Revision date: 2012-05-25. (Please use ISO 8601, the International Standard Date and Time Notation.)