CS 371p Spring 2020: Week of 2/3

Rishi Salem
3 min readFeb 8, 2020
  1. What did you do this past week?

In addition to attending class, I finished setting up the coding environment I’ll be using for the projects and completed the first coding assignment. It was much more complicated than I had expected, as I had difficulty making the system work on my Windows machine. In the end I decided it was easier to just SSH into a lab machine whenever I wanted to test my work, as the lab machines already have all the required tools installed.

2. What’s in your way?

I have yet to figure out how to write issues. While I have been writing down every issue I faced during this project, this doesn’t seem very helpful. I believe that a better way to use the issues system is to only mention the issues that are present when I push code to the system. Alternately, I will mark down every issue I know the code needs to solve before starting the assignment and only add issues if I find something else I hadn’t thought of. This could be more effective than marking small issues such as “The assertion that checks preconditions tests the exact opposite of what it’s supposed to”, which I could simply solve in the time it takes to write the issue.

3. What will you do next week?

I will continue learning as I have been, and if the next project is released I will set up the environment once again. I will also begin planning earlier, as I think having a plan will help me come up with issues to mention in the issue tracker.

4. What was your experience of exceptions, references, and consts? (this question will vary, week to week)

I found the “const int* const” interesting. I’d never seen anything like it before.

5. What made you happy this week?

I had an interesting bug where the collatz cycles I calculated for some numbers were off. I hadn’t noticed until I compared by answers to those of other students’ test cases. As it turns out, this was caused by an overflow in the int value I was using, and it was fixed by using an int64_t instead.

That’s not very interesting by itself. What is interesting is that, after the overflowed value made it into the “value > 1” loop, it made it through an if (value < 1000000) and triggered a segmentation fault in the array I was using to store collatz cycles. However, if I added a (value > 1) to the if-statement, the value didn’t trigger the segfault. I still haven’t figured out why this happened, but it was a weird error and I was amused when I found out what the root cause was.

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

My tip of the week is to go outside sometimes! It’s really easy to get caught up in coding and not take breaks, but going outside every now and then can increase your energy levels and help you stay sane.

--

--