CS371p Fall 2021: Maxwell Xu: Final Entry

Maxwell Xu
3 min readDec 5, 2021

--

Long-term takeaways from this class:

  • test first, test during, test after; test, test, test
  • when designing algorithms, demand the weakest iterators (e.g., bidirectional vs. random access)
  • when designing containers, provide the strongest iterators (e.g., random access vs. bidirectional)
  • build adapters on top of containers and iterators
  • do not use new and delete; use allocators instead
  • always look for reuse and symmetry in your code
  • collaboration is essential to the quality of your code and to your well-being in producing it
  • refactor, refactor, refactor
  • make your code beautiful

___________________________________________________________________

How well do you think the course conveyed these takeaways?

As I look back upon this course, I can definitely remember moments that professor Downing hammered these points in and emphasized how important they were. Their importance was continually stressed and I think I will be able to remember them in the future.

Were there any other particular takeaways for you?

There aren’t any specific takeaways, but throughout this semester I’ve learned many OOP design principles that I haven’t been paying attention to before, such as eliminating getters/setters or other practices talked about in the papers we’ve read.

How did you feel about cold calling?

I was okay with it because I did not get called on that often, but I feel like there were many people that got called on repeatedly, and if I were one of those people I may have gotten more annoyed with the cold calling.

How did you feel about specifications grading?

Definitely a change of pace from any other class I’ve taken. I did not enjoy how even a single category can drop your grade by an entire letter. Even if it turned out fine in the end, there was constant stress caused by the grading system that made me continually worried I would end this class with a bad grade.

How did you feel about help sessions and office hours?

I liked how there was an incentive to go to these in the form of a virtual token. There are many people, myself included, who wouldn’t otherwise go, but they are definitely really helpful.

How did you feel about the support from the TAs?

They were active on edDiscussion and in the chat during class. They were overall very helpful.

What required tool did you not know and now find very useful?

Valgrind is very useful for detecting memory leaks. I knew this existed before, but never really knew how to actually use it.

You should have read five papers that describe SOLID design: Single responsibility, Open-closed principle, Liskov substitution, Interface segregation, Dependency inversion. What insights have they given you?

They were all interesting individually, but they also all tied together to form a more cohesive message. Two insights I have learned from these is to make class relationships stable so that a modification to a class doesn’t force changes in other code and to expose the implementation of a class as little as possible.

You should have read two papers that advised minimizing getters and setters. What insights have they given you?

This ties in to the second of the insights from the other papers described above. Getters and setters expose how a class is implemented, so they should be used as little as possible. When a class is exposed, it makes the code unstable and requires significant changes to code if the class is changed.

Give me your suggestions for improving the course, but apologies in advance; specifications grading will remain.

I think overall there was a lot of work involved in this class, with us having to keep track of multiple blogs, papers, and projects all at once. The work itself was manageable, but it felt like there was constantly something that had to be done. Quizzes and exercises felt very rushed and I think everyone would appreciate it if we had more time for those. On many quizzes I did not even finish reading all the questions before my time was up.

--

--