CS 373 Fall 2020: Week of 7 Sep — 13 Sep

Pranav Akinepalli
3 min readSep 14, 2020

What did you do this past week?

I worked on the first project we were assigned for the class (solving the question of what is the max Collatz cycle length for a given range of numbers x to y). This was a great project that I learned a lot from in terms of how to approach a problem as well as what tools to use. I was able to get Docker running on my computer, set up the WSL (Windows Subsystem for Linux), and become familiar with git and Gitlab. Many optimization approaches and tools such as mypy, coverage, unittest, and more were crucial to finishing this project as well as to my learning.

What’s in your way?

I still have a couple of optimizations left to implement as well as some reformatting to my code that needs to be done. All of this relates to the finishing steps for the project. It is due tomorrow at 10 pm so it makes sense that I am reaching the last stretches.

What will you do next week?

I will be finishing up this project on Monday but in terms of this class, there doesn’t seem much else to do yet. I think we will start to form our groups for the rest of the projects in this class. As of now, I have two other people I am slated to work with but groups are 5–6 members. It remains to be seen whether we will get those people in time. If not, groups are assigned based on preferences anyways so hopefully, we get some good group members to work with.

What was your experience of Collatz, the starter code, the makefile, its optimizations, and exceptions?

I thought that this was a great project to work on where I was really able to learn a lot. The starter code was simple enough to understand but also robust so that many aspects of the program (such as printing, reading, etc.) were already covered. I’ve never looked at a makefile in detail before but in combination with the YAML file, I was able to understand how the GitLab Pipeline works and what it is doing behind the scenes. I was also able to figure out which make commands to run on docker (running on my local machine). There were some optimizations I hadn’t thought of such as eager caching or meta caching. I thought lazy caching would be enough but it turns out, there are many more ways to optimize the code than I thought possible (even hardcoding some of the answers via meta caching)!

What made you happy this week?

I was really excited when I started to learn all of the different tools regarding git, GitLab, unittests, coverage, makefiles, etc. These are all aspects of a project that I find intimidating and have always wanted to learn more about. Thus, this project helped me to do that and I feel much more comfortable with these tools. This makes me more optimistic about all the other cool stuff I’ll end up learning in this class.

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

Something I’ve come across numerous times when working with Python is testing small things specifically about the Python language and certain scenarios. Normally, one would open up their IDE, create a test file, and test their code there. However, this is annoying to keep open when not using as I like to keep my workspace as minimal as possible. I’ve found a great online Python compiler where you can write and test your code on the spot. It’s really helpful when checking small things, especially if you forget how to do something in Python.

--

--