CS371p Spring 2022: Week 9
- What did you do this past week? I attended class and worked on the Allocator project. On Monday, we talked more about the Allocator specs. On Wednesday, we did an exercise on implementing a digits iterator. On Friday, we talked about vectors.
- What’s in your way? In the Allocator project, we are trying to figure out how to generalize the allocator so that we multiply by the size of the type of object that we’re trying to allocate for, since our HackerRank solution hardcodes it and assumes that the objects will always be 8 bytes. Other than that, we need to write test cases and clean up our code/put in documentation before we can submit.
- What will you do next week? I’ll finish up the Allocator project, continue reviewing my notes, and continue attending the lectures.
- What did you think of Paper #9: Dependency Inversion Principle? I thought it was an interesting read since I had my first experience with dependency injection this past fall in my internship. At first, they sounded like they should be similar, but it turns out they’re still pretty separate things — inversion talks about a design pattern with abstractions, while injection is an implementation technique for populating class variables. I think looking for those differences helped me learn it better though.
- What was your experience of DigitsIterator, Iterators, and std::vector? The DigitsIterator exercise was pretty straightforward. I was glad that my partner and I already started to implement the iterator in the Allocator project since it was pretty similar. I’ve had a little bit of experience with C++ vectors before through practicing a little competitive programming, but definitely did not know the subtle differences that Downing went over in class.
- What made you happy this week? I finished reading a book that I started over spring break which was an extremely good read called East of Eden. It also made me happy that I had enough free time to get to read it!
- What’s your pick-of-the-week or tip-of-the-week? If you’re interested in dependency injection, take a look at Google Guice (https://github.com/google/guice). This is what I had to learn how to use in my internship to incorporate dependency injection into my project code. It’s compatible with Java and helps you configure your class variables in a more modularized way.