Site Navigation

Let the programming begin!

Announcements

  • Use your USB drives
  • Here's the file you need.
  • Bring your USB drives
  • first day!

Code of the Day

String prevGen, currentGen, nextGen;
prevGen="r";
currentGen="R";
    
System.out.println("#  Rabbits");
while(prevGen.length() < 60){
  System.out.println(prevGen.length()+
                     "  "+prevGen);
  // + appends the prevGen to the 
  // currentGen to create nextGen
  nextGen = currentGen + prevGen;
  prevGen = currentGen;
  currentGen = nextGen;
}

Recent Topics

  • interlacing loops - two sets of loops can be interlaced to form surprising results. Some interesting examples are on the Tileland page. For example, there is a clockwise loop of polygons that is interlaced with two counter-clockwise loops of hexagons. The process combines sets of loops and forms other patterns that are not always loops. The starting line and ending line with be parallel but the lines may not be the same position. Symmetric examples tend to form loops.
  • A Spiral approach is a good means or forming polygon patches.
  • A polygon Patch - a connected chuck of polygons (made from many polygon loops).
  • Using ZigZags to make a interesting patterns out of dull ones.
  • A polygon Star - a polygon path that has a central part (perhaps a single polygon) and a number of idential projections (see Code3.java)
  • A polygon Loop - a polygon path that comes back on itself (see Code2.java)
  • Can you articulate what are the effects of the actions in TileLand?
  • What's hard about making a J? Can "home" help?
  • Use your USB drives
  • A polygon Path - a number of edge connected polygons

Some Java essentials to get started

  • F:\cs216\jdk1.5.0_04\bin\java -jar dj.jar
  • Bare-bones Tools
    1. Notepad --You can find this by going to the "Start" and selecting "All Programs" and then "Accessories" and it should be listed.
    2. Command prompt -- You find this by going to "Start" and selecting "run" then typing in "cmd" (short for command).
  • Bare-bones Programming
    1. Edit your text file program "Code.java" with a text editor (say Notepad -- it is essential that you switch to "All Files" instead of "Text Documents (*.txt)" while saving).
    2. Find the path of "javac.exe". For example, the path might be "F:/jdk1.5.0/bin"
    3. Compile the program "Code.java" which is in the current directory (capitals are important).
      • Type "F:/jdk1.5.0/bin/javac Code.java"
    4. Run the program "Code.java"
      • Type "F:/jdk1.5.0/bin/java Code" (notice there is no ".java" extension on Code)
    5. Repeat 1 through 4 until the program does what you want (a.k.a debugging).