<%
dim title
title = "CS2110 F09 Resources"
%><!--#include file="includes/2colheader.asp"-->

<% dim rowParity %>

<div id="section-navigation">
	<ul>
		<li><a href="#Section Examples">Section Examples</a></li>
		<li><a href="#Java">Java</a></li>
		<li><a href="#Programming">Programming</a></li>
		<li><a href="#Computer Labs">Computer Labs</a></li>
		<li><a href="#Support Services">Support Services</a></li>
	</ul>
</div>

<hr>

<div id="main">
<h1>Resources</h1>

<div class="bridge-section">
<h2><a name="Section Examples"></a>Section Examples</h2>

<p>Examples for the current section can be found <a href='section'>here</a>, and previous sections are at the <a href='sections'>Section Examples</a> page.
</p>
<h2><a name="Java"></a>Java</h2>

<p>In CS 2110, you'll be using an integrated development environment (IDE) 
called Eclipse to develop and debug your applications, which will be coded in 
the Java 6 Standard Edition (Java SE 6) platform, as released by Sun 
Microsystems Inc.&nbsp; Java SE 6 includes a Java 
   Development Kit (JDK) as well as the Java Runtime Environment (JRE). Java 5 
will also be sufficient if for some reason you prefer that version.&nbsp; The 
way to think about all of this is that the IDE is the &quot;digital dashboard&quot; and 
code editor for writing code and performing commands like compiling it, pulling 
in standard libraries, identifying problems and fixing them.&nbsp; Under the 
covers, the IDE is giving you a kind of friendly interface to the JDK, which has 
all sorts of standard libraries.&nbsp; And the JDE is like a computer (sort of a 
computer within your computer) that can run the resulting code.</p>
<p>When you download and install Eclipse, as long as you select the &quot;Java 
Personality&quot; for the package, you can also download and install the JDK and JDE 
all in one monster file.&nbsp; We mention the personality because Eclipse can 
also be used to develop code in other languages like C++, and it can be used to 
create applications that run on the desktop (our kind), on servers (we won't do 
this), as new libraries, etc.&nbsp; If you get confused and use the wrong 
personality, Eclipse will complain but nothing horrible will happen and you can 
usually poke around until you get to the home page, then select the personality 
you really wanted (Java) and then you should be in better shape.&nbsp; Each of 
your homework assignments will be a separate Eclipse &quot;project&quot;, but you can use 
the results from one assignment as a basis for the next, and in fact we'll often 
do so.</p>
<p>Some cs2110 students installed Java on their machines a while ago and try to 
cut corners and skip this install step.&nbsp; That would be a mistake.&nbsp; If you are using a version of Java prior to 5, such as J2SE 1.4, you <i>must</i> upgrade.
   We will be using many new features that were introduced in Java 5, such as generics, 
   autoboxing, and typesafe enums. These newer features are described in the following sources:</p>

   <ul>
      <li><a href="http://java.sun.com/developer/technicalArticles/releases/j2se15">
           http://java.sun.com/developer/technicalArticles/releases/j2se15</a></li>
      <li><a href="http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html">
           http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html</a></li>
   </ul>
   
<p>To find out which version of the Java Runtime Environment (JRE) you are
running, open a command window (in Windows, <b>Start > Run...</b> and type <code>cmd</code>,
and in Mac OS X, <b>Applications > Utilities > Terminal</b>)
and type <code>java -version</code> at the command prompt:</p>

<pre>C:\>java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
</pre>

<p>This says I have version 6 installed (6 and 1.6 are synonymous).</p>

<p>If you are on a PC running Windows and have never installed a version
of the Java Development Kit (JDK) on your machine, you probably don't have it.
If you are on a Mac, you probably do.  To find out, type <code>javac -version</code>:</p>

<pre>C:\>javac -version
javac 1.6.0_07
</pre>

<p>If you get an error message or the version is earlier than 1.5, you must (re)install the JDK.</p>

<h3>Installing the JDK</h3>
<p>The easiest way to install the JDK is to jump down to the link for installing 
Eclipse, below, and follow that.&nbsp; Then select the option for installing the 
JDK and JDE as part of the Eclipse install.&nbsp; In one easy (but slow) 
download, you'll have everything you need.</p>
<p>If you want to install just the JDK, read the remainder of this section.</p>

<p>The JDK is already installed in <a href="#Computer Labs">CIT and ACCEL labs</a>. However, installing it own
your own machine will greatly facilitate your work. Please note that you should double check your work in
a public lab, as privately owned machines occasionally exhibit different behaviors.</p>

<h4>Windows and Unix</h4>

<p>To download the JDK, visit <a href="http://java.sun.com/javase/downloads/index.jsp">Sun's Java 
web site</a> and download and install <b>JDK 6 Update 7</b>.

