Saturday, 31 January 2015

Week 4: Programs come in all shapes and sizes

In yet another special edition of "Life in CSC148," I will be covering the first three weeks. Upcoming SLOG entries will focus on the past week unless otherwise stated. Oh, and I am currently feeling overwhelmed because I have tests for CSC148 AND MAT137 on Wednesday! Eeeeep! I shall discover ways to de-stress! (Hot chocolate. Writing. Deep breathing. Happy thoughts.)



Let's start with Week 1. I was very happy to see Professor Heap again on the first day of CSC148. He's been supportive when I was struggling in CSC165 last semester and getting low marks. (Not to mention, I've had mental breakdowns over CSC165. "It's too hard! I don't get it!" I would often think to myself, seeking positive solutions.) Not only has he supported me, but he has supported many others who might have been in the same position. I found CSC165 increasingly difficult and he was always willing to help others who thought the same thing. I'm sure he will do the same thing for me in CSC148 should things be difficult again.

I'll be honest. I'm not the best programmer ever. (I'm a n00b.) I've taken computer science in grades 10 and 11. I've worked with Turing and Scratch in grade 10, and Java in grade 11. Then I learned Python in CSC108 after a moderate hiatus from programming. (I didn't do as well in CSC108 as I did in CSC165, though.)

We covered classes on the first week as part of object-oriented programming, which we learned during the last bit of CSC108. We've gone over __init__ and __eq__ methods. Since I just came out of CSC108, I was beyond familiar with the methods. __init__ is used to initialize a class and __eq__ compares one variable in the class (self)to another (other). In class, Professor Heap used the Python Turtle Graphics module to create shapes to support his teaching of concepts.

In week 2, we covered __str__ and __repr__ methods. We also began to look at abstract data types (ADTs for short), inheritance, including subclasses in the form class NewClass(OldClass), and recursion. In week 3, Prof. Heap used the Turtle module again while teaching us recursion.




Our first assignment for the course was due on Thursday night. My group and I visited Prof. Heap and Prof. Horton's office hours to check our work and see if we did anything wrong. It took us many gruelling hours to fix bugs and proofread our code. After the coding has gotten out of the way, we added comments and docstrings. The final product: 500+ lines of code. But it was all worth it.

I would like to wish everyone the best of luck on next week's CSC148 test! (And MAT137 for whoever's currently taking it.)

Now to study hard and get some motivation.


Until next time, folks! (Study hard and rest up before the test!)

2 comments:

  1. Nice blog- I enjoy the effort you put into your visuals! :)
    I too learned programming before in high school- did both my grade 11 and 12 comp sci in java (which is the hardest language to start from). I too was very confident going into CSC148 as the first few lectures seemed similar to CSC108 things and were fairly straightforward. The assignments, maybe not so much but it was all worth the effort in the end.

    ReplyDelete
    Replies
    1. Thank you! Yeah, I thought others would enjoy the visuals, too. :) The assignments required much to think about, especially the minimax in A2, but we all learn something out of them. In CSC207, we'll be working with Java once again. I definitely find it harder (and a lot different) than Python!

      Delete