Homework 1 Reflection

Coding

1. How long did you spend on this assignment? If you don’t remember, give a rough estimate.

I spent about 8 hours on this assignment. About 3 hours were spent on writing the REST API, about 3 hours were spent on manually testing, and about 2 hours were spent on writing tests.

2. Where did you spend the most time? Fixing configuration, figuring out Typescript, designing your API, writing tests, debugging your request handlers, etc.?

I spent the most amount of time designing my API. I focused a lot on the constraints and how to write them.

3. What did you struggle with the most? What would’ve improved your experience on this assignment?

I struggled the most with querying for authors and books. I found that I had to use %20 instead of spaces to query for author names or book titles.

Typescript

1. 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 found that Typescript helped me catch bugs at compile time. If a variable had an incorrect type or if I was referencing objects that did not exist, I would get an error. However, Typescript did not catch bugs at run time. If I had sent in a request with incorrect types, I did not receive an error and instead had to write my own handling.

2. What kinds of values did you struggle to type correctly? Are there any Typescript topics that are still confusing you?

I did not struggle to type anything. I wonder if this means I did not type correctly or if I did not add enough typing. Similarly, there were not any Typescript topics that confused me.

Testing

1. What was your experience writing tests? Was it boring, soothing, rewarding? How did they affect your development process?

I found writing tests to be tedious and boring. It was a lot of repetitive work testing the edge cases. I wrote the tests after I had finished developing so it did not affeect my process.

2. Did your tests help you find any bugs? If so, which ones?

My tests helped me to find incorrect return statuses and typos in my error messages. Other than this, I did not catch any other bugs.

3. How would you structure your testing differently in the future? What did you learn while testing?

While testing, I learned that the database did not clear after the tests. In the future, I would add this clearing as it made my tests difficult to write and even worse to maintain. Since this was a homework assignment, I did not refine my testing, but if it were a project, I would.

 Back