I don't remember the exact time I spent on the assignment, but I think it took me around 6 hours. A considerable chunk of time was checking how to make the SQL queries with multiple query parameters that are also optional. Ended up having the base GET queries end with "WHERE 1=1", and then adding "AND blahblahblah" if there was a query parameter in the request. That and making sure the configurations were working properly. I did have issues with VSCode saying z from zod couldn't be found, but running npm build had no issues. I would say I struggled with ensuring Typescript was happy when writing my code. Not sure if anything could have been done related to Typescript to improve my experience on this assignment. I just need to get used to it more.
The most memberable issue Typescript helped prevent was when I was writing a tests meant for the Author object, but was zoned out and was typing Book related attributes. I didn't notice any bugs it didn't catch, but I'm think the holes in the type system are when a variable is type casted to mulitple types.
I didn't really struggle with type casting things correctly, but it does get annoying when I was trying to figure out what a certain function returned to make sure I can doing things properly (like ensuring functions from Number like is NaN were the correct type). I'm not that confused by typescript, but I still need more experience with it. And at work, I did have to move some older code to a new repo with a new Angular version and Typescript version, and it is annoying to get the code to work because of typescript changes made over the years that made the older code generate errors.
My experience writing tests for this assignment was boring. It didn't really affect my development progress, and I wrote them after writing my code. I didn't find any bugs after writing them, so I was manually testing my API using Postman. I could have written my tests before my code TLD style, but I'm not really sure what improvements I could have done to improve the structure of my tests. These tests weren't anything crazy, so I'm not sure if I learned much about testing. Maybe if I had to do mocking what I learn a bit more.