1.
It took me around 8 hours to complete the assignment.
2.
Most of the time was spent fixing configuration and fixing the package.json. But there was just a large amount of work overall that consumed time like creating the endpoints and writing tests for them. But after figuring out some of the endpoints, a lot of the logic was reusable. I also had some issues with the database while running tests.
3.
I struggled a lot with fixing the configuration. Also it was kinda weird error handling without any. I think this assignment is a little long and tedious at times with the test cases.
1.
I think TypeScript did help prevent some bugs, such as handling malformed input with zod. It was also helpful for making sure types came in appropriately like in req.params.id. Some holes would be a lot of bugs aren't really shown until I run the code.
2.
I think I struggled with values that were sometimes untyped like req.params or req.query which could sometimes be undefined. It was also weird handling different types of errors.
1.
Writing tests was ok at first then became very tedious and boring. I reused a lot of the widget code. I like to write the code first then write the tests, refactoring when I needed.
2.
I did find some bugs through testing like author_id being TEXT and not an integer that I didn't catch.
3.
I'm not sure how I would structure the tests differently. Maybe a bigger variety of data. I learned that it may be better to mock the database for the future as it was confusing clearing and writing the database for the tests.
1.
I did use LLMs to help with writing some of the test cases, as well as debugging, especially with configuration.
2.
It didn't make it more or less fun. It did save me some time especially writing some test cases which are very tedious and annoying to write. I think it helped me learn on the assignment as the LLM does a good job explaining the code it generates, as well as let me ask follow up questions. Overall though, I found this assignment kinda long, especially since we also have readings and class activities which I never can actually finish in class and becomes take home homework, making the long homework feel more stressful.