Sunday, September 25, 2011

Of Wikis and Exams

         This week for me was all about finishing off PFD and studying for the first exam. On Tuesday, we got our Test Generator working, which was a relief, because that meant we were almost done. All we had to do on Wednesday was tie up the loose ends, and write the Wiki. I find writing a wiki on my algorithm to be an interesting process. Although I am sick of working on a project by the time I get to the wiki, I think it is a good idea to write it. It helps me actually think about my algorithm, and sometimes I find that I could have optimized certain things. I also like that it forces me to translate my algorithm into English, a skill that will definitely help me in the future, when I want to explain my program to my boss, or to a customer.
         The first exam was on Friday. I had heard that the tests in this class are very hard, so I knew I should spend a lot of time studying for the test. Although Professor Downing said that he would design the test so that our double sided cheat sheet would be useless, I spent hours preparing a cheat sheet. And I made sure that not even a square inch on that paper was left blank! This was lucky for me, because most of the answers to the memorization questions that everyone seems to be complaining about, were on my cheat sheet! I was so glad that I took the time and effort to prepare a summary document of all the readings we had for class, it sure came in handy! However, I wish I had put some python syntax on the sheet, since under pressure of the exam, I forgot that to use the python iterator the syntax is i.next() not i.next. I really hope the grader doesn't penalize me much for missing the parentheses!
         Overall, I think I am learning a lot from this class, and I am excited to start working on the Netflix project!

Sunday, September 18, 2011

Acceptance Tests

      On Friday my partner and I spent a couple of hours working on PFD, and we were thrilled when we thought we had got it working. It was passing all the unit tests, and we thought it was ready to be entered into Sphere. However, when we submitted the solution to Sphere, it failed! We were uncertain why that happened, and so we decided to write more unit tests. The unit tests were passing, but Sphere wouldn't accept our solution.
 We realized that it must be a lack of understanding of the problem on our part. We needed more tests, from other people.
      Luckily some people had uploaded their acceptance tests to the public repo, and we used some of those. After looking at the tests, we realized that it was indeed a lack of understanding of what the problem wanted that caused our solution to fail. I think Acceptance Tests are very important for the programmer to gauge correctly what the specifications of a problem are. I don't like Sphere for this reason, since Sphere only gave us one sample test (The fact that the webpage would not load correctly on any browser except IE is a whole other gripe). One sample test is not enough to explain what the problem is actually asking for.
     Anyway, we fixed our logic, and got our program accepted by Sphere. I am so thankful that we all have to upload a thousand acceptance tests to the public repo, it really helped us out! We need to write a test generator now, which will enable us to help some of our classmates out in return!
     The reading for the past week was pretty good, finished reading Extreme Programming, and read some articles that highlight the importance of checking for overflows. We learned about exceptions in class, which I found really interesting and useful. I had a very vague idea of exceptions before this, and I liked learning about them.

Sunday, September 11, 2011

Collatz

    The last week in software engineering was mostly about the project. The project was due on Wed at 8 pm, and I was working on it till 7:45 pm! That is pretty last minute for me, but there were so many details in this project to worry about that I wanted to make sure I had everything right. The program that we wrote needed to be accepted by Sphere, and this gave me an opportunity to learn about a cool online code judge. It was cool, but also a bit frustrating, because Sphere just says wrong solution, without showing specific test cases where the solution failed. This made it very hard to debug the program, but I guessed that they do not want to reveal test cases, in case people try to hard code solutions in their program!
    But anyway, apart from Sphere, it took a while to set up the git repository. I think it is really useful for version control though. In previous classes, I have tried to do some version control myself, which involved keeping copies of entire folders locally. Finally everything got really messy, and I always got confused as to which the latest folder is!
    The reading for the week was the rest of the Extreme Programming book, which talked about test first programming, and the importance of writing Unit Tests. I thought that was really insightful, since I sometimes get bored of writing tests. However, I am inspired to write more tests in the future. We also read a couple of articles about pair programming. I have always liked pair programming, and I am glad that we get to work with a partner for the next assignment. I think two heads are better than one, and working with someone else also makes homework fun! That rhymed!



Sunday, September 4, 2011

Weekly Blog #1

     Quizzes!! Week two of software engineering introduced me to the concept of a quiz at the beginning of every class. I was scared about the first quiz, and read the two articles over and over, trying to remember minute details in order to do well on the quiz. But after Quiz # 3 I feel more comfortable, and have gotten used to the idea of taking quizzes all the time!
     We had to read the first twelve chapters of a really good book called Extreme Programming. I found the concepts in the book really interesting, and as I was reading I was constantly comparing the work style described in the book to my own work at my internship (at Qualcomm) this summer. When I start working full-time, I would like to apply some of the techniques described in the book to my work - of course the techniques mentioned should really be applied to an entire team, and not just an individual.
    The quizzes also had a couple of questions that would help us optimize our program for the Collatz assignment. I am going to try to use these optimizations to improve my code performance.  I liked how the quiz questions were relevant to our assignment, although when I first saw the question it did seem a bit random!
    The first project, which is due on Wednesday includes not just programming, but being able to use the Google issue tracker and a git repository. We also need to write a wiki, and create documentation for our code using Doxygen. I think these are all good skills to have, and am glad that we are being forced to develop these skills as part of the project.
   Anyway, talking about the project reminds me that I have a lot of work to finish, and so I'll sign off now!