HW1 Reflection

Home Homework

Coding

Time spent:

I spent roughly 12 hours on this assignment.

Where did you spend the most time?

I spent most of my time debugging request handlers and ensuring that deleting an author associated with books is handled correctly.

Struggles / Improvements:

I struggled the most with getting used to TypeScript since I mostly wrote JavaScript in my previous web development course. Overall, my experience on this assignment was very good.

TypeScript

Bugs caught and holes in type system:

TypeScript helped me catch bugs related to incorrect property names, wrong types, and missing fields. I'm not entirely sure about the holes in the type system yet.

Values that were hard to type:

I struggled with type-checking dynamic values, such as IDs returned from the database. I'm still a bit confused about using Zod since I mostly relied on the starter code for parseError.

Testing

Experience writing tests:

Writing tests was sometimes repetitive but rewarding because it allowed me to confirm that my APIs were working. Tests helped me slow down and catch errors early in development.

Bugs found:

Yes, my tests helped me find bugs such as the deletion of authors who had dependent books and issues with GET endpoints not handling non-existent resources correctly.

Future testing improvements:

In the future, I might try writing tests before writing the code (TDD) to catch logical errors earlier. I also learned that it's very challenging to cover every edge case, especially as the codebase grows.

LLMs

Use of LLMs:

I used LLMs when I was stuck and needed guidance on how to continue. I also used them to help write repetitive test cases and to debug issues I couldn't resolve on my own.

Reflection:

Using LLMs made coding less challenging in the sense that I spent less time stuck on problems. While this saved time, it was slightly less satisfying because I didn't experience the same sense of accomplishment when solving difficult issues on my own. However, it helped me stay productive and complete the assignment efficiently.