Skip to content
Naman on GitHub Naman on Twitter

CS 371p Spring 2024: Naman Arora

Naman Arora

What did you do this past week?

This week I worked on the IDB project with my team for my SWE class. I also worked on the Darwin project for my OOP class.

What's in your way?

I have been putting off work recently and as a result I have fallen a bit behind.

What will you do next week?

Since I have fallen a bit behind, this week I will work towards finishing my work, including the IDB project for SWE and the Darwin project for OOP.

What did you think of Paper #9. The Dependency Inversion Principle?

The Dependency Inversion Principle (DIP) is crucial in software engineering as it promotes loose coupling and high cohesion within systems, thereby increasing maintainability, scalability, and flexibility. By following the DIP, code depend on abstractions rather than concrete implementations, allowing for easier modification and extension without affecting the entire system. This principle fosters modular design, enabling components to be developed and tested independently, facilitating parallel development efforts within teams. DIP also facilitates the integration of third-party libraries or frameworks seamlessly, as it abstracts dependencies behind interfaces, shielding higher-level modules from changes in lower-level implementations. Overall, the Dependency Inversion Principle serves as a cornerstone for building robust, adaptable, and easily maintainable software systems in the ever-evolving landscape of software development.

What did you think of vector implementation, containers, and container adapters?

  • Vector Implementation: Vectors in C++ are implemented as dynamic arrays that automatically resize themselves when the number of elements exceeds the capacity. The capacity of a vector is the amount of space allocated to accommodate elements, which is typically larger than the current size to allow for growth without frequent reallocation.
  • Containers: Containers are generic classes or data structures that store collections of objects. In C++, containers provided by the STL include std::vector, std::list, std::set, std::map, std::queue, and more. Each container has its own characteristics and usage scenarios.
  • Container Adapters: Container adapters in C++ are classes that provide a specific interface to containers, adapting their functionality to a specific purpose. The two main container adapters in C++ are std::stack and std::queue, which are implemented using other containers such as vectors, lists, or deques underneath. std::stack provides a Last-In-First-Out (LIFO) data structure, while std::queue offers a First-In-First-Out (FIFO) data structure. These adapters restrict the functionality of the underlying container to mimic the behavior of stacks and queues.

What made you happy this week?

This week, my friends and I met together to cook some Indian food, which was delicious and a very enjoyable experience.

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

This week, researchers published a paper releasing their discovery of an unpatchable vulnerability in Apple's M-series chips that can leak secret encryption keys. The vulnerability is caused by the chips' data memory-dependent prefetcher (DMP), which predicts and preloads data into the CPU cache for improved performance. However, the DMP sometimes treats encrypted data values as memory addresses, prefetching data from those "addresses" and leaking information through the CPU cache side channel. While difficult to exploit, this could allow attackers to extract encryption keys over time from cryptographic operations run on the same CPU cluster. Fixing the issue would likely degrade cryptographic performance on M-series chips. Ars Technica — Unpatchable vulnerability in Apple chip leaks secret encryption keys