<h4>Mac</h4>

<p>As of Fall 2005, Sun does not support Java for Macs.  However, there
is support available from Apple.  You must be running Mac OS X version
10.4 (Tiger) or later, which comes with the JDK version 5 already installed.</p>

<p>If you have a 64-bit Intel-based Mac running Mac OS X 10.5 (Leopard),
there is a version of Java SE 6 available from Apple.  If you wish
to upgrade, visit
<a href="http://developer.apple.com/java/download/">Apple's Java web 
site</a> and download and install <b>Java for Mac OS X 10.5, Update 1</b>.
After installing, run <b>Applications > Utilities > Java > Java Preferences</b>.
Drag the newly installed version of Java to the top of the list under
<b>Java Application Runtime Settings</b>.  Click <b>Save</b>.</p>

<h3>Compiling and Running from the Command Line</h3>

<h4>Compiling</h4>

<p>Say your main class is <code>MyProgram</code> and it is
contained in the source file <code>MyProgram.java</code>.
If it is not in a package, navigate
to the folder containing <code>MyProgram.java</code>
and type <code>javac MyProgram.java</code>.</p>

<p>If it is in a package (say <code>myPackage</code>), the
source should be in a folder called <code>myPackage</code>.  Navigate
to the folder containing <code>myPackage</code>
and type <code>javac myPackage/MyProgram.java</code>.</p>

<h4>Running</h4>

<p>From the same folder you compiled from, type
<code>java MyProgram &lt;<i>program arguments</i>&gt;</code> if it is not
in a package, and <code>java myPackage.MyProgram &lt;<i>program arguments</i>&gt;</code> if it is.</p>

<h4>Specifying a Classpath</h4>

<p>Sometimes you may need to inform Java where to find auxiliary
classes.  You can do this with the <code>-cp</code> option
to the <code>java</code> command.
Supply a sequence of folders telling Java where to look
for classes, separated by <code>:</code> (Mac) or
<code>;</code> (Windows).</p>

<h3>Brushing Up</h3>

<p>For students with limited Java experience, we recommend the online notes from
<a href="http://www.cs.cornell.edu/Courses/cs1130/2008fa/">CS 1130</a> (formerly 101J),
Transition to Object-oriented Programming as a refresher.
This is a self-paced course consisting of several modules that you can go through
at your leisure.</p>

<h3>More Ways To Catch Up</h3>

   <ul>
   <li>Review the introductory chapters in the textbook and the Java reference books listed on the
   <a href="courseinfo.asp#Sources">course info page</a>.</li>
   <li>See Sun's official <a href="http://java.sun.com/docs/books/tutorial">Java Tutorial</a>.</li>
   <li>Refer to the   
   <a href="http://www.cs.cornell.edu/Courses/cs1110/2008fa/">CS 1110</a> (formerly 100J) and
   <a href="http://www.cs.cornell.edu/Courses/cs1130/2008fa/">CS 1130</a> (formerly 101J) websites,
   which contain numerous examples.</li>
   <li>For students with C++ experience, see
   <a href="http://www.perryland.com/Java2.shtml">http://www.perryland.com/Java2.shtml</a>
   to compare C++ with Java.</li>
   </ul>

<h3>Local Software</h3>

<p>There are some basic Java utilities specifically for CS 2110 and 2111 that you
may find useful.  These are contained in a package <code>edu.cornell.cs.cs2110</code> contained in a
<code>.jar</code> file which you can download from <a href="API/">here</a>.
Follow the installation instructions on that page.
Javadoc documentation is also available.</p>

<hr>
</div>

<div class="bridge-section">
<h2><a name="IDEs"></a>IDEs</h2>

<p>IDE stands for <i>integrated development environment</i>.
The use of an IDE is the best way to develop Java programs.
IDEs provide many valuable aids such as syntax checking,
debugging, and refactoring that can save you a lot of effort.</p>

<p>There are many good IDEs.  We recommend the use of Eclipse and will be using 
Eclipse in class and recitation sections for examples, but if you prefer some 
other IDE that won't cause problems as long as your code is in standard Java.&nbsp;&nbsp; 
Some people prefer not to use any IDE at all, and that's fine too.&nbsp; Eclipse is installed in all the labs, along with some others.</p>

<p>Early recitation sections will get you started with Eclipse
if you are not familiar with an IDE.</p>

