CS371p Spring 2021: Week 11

Samuel Turner
2 min readApr 12, 2021

Blog 11

What did you do this past week?

The first half was spent taking tests/quizzes in other classes and catching up on reading. The latter half was spent getting started and working on the Darwin project.

What’s in your way?

I would like to spend time polishing up Darwin and seeing if I got rid of all the unnecessary getters and setters, but have other assignments that are also due near the beginning of the week.

What will you do next week?

Finish the aforementioned other assignments. I hopefully will have time afterwards to look over the Darwin project for any improvements or refactoring I can do.

If you read it, what did you think of the Why getter and setter methods are evil?

It made a lot of sense. I have personally abused getters and setters when I first started programming, usually by making everything public and not even bothering with accessor methods. Every time a bug or misunderstanding in the spec arose, I would have to go back and change every instance where I used that class. I understand now that this rigidity and over-reliance is a bad practice.

What was your experience of vector, move constructor, move assignment, and allocator? (this question will vary, week to week)

I did not know of the move constructor before or of any of the specifics surrounding it. I also did not know or even consider that providing an allocator might be necessary in creating a vector. At first glance it seems like it may be revealing too much of vector’s underlying implementation, but I can see how it is necessary in certain cases. There were also a lot of cases in doing the exercise where only a couple lines of code were written, but many things were happening underneath. It made me realize that understanding how underlying things function can allow these sort of shortcuts to be made.

What made you happy this week?

I was able to make good progress on the Darwin project throughout the week without too much procrastination. It felt good being able to work on it relatively stress free.

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

This was recommended to me by another classmate, but I used lucid chart for the UML diagram for the Darwin project. It was pretty cool and easy to use and would recommend if you’re looking for another tool to design the UML.

--

--