Thursday, 30 January 2014

Week 4: Lab, Lecture, Let's get started on A1

This week's lab was on inheritance, unittesting (more robust than doctest, you create a subclass of unittest's TestCase to check specific cases for your code) and a bit on property. My group didn't manage to finish it but I think we all generally understood the concepts of all three. Personally, I have to do some reading to get a better grip on property and then see if I can use it on my own. Updates on that to come! :)

This week's lecture was focused mainly on recursion and Dustin did more examples. The remove3s function in particular stood out for me in terms of getting a better understanding of how coding for recursion works. The code side by side with the tracing of the current value of the list in an example with a nested list made it much clearer for me to understand how calling a function within its own body was possible. If you're uncomfortable with recursion, I think it's something good to look at it. I'm more comfortable after I had that concrete example that I could trace through for myself and then check. Figure out the base cases and then do the recursive cases!

I've started reading the code for A1 but the deadline is creeping up on me so I have to get started on some actual coding this weekend. I might get a group going on Monday with a friend so I'll see how that goes.

Until next week, see ya!

No comments:

Post a Comment