CS371g Summer 2021: Kevin Wu Week #6

Kevin Wu
2 min readJul 9, 2021

What did you do this past week?

I was able to finish Integer on Tuesday, so I’ve spent the past couple of days studying for my linear algebra final. Outside of that I have been watching Loki the UEFA Euro knockouts, and the NBA Finals in my free time.

What’s in your way?

Not too much is in my way right now, as I feel pretty good about where I am in this class, and with my other summer class wrapping up, I think I’ll have much more time on my hands.

What will you do next week?

Next week I will try and finish Deque project as soon as possible, and I hope I will have enough time to exercise more often.

If you read it, what did you think of the Paper #6: Vector?

This week’s paper was very helpful in understanding the inner workings of an C++ STL container, and I think it’ll be very useful when I am implementing my_deque. I also like that there were unit tests added alongside the source code, as I could see what exact properties about vector were being tested.

What was your experience of containers, container adapters, and allocators?

I learned about the Java equivalents of C++’s list, vector, deque, stack, and queue in CS314 during the fall, so I would say I didn’t have too much trouble understanding them as we went over them. Although this was the first time I had heard of allocators in lecture, it did not confuse me too much, and I think I have a pretty good understanding about their role in C++.

What made you happy this week?

Finishing my Integer lab early made me very happy, as I was really at my wits’ end on how to pass the last Hackerrank test in under two seconds. It ended up being a silly bug in my implementation of Karatsuba’s algorithm that was never caught by unit testing or acceptance testing, but after looking at Java’s BigInteger’s source code for the same algorithm, I fixed the bug and my tests passed.

What’s your pick-of-the-week or tip-of-the-week?

My pick-of-the-week is whiteboarding. Often times when working on labs, I find myself doing less actual coding compared to the time spent whiteboarding and debugging. Whiteboarding the algorithms or optimizations that I am implementing at a high level helps make the actual code-writing process very easy and if I need to debug code, tracing the code on the whiteboard makes the process very visual and mistakes often become apparent during the trace.

--

--