CS371p Spring 2022: Week 9

CS371p Spring 2022: Week 9

  1. 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.
  2. 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.
  3. What will you do next week? I’ll finish up the Allocator project, continue reviewing my notes, and continue attending the lectures.
  4. 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.
  5. 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.
  6. 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!
  7. 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.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store