CS373 Spring 2021: Blog 2

- What did you do this past week? I learned about the Collatz Conjecture, solidified my understanding of unit testing in Python, made sure I could download and run Prof. Downing’s Docker image, and started the Collatz project.
- What’s in your way? I started the Collatz project by first doing the HackerRank. However, even with decorators and memoization, I kept getting runtime errors for the third test case. When I changed my approach to use a dictionary instead of memoization with decorators, that got rid of the runtime error, but I’m still timing out on the third test case. I have some ideas on how to fix this which I’ll attempt the next time I work on the project.
- What will you do next week? Like I said in the previous question, I have a couple of things I want to try out in my code next week to pass the third test case on HackerRank. I will also write some tests of my own to see what cases my solution would be failing on.
- If you read it, what did you think of the makefile? I thought it was pretty intuitive and the surrounding comments were very helpful for understanding what each command does. I had to look up some of the flags for the commands, and noted them through annotations on the document.
- What was your experience of Docker? I downloaded the Docker image for the project in my previous internship but didn’t end up using it that much to do work on. I hope that through this class, I’ll be able to use it more since it seems like a really important tool.
- What was your experience of assertions? I used assertions a lot in C++ last semester during my OS class, since debugging multithreaded code with GDB was a hassle. This was probably the first time (that I can remember) seeing assertions in Python code.
- What was your experience of unit tests? This wasn’t too surprising to me since I did unit testing in Java in 314 and unit testing in React.js in my previous internship.
- What made you happy this week? Being in Austin with my friends and working/hanging out together!
- What’s your pick-of-the-week or tip-of-the-week? While looking for more resources on Docker, I found this site that lets you run Docker commands online in an interactive sandbox environment. It also comes along with a tutorial that’s easy to walk through! I found it very useful for reinforcing what I learned from Downing’s lecture.