Chris Jarocha cj658 Reflection for HW1


1.Coding
a. How long did you spend on this assignment? If you don't remember, give a rough estimate. It's okay if you spent very little/a lot of time on the assignment — answering this question honestly will help us figure out how to balance out this course.
I spent probably 2-3 hours on this assignment just based on the fact that I was trying to write most of the tests and the request handlers by hand.
b. Where did you spend the most time? Fixing configuration, figuring out Typescript, designing your API, writing tests, debugging your request handlers, etc.?
Most of the time was spend debugging failing tests that based off my knowledge of typescript should have been passing, it was a lot of type mismatches and fighting with zod for specific error messages
c. What did you struggle with the most? What would've improved your experience on this assignment?
A better understanding which we were required to use for this assignment would have been helpful but overall this was very doable with the material taught so far.
2. Typescript
a. Keep track of the bugs Typescript helped you catch and the ones it didn't catch. What are some of the issues Typescript helped you prevent? What are some of the holes in the type system?
I didn't really run into type issues except for trying to specify a more specific type for erro messsages in the test, I had to do a weird workaround to get AxiosError to pass as a valid test. The hole in the type system is that it cannot know hte database types and so we need zod.
b. What kinds of values did you struggle to type correctly? Are there any Typescript topics that are still confusing you?
As mentioned above, typing error possibilites was tricky.
3. Testing
a. What was your experience writing tests? Was it boring, soothing, rewarding? How did they affect your development process?
Writing tests wasn't that boring, it definitely forced me to consider the edge cases or potential failures with my system for allowing user to post or query param data certain data. The tests helped me find typos or small bugs I ahd in my code that I would not have caught just by glancing at my own code.
b. Did your tests help you find any bugs? If so, which ones?
My tests helped me find bugs especially with what I was returning from my request handlers, sometimes I was convinced I was already returning the correct messages or data but my tests proven my instinct wrong.
c. How would you structure your testing differently in the future? What did you learn while testing?
I feel like a lot of my tests for authors and books were duplicated code for 99% of it, I am wondering if there is a way to use some abstraction to make that easier to work with. I learned that I cannot trust my own code with this testing process.
4. LLMs
a. Did you use LLMs to help you write your code? If yes, explain how you used them.
I used LLMs to give me sample data for my tests, this was so that I wouldn't have to generate mock authors and books by myself but rather get a good quantity right off the bat. I also used it to explain the system design reason behind the body schema for zod and then adding the id in later. Lastly I used it to feed in the assignment requirements and double check that I didn't miss anything important.
b. If you used LLMs, reflect on how they changed your experience of coding. Did they make it more or less fun? Did they save you time? How do you think they affected what you learned from this assignment?
I think LLms improved my experience of coding, not only in terms of velocity but also in terms of understanding. WHen I got sincerly confused about what type something should be or why the starter code was designed a certain way, I could just plug it into Gemini and it could explain to me what was going on. Thus I was able to avoid some of the common frustrations where you end up spending too much time on a simple syntax or structure bug.