Thursday, 25 February 2016

Week 6: Assignment Due and Beginning of Recursion

After a few big coding sessions our simulation file ran! All was working with the events_small.txt file, but there were a few ride collisions in the events.txt file. Most of them were issues with the events.py file or dispatcher class not updating things properly. After all of that was working I noticed that one ride was not occurring. A few hours of debugging later and can you guess what error I was having? The most common one... an off by one error in the monitor class. Once that was fixed it was smooth sailing and the code is now uploaded on markus. I learned a lot about class design and abstracting functions to different files. It certainly made debugging a lot easier.

Along with the assignment, class lecture has just started explaining recursion and all the wonderful things it can do. It's hard to think about at first, but writing it out as base case and thinking about depth, assuming the level before it works makes things a lot simpler. I'm excited to see all of the new things that I can do with recursion that I previously could not do with just loops. This class just keeps getting better!

No comments:

Post a Comment