<p>Here are some links.&nbsp; </p>

   <ul>
     <li><a href="http://www.eclipse.org">Eclipse</a></li>
     <li><a href="http://www.drjava.org/">DrJava</a></li>
     <li><a href="http://jcreator.com/">JCreator</a></li>
     <li><a href="http://www.metrowerks.com/">CodeWarrior</a></li>
     <li><a href="http://www.netbeans.org/">NetBeans</a></li>
     <li><a href="http://www.borland.com/jbuilder">JBuilder</a></li>
     <li><a href="http://gcc.gnu.org/java">GNU</a></li>
     <li><a href="http://otn.oracle.com/software/products/jdev/index.html">JDeveloper</a></li>
   </ul>

<p>Again, for consistency, the course staff use Eclipse with a common Java style.&nbsp; 
They may not be able to help you if you get stuck with some problem in an IDE 
they aren't familiar with (Eclipse, by the way, has some issues of its own... 
all IDEs have their strengths and all have some issues too!)&nbsp;  You
can download the Eclipse style template
<a href="Handouts/CS2110EclipseFormat.xml">here</a>.</p>

<br>

</div>

<div class="bridge-section">
<h2><a name="Programming"></a>Programming</h2>

<p>There are many valuable resources that can help you take your programming
skills to the next level.  Here are a few links:</p>

<h3>General</h3>

<ul>
   <li><a href="http://www.nist.gov/dads/">Dictionary of Algorithms and Data Structures</a></li>
   <li><a href="http://foldoc.org/">Dictionary of Computing</a></li>
   <li><a href="http://www.hitmill.com/computers/computerhx1.html">History of Computers</a></li>
</ul>

<h3>Software Development Methodologies</h3>

<ul>
   <li><a href="http://www.xprogramming.com/Practices/PracPairs.html">Pair Programming</a></li>
   <li><a href="http://www.cetus-links.org/">Object Oriented Programming</a></li>
   <li><a href="http://www.extremeprogramming.org/">Extreme Programming</a></li>
</ul>

<h3>Debugging</h3>

<ul>
   <li><a href="http://www.cs.man.ac.uk/~johns/npe.html">Null pointer exceptions</a></li>
   <li><a href="http://www.open.ac.uk/StudentWeb/m874/!synterr.htm">List of common syntax errors</a></li>
   <li><a href="http://portal.acm.org/citation.cfm?doid=792548.611956">Another list of common errors</a></li>
</ul>

<h3>Just for Fun</h3>

<ul>
   <li><a href="http://www.di.uniovi.es/~cernuda/noprog_ENG.html">How not to program</a></li>
   <li><a href="http://www.norvig.com/21-days.html">Teach Yourself Programming in Ten Years</a></li>
   <li><a href="http://www.nyx.net/~gthompso/quine.htm">Quines (Self-Reproducing Programs)</a></li>
   <li><a href="http://www.sims.berkeley.edu/research/projects/how-much-info/datapowers.html">Powers Of Ten</a></li>
   <li><a href="http://www-2.cs.cmu.edu/%7Epattis/quotations.html">Programming Quotes</a></li>
   <li><a href="http://www.catb.org/~esr/faqs/hacker-howto.html">How To Become A Hacker</a></li>
   <li><a href="http://mindprod.com/jgloss/unmain.html">How To Write Unmaintainable Code</a></li>
   <li><a href="http://mathforum.org/dr.math/problems/huffine.11.22.00.html">History of Operator Precedence</a></li>
   <li><a href="http://www5.in.tum.de/~huckle/bugse.html">Software Bugs &amp; Glitches</a></li>
   <li><a href="http://www.cs.unm.edu/%7Edlchao/flake/doom/">Doom for System Administration</a></li>
   <li><a href="http://www.ioccc.org/index.html">The International Obfuscated C Code Contest</a></li>
   <li><a href="http://www.eeggs.com/">The Easter Egg Archive</a></li>
   <li><a href="http://www.freshsources.com/may99.html">Control Flow: The Bad, The Good, The Exceptional</a></li>
   <li><a href="http://www.geocities.com/tablizer/oopbad.htm">OOP Criticism</a></li>
   <li><a href="http://www.dangermouse.net/esoteric">Esoteric Programming Languages</a></li>
</ul>

<hr>

</div>

<div class="bridge-section">
<h2><a name="Computer Labs"></a>Computer Labs</h2>

<h3>CIT Labs</h3>

<p><a href="http://www.cit.cornell.edu/">Cornell Information Technologies (CIT)</a>
   runs several computer labs across campus for all members of the Cornell
   community. The JDK and Eclipse are installed on these machines.
   Check <a href="http://www.cit.cornell.edu/labs/">here</a> for locations and times of operation.</p>
   
<h3>ACCEL Lab</h3>

<p>You can also find the course software in the <a href="http://www.accel.cornell.edu/">
   Academic Computing Center (ACCEL)</a>, located in the Engineering Library
   in Carpenter Hall. Any CS student may register for an account.</p>
<hr>

