Percolation Frequently Asked Questions (General)

November 10th, 2014

Screen Shot 2014-11-09 at 10.34.52 AM

Frequently Asked Questions (General)

  • What should I put in my readme.txt file?Here is a readme guide.
  • How should I format and comment my code?
  • Here are some recommended style guidelines adapted from PU COS 226. Below are some that are particularly important (and for which you will lose points if you ignore):
  • Include a bold (or Javadoc) comment at the beginning of each Java file with your name, login, date, the description of the program, and how to execute it.
  • Include a comment describing every method and class (whether public or private).
  • Include a comment describing every instance variable (including those for nested classes).
  • Indent consistently, using 3 or 4 spaces for each indentation level. Do not use hard tabs.
  • Do not exceed 80 characters per line. This rule also applies to the readme.txt file.
  • Avoid unexplained magic numbers, especially ones that are used more than once.
  • What is unit testing? It is testing of each method within a class. Ideally, it should be comprehensive enough to catch any error in the class.
  • Why is it so important to implement the prescribed API?
  • How many lines of code should my program be?
  • What should stddev() return if T equals 1?
  • Is “backwash” acceptable?
  • Screen Shot 2014-11-09 at 1.30.48 PM

  • How do I generate a site uniformly at random among all blocked sites for use in PercolationStats?
  • I don’t get reliable timing information in PercolationStats when N = 200. What should I do?

Frequently Asked Questions (Percolation)

Style and Bug Checkers

Testing

 
Homework: Classroom Salon