Events News Research CBS CBS Publications Bioinformatics
Staff Contact About Internal CBS CBS Other

Exercise Delivery Status for Course Participants

Name\Lesson1234 5678910 1112Score

The score you get on this page consists of two factors, a letter denoting the code goodness, and a percentage that shows how well your code fulfills the stated text and solves the given problem(s). The goodness is therefore an overall evaluation of the code quality, while the percentage is telling about the concrete errors you made. They are not at all the same thing; it is quite easy to have great code contain small errors, and lousy code to be correct.

Code goodness:
The grades in goodness are: A - excellent, B - good, C - average, D - substandard, F - Fail.
Here are some of the parameters that goodness is evaluated from in no particular order:

  • Easy to read
  • Easy to maintain
  • Easy to extend
  • Easy to use
  • Explicit code
  • Comments explaining the code - what is happening. Usually 10-20% of the chars used should be comments. There is such thing as too many comments - when you have more comments than code you are over the limit.
  • Wellchosen descriptive names for variables, subroutines, etc.
  • Modular construction of the code
  • No special cases, but general programming
  • Not bloated code - slim and elegant
  • Demonstrating overview of the problem
  • Avoiding using last, die and exit in ways that break the natural flow of the code
  • Catches errors in the input - and explains what the error is
  • Code is optimized and logical
  • Code does not unnecessarily use memory - like slurping files for no good reason
  • No warnings about using uninitialized variables
  • Using correct data structures and understanding the basis of the various types
  • Using efficient and clear algorithms
  • Correct use of Perl ideoms, concepts and constructs

Many of these parameters overlap to a lesser or greater extent. It does not matter. What matters is that they explain in different ways what code goodness is.
The teachers solutions are (mostly) examples of good code. Often various solutions to the same problem are shown and pro's and con's of each discussed - read them.

You will get a final number that is the average of all percentages times the respective goodness, where A = 1.0, B = 0.9, C = 0.8, D = 0.7, F = 0.5, i.e. avg(A100%, B90%, C80%) = (100 + 81 + 64)/3 = 82.