Homework 1 Reflection

You can find the Reflection For Homework 2 here :Homework 2 Reflection.

You can also find the Reflection for Homework 3 here:Homework 3 Reflection

Coding

Time spent: I spent approximately 2 full days on this assignment.

Where most time was spent: The majority of my time was spent debugging my request handlers, fixing configuration issues, and dealing with unexpected behavior in TypeScript, such as mismatches in response types and type-related errors. Additionally, a significant amount of time was dedicated to ensuring database queries worked correctly and did not result in duplicate insertions or other issues.

Struggles: I struggled with a combination of TypeScript and runtime debugging. Issues such as incorrect destructuring of objects, untyped or mistyped responses, and difficulties configuring dependencies (e.g., ensuring all imports worked correctly) took a lot of effort to resolve.

Improvements: Having more examples of how to debug TypeScript effectively in this kind of project setup or clearer guidelines on designing robust APIs would have significantly helped reduce the time spent debugging.

TypeScript

Bugs TypeScript helped catch: TypeScript caught several issues, such as:

Bugs TypeScript did not catch:

Struggles with types: I struggled with typing Axios responses properly, especially when handling errors. For example, accessing `response.data` properties on an AxiosError was challenging as TypeScript flagged them as `unknown`. Understanding how to handle union types in response objects is still something I need to work on.

Testing

Experience: Writing tests was both rewarding and frustrating. It was rewarding because well-written tests ensured my API behaved correctly, but debugging failing tests, especially when the issue was with the test setup or database state, was frustrating.

Impact on development: Writing tests helped me uncover several issues:

Future improvements: