CS371g Final Entry — Matt Lang

Matthew G Lang
4 min readJul 24, 2021

How well do you think the course conveyed those takeaways?

I will go over each of these “long-term takeaways”.

  • test first, test during, test after; test, test, test

This was very well enforced in class. You will write tests and they will help you.

  • when designing algorithms, demand the weakest iterators (e.g. bidirectional vs. random access)

We very much used only what we needed. I think this is a very good thing to learn, as it is common to have many knives in your drawer without knowing which one best handles the job. However, when someone comes to you with something to cut, don’t turn them away because they’re using a pairing knife instead of a chef’s knife.

  • when designing containers, provide the strongest iterators (e.g. random access vs bidirectional)

If you have a chef’s knife, use the damn chef’s knife. Giving someone the strongest iterator makes certain things (such as finding the distance between two iterators) a constant-time operation (subtract the two instead of incrementing).

  • build adapters on top of containers and iterators

You’ll do this with the Integer project. You’ll realize that not re-inventing the wheel is not only easier but more efficient.

  • do not use new and delete, use allocators instead

I don’t feel as if I can provide great perspective on this. However, you’re probably doing something wrong if you use new or delete. If you need a pointer, use smart pointers. If only one function handles a pointer, declare it std::unique_ptr and use std::make_unique and std::make_shared if you’re not using your own allocator, though you won’t have to worry much about this in this class (and I think that’s a good thing).

  • always look for reuse and symmetry in your code

I think this comes easy in this class. You’re going to write and spend time on plenty of code. You’re going to look for smart ways to do things to cut the time. This should be pretty self-explanatory.

  • collaboration is essential to the quality of your code and to your well-being in producing it

For the love of God, please get a partner. Especially if you don’t breathe C++, you’re going to need someone else’s perspective with these projects. I have made the mistake of trying (and failing) to do everything back in OS. If anything, I’ve made good friends struggling with partners.

  • refactor, refactor, refactor
  • make your code beautiful

Like reuse and symmetry, these should come naturally in finding ways to understand your code and stay sane.

Were there any other particular takaways for you?

I really think pair programming is the right way to do most things. I thoroughly enjoy programming when working with someone else, and it’s hard to be as enthusiastic without someone else.

How did you feel about cold calling?

At the very least, it was very smart for Professor Downing to incorporate this into the class. Not only did it help me pay attention, but also took away any anxiety about speaking up voluntarily during class (asking questions).

How did you feel about grading?

I’m not a huge fan of the EMRN scale, as it felt less straightforward. However, since I have a B for my quiz grades, it allows me to skip the final project. Take what you want from that.

How did you feel about office hours?

I wish I went earlier. Amogh and Professor Downing went out of their way to help via office hours. Amogh hung out in the class Discord more than what his regular office hours called for. Not only will it help your grade, but you get a free “virtual token” for going. If you find a question that takes longer than half an hour to find on Google, please go to office hours. Classes will either teach C++ as “C with classes” (wrong!) or as Modern C++ (right!). You will get answers in the style of the latter.

How did you feel about support from Amogh?

Amogh went above and beyond what is expected of a TA. I give him an “E”.

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

If I didn’t know what the hell a piece of code was doing, I would throw it in cppinsights to get a better understanding. It will show what code is created when you write something. There’s a code sample in the editor that does a better job explaining what it does than I could.

Give me your suggestions for improving the course.

I’m glad to say this is a hard question to answer. I would strongly suggest looking into and considering the feedback of the grading feedback from my fellow students. Because I am B-bounded in the class, my thought process is “may as well skip the last project”. As a student with a fat plate, I’m fine with this statement. In my view, I am satisfied with what I learned sans the final project. I would take a second look at the grading scale if you disagree.

This class was more than worth taking. As someone wanting to learn modern C++, it was an invaluable experience. Thank you so much, Amogh and Professor Downing.

--

--