Blogs: Week of 21 Feb - 27 Feb
CS371p Spring 2022: Jonathan Randall
What did you do this past week?
I worked on Voting. We wrote a simple implementation using one “big bucket” for all ballots. I created acceptance tests and unit tests.
In my Big Data course, we debugged our implementation of “PageRank” using PySpark RDDs. I spent way too much time debugging our RDD partitioning until I realized we had a type error. Such is the nature of a dynamically-typed language. Checking pre-conditions is always good practice.
In Data Mining, I worked on a K-Nearest-Neighbor and Naive Bayes implementation using Pandas DataFrames.
What’s in your way?
I need to finish Voting. We are failing the third test case (not due to timeout), so our implementation is slightly wrong. Acceptance tests should help us debug this. Next, we will bucket by candidate. I have several ideas for what data structures to use, but I’ll try the obvious one first.
What will you do next week?
Next week, I will finish Voting. I will research a job offer I received. I will fly back to Austin. I will try to get outside more. This has been a busy few weeks, with multiple stacked-up due dates and projects and interviews. Serenity is so close, yet so far.
What did you think of Paper #6: Open-Closed Principle?
I remember this concept from SWE. I really haven’t to put the Open-Closed Principle into practice, but I am grateful for its use in the architecture of the Java standard library and in many Python libraries. I strive to make my code as anti-fragile and extendable as possible.
What was your experience of arguments, returns, and consts?
The pre_incr()
and post_incr()
activities were a great way to put our knowledge of references and pass-by-reference. I hope to practice more with const
as applied to pointers. I suspect that pass-by-reference will be preferable for most use cases.
What made you happy this week?
I went to LA to visit my friend. I’m still there right now. It’s a sprawl with some really old themed restaurants. I went to a restaurant called “The Galley” in Santa Monica that looked like the Chum Bucket. Plankton was nowhere to be found.
What’s your pick-of-the-week or tip-of-the-week?
My tip-of-the-week is for VS Code users. You can select a word and hit Command + Shift + L
to place a cursor at every occurrence of said word. It’s like find and replace, but requires a little less thought. Be careful with huge files. Multi-cursors are magical but like all magic must be used responsibly.