CS 371p Fall 2026: Dhruva Kumar

Dhruva Kumar wearing a suit and tie

This week, references, pointers and their relationships started making more sense to me. Unfortunatlely, I did pretty badly on the quiz on wednesday: I got a 0/4. Even on Friday’s quiz, I somehow did not remember all of the correct answers, so I had to reason about the problems and get help from the folks sitting around me.

For my mental framework, I think that treating references as the original type but unable to be reassigned and requiring lvalue to be assigned to them helped differentiate them from pointers. In contrast, the pointers really can take numerical rvalues, but those rvalues represent an address which can be dereferenced.

Additionally, I liked Prof. Downing’s comparison of Pointers to an optional type - It’s good for me to remember that C++ is a strongly typed language, and that unlike Python, I can’t just set whatever I want to None or NULL.

I am still struggling with the idea that functions can return either int& or int - and an int variable can take in an int& as its rvalue, and then just copy it. That is an area I may try to work with ChatGPT and the notes to get some examples, explain my current reasoning to AI, and get it to poke holes which I can then close in my understanding.

I am starting to get more comfortable with the ed exercises. I was able to complete the exercise this week within about 5 minutes, and I was fairly happy with my solution-I looped while a and b were both not null, then checked whichever had remnant strings left to be greater (or if neither, they were equal). I was amazed at the conciseness of Prof. Downing’s solution, though.

It will be interesting to learn how exception handling works in C++. Handling exceptions cleanly is very useful when it comes to well written software, as in combination with assertions, we can hold the invariants to be true, and handle odd inputs to our program instead of just crashing unceremoniously. Even though C and C++ sound like they would only be incrementally different by the name, it’s surprising how many more features and conveniences C++ has (although no garbage collection).

My tip of the week is to try compacting more often when working with Claude, especially. My pick of the week is the Matt Pocock /teach skill: https://www.aihero.dev/skills-teach

I think his idea to add statefulness to AI pedagogy will be interesting to experiment with. I am still not entirely sure if the past context state will worsen the teaching outputs of the agent or improve them, but it can’t hurt for all of us to try.