These first weeks of CSC148 has been weeks of adjusting, understanding and growth. Both lectures and labs required adjusting to a new learning style compared to CSC108 in the previous semester. This is by learning and understanding new knowledge and concepts, and to change an grow to fit the teaching style of CSC148.
The first difference from before was object-oriented programming. In CSC108, I was used to programming by writing function by function by function. However in lectures of CSC148, programming is based around classes, whcih was new and interesting for me. Compared to just a list of functions, classes seemed more organized, catagorised, and structured.
The second difference was labs.In CSC108, labs were optional and we just had to complete lab exercises online. In CSC148, we now have to attend labs and complete exercises with a lab partner. This was hard for me, because programming with someone else was a lot different from programming alone. When being the navigator, I often felt the urge of getting hold of the keyboard and typing myself. Also I was aware that if I think and work at a pace faster than my partner, she might not be able to think through it herself. As according to my friend in another tutorial section, she doesn't learn a lot from the tutorials because her partner always solves the problem before she can fully think through it. So I stopped myself from over contributing. However because of this, the progress of completing the exercises in lab01 was a lot slower than it should have been, and was not fully completed. So in lab02 I didn't restrict myself from contributing and the exercise was completed within an hour, although I still don't know if this is good or not. However I have still learn't a lot by taking lab01 home and correcting and debugging it. Through debugging lab01, I learnt some thing new. Which was that dictionaries cannot change size during iterations. Which I did not know before.
Another interesting thing that happened this week was learning the ADTs stacks and queues in lab02. In particular, analysing the runtime of stacks and queues of different sizes. It resulted in that the runtime of stacks don't really grow with the size of the stack. However queues grow lineraly with the size of the queue. At first the concepts were abstract and hard to understand, but then I pictured a stack of paper versus a line-up at Starbucks. When adding paper and removing paper from the stack, the stack remains still and unmoved. However the line-up at Starbucks is constantly moving as people enter and leave the line. This gave me an understanding of the queue runtimes. Afterwards, when we were asked to think of more efficient ways of implementing queues, I tried thinking of how I could have a line-up at Starbucks so that the people in line doesn't have to move. Then I realized the only way is to have the cashier moving. But if the cashier keeps moving on, the counter will have to be infinetely long. Then the TA introduced us a new concept of a circular queue, which then I pictured Starbucks counter being a circle with a cashier that moved around inside the circle. Then the people will not need to move. But this is not efficient in the real world, because the cashier will be very tired, and its not that big a deal to move along with a queue. From this it could be seen that not all aspects of programming can be made into an analogy in real life.
没有评论:
发表评论