CS371p Fall 2022: Karen Tseng — Week 3

Karen T
3 min readSep 10, 2022

--

1. What did you do this past week?

This week, I implemented eager caching in my Collatz code. After making sure I was still passing all three HackerRank tests, I created acceptance tests and merged these to the public test repository. I was having trouble with the merge request because I couldn’t figure out how to merge only the commit where I added my tests. I had pushed my code to my forked version of the repository before pulling recent changes from the public test repository. As a result, when I tried to submit a merge request, the merge request was trying to merge both my tests and the other student’s acceptance tests that I had just pulled. I ended up deleting the test repository that I had set up before and re-forking the public repository again. After finally creating the merge request with only my acceptance tests, I started on documenting my code.

2. What’s in your way?

I am not blocked by anything. However, I do wish we had an example of what good documentation looks like for this course. I have had professors that wanted a lot of documentation and also worked in situations where the team wanted to have no documentation in the source files. Having an example to compare against would give me a better idea about what is expected from this class and make me feel more confident in what I need to turn in on Monday.

3. What will you do next week?

This weekend and Monday, I will be finalizing my repository for submission, such as finishing documentation for Project 1, filling out the README, and creating the git log file. If Project 2 gets released this coming week, I will start on that. I prefer to start on projects early so I have a lot of leeway if I get stuck on a bug.

4. What did you think of Paper #3: Continuous Integration?

I have used CI/CD pipelines during my internships before, but I really liked how the paper explained it. I didn’t quite understand what CI/CD was before and thought it just meant using pipelines. I now realize that pipelines are a way to add CI, but CI itself is the process of committing frequently and having automatic building and integration testing when code changes are committed to the repository. I also never thought to use commits as a way of communication across team members and to facilitate debugging. I plan on trying to put the latter into practice this semester with our remaining projects.

5. What was your experience of exceptions, char*, std::string, and ==? (this question will vary, week to week)

I have used exceptions in Java, and I feel like exceptions in C++ work very similarly. I was quite surprised at how == must be defined before our code can even compile. I am used to Java and Python providing a default implementation for comparisons, so it was interesting to see that C++ doesn’t have something similar. I find std::string to be a very nice wrapper around char*. I remember that dealing with strings as char arrays in C tended to be a bit tedious and I was always prone to making mistakes like going out of bounds or forgetting to call strcmp(). It will be nice to have a class that helps abstract away some of those details.

6. What made you happy this week?

I was very happy for the long weekend. I got more time to destress and have fun with my family. I also got to catch up with a really good friend from junior high that I haven’t seen for a couple of years.

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

My tip-of-the-week is to write down how to perform git operations that you use often. I get confused a lot when using git, such as how to set an upstream target and how to initialize a repository. If you write down the commands you need for these operations, it saves you from having to google the same things every time you run across them.

--

--