Monday, June 22, 2009

Day 15 & 16

I was able to finish the Lighthouse task #127 which was the purge history task. I added three buttons to the test history page, Purge > 30days Purge >7days Purge all. As proof that they all work, I no longer have any history! Since a user can also just type in the command URL?purgeHistory&days=?? where they can choose the number of days, I also had to add many checks to make sure the input is valid. A note on tests that test text outputs, they are overwhelmingly sensitive! After I was done making my changes I ran all the tests, making sure everything still worked, and I got one failure. Somehow something got changed in one of the template, though I didn't even know I changed it, and a test was failing because the text it got wasn't what it expected. So I looked at the output and what was expected and they looked the same, except finally I saw one case where there happened to be a newline out of no where. Long story short, I spent a very long time hunting through the code to find this line, and it ended up being in one of the html (velocity) templates. Maybe I hit the reformat command while in that file, and my IDE added a new line. I don't know, but it was very frustrating.

A very unfortunate thing occured on thursday. I lost all of my work for the Lighthouse task #123 because I am a newb at github. I thought that if you had a branch, everything in that branch is protected once you switch to a new branch, and thus you don't always have to commit. So to work on my other task I created a new branch and did a reset --hard to get a earlier version of the code. As it turns out, this deleted everyone of my changes on the other branch since I was a fool and didn't commit... At least now I know how to do it all, so the process of making up all my work should be rather painless, but it still sucks and now I know to always commit!

No comments:

Post a Comment