Thursday, October 07, 2010

Compression Code Addendum

I'm encouraged to see that many of you have been making submissions to FrontDesk for the compression assignment. Keep up the good work! Below are a few comments I wanted to share with the entire class concerning this assignment:

1) You are not implementing MyPriorityQueue for kicks and giggles. You are expected to call your own code (and not Java's PriorityQueue) when you implement Huffman encoding.

2) A significant portion of the grade for this assignment is in hidden tests. The staff tests visible on FrontDesk only test very simple cases. Passing the visible staff tests does not ensure you will do well on this assignment. You need to write extensive unit tests to ensure your compression algorithms are working properly.

3) The new FrontDesk has been performing quite well and we haven't had any serious issues with it being overloaded since the switch. However, Compression is significantly more computationally intensive than Snakes, so do continue to submit well before the deadline. In addition, if you submit a unit test that takes too long to complete, your process will time-out and all the remaining unit tests will fail to run. We strongly recommend including a timeout of 1 second for all of your unit tests. For example, the following code contains an infinite loop, but will stop execution after one second:

    @Test(timeout=1000) public void infinity() {

The advantage is that if a unit test times out, the remaining unit tests will still be run. You will likely want to run some of your more intensive stress tests locally without a timeout. If these tests cannot complete within the one second timeout on FrontDesk, that is ok as long as you stipulate this in a comment.

4) To complete the assignment you may find it necessary to perform some fairly low-level byte manipulation. This is a useful skill to learn, but it is not fundamentally what we are testing in this assignment. If you get stuck with bit mangling or byte conversions, please ask for help.

As always, if you run into problems or ambiguities, please share them with us on the discussion board!