</div>

<div class="bridge-section">
<h2><a name="Support Services"></a>Support Services</h2>

<h3>Academic Excellence Workshops</h3>

<p>The Academic Excellence Workshops (AEW) offer an opportunity for
   students to gain additional experience with course concepts in a cooperative
   learning environment. Research has shown that cooperative and collaborative
   methods promote higher grades, greater persistence, and deeper comprehension.
   The material presented in the workshop is at or above the level of the regular
   course. We do not require joining the AEW program, but do encourage students to
   join if they are seeking an exciting and fun way to learn. The AEW carries one
   S/U credit based on participation and attendance. The time commitment is two
   hours per week in the lab.  No homework will be given. This is a wonderful
   opportunity for students to seek extra help on course topics in a small group setting.</p>
   
<p>Your fellow undergraduate students, who are familiar with the course material,
   teach the sessions with material that they prepare. The course staff provides
   guidance and support but do not actually teach the AEW course content or any
   session. A representative from the AEW program will be speaking about the
   program and registration procedures in lecture.</p>
   
<p>One of your TAs will be designated as the AEW liaison for CS 2110.  Watch the
announcements to find out who.</p>

<p>See the <a href="http://www.engineering.cornell.edu/student-services/learning/academic-excellence-workshops/index.cfm">
   AEW webpage</a> for further information.</p>


<h3>Other Support Services</h3>

<% rowParity = 1 %>

<table>
<thead>
<tr>
<th>PROGRAM</th>
<th>DESCRIPTION</th>
</tr>
</thead>
<tbody>
<tr class="row<% Response.Write rowParity
rowParity = 3 - rowParity %>">
   <td><a href="http://www.engineering.cornell.edu/student-services/">Academic Support Services For Engineering Students</a></td>
   <td>Start here - this site has links to a variety of services.</td>
</tr>

<tr class="row<% Response.Write rowParity
rowParity = 3 - rowParity %>">
   <td><a href="http://www.cit.cornell.edu/training/students/students.html">Free Computer Training</a></td>
   <td>CIT offers free computer training throughout the semester. Email <a href="mailto:tts_consult@cornell.edu">
       tts_consult@cornell.edu</a> for an appointment.</td>
</tr>

<tr class="row<% Response.Write rowParity
rowParity = 3 - rowParity %>">
   <td><a href="http://registrar.sas.cornell.edu/">Student Web Services</a></td>
   <td>This website collects services that are more general.</td> 
</tr>

<tr class="row<% Response.Write rowParity
rowParity = 3 - rowParity %>">
   <td><a href="http://www.engineering.cornell.edu/student-services/academic-advising/">Engineering Advising</a></td>
   <td>Academic advising for engineering students.</td>
</tr>

<tr class="row<% Response.Write rowParity
rowParity = 3 - rowParity %>">
   <td><a href="http://www.arts.cornell.edu/stu-adv/">Arts College Student Services</a></td>
   <td>A listing of general support services for a variety of concerns students may have.</td>
</tr>

<tr class="row<% Response.Write rowParity
rowParity = 3 - rowParity %>">
   <td><a href="http://www.tbp.cornell.edu">Tau Beta Pi</a></td>
   <td>Tau Beta Pi Engineering Honor Society Tutoring Program.  The members of Tau Beta Pi are selected for their academic aptitude 
       and social commitment.  They hold one-on-one tutoring sessions with students in courses that typically have a large enrollment 
       of engineers.</td>
</tr>

<tr class="row<% Response.Write rowParity
rowParity = 3 - rowParity %>">
   <td><a href="http://www.ldpride.net/learningstyles.MI.htm">Learning Styles</a></td>
   <td>Not everyone learns the same way. If you are curious about how you learn, check out
   this collection.</td>
</tr>

<tr class="row<% Response.Write rowParity
rowParity = 3 - rowParity %>">
   <td><a href="http://www.gannett.cornell.edu/">Gannett</a></td>
   <td>The Cornell University Health Service Center.  For all health related concerns.</td>
</tr>

<tr class="row<% Response.Write rowParity
rowParity = 3 - rowParity %>">
   <td><a href="http://www.gannett.cornell.edu/CAPS/">CAPS</a></td>
   <td>If you are experiencing emotional distress, we urge you to contact CAPS, the Counseling and Psychological Services.</td>
</tr>

<tr class="row<% Response.Write rowParity
rowParity = 3 - rowParity %>">
   <td><a href="http://cuinfo.cornell.edu/Dialogs/EZRA/">Dear Uncle Ezra</a></td>
   <td>When all else fails, ask Uncle Ezra!</td>
</tr>

</tbody>
</table>

</div>
</div>

<!--#include file="includes/2colfooter.asp"-->
