I spent around 5-6 hours on this assignment, alot of it was trying to understand Typescript because I have not used much of it before. I forgot the initial assignment since I took CS375 a couple quarters ago so I had to find my old files and refresh myself on it. It also took a bit getting the routes to work especially with the filter system. The tests didnt take too long. Alot of time though was spent with bugs that kept appearing throughout the process, such as in the npm run build/start making new files and running tests that didnt seem to be the same database. There was also issues when I tried to commit and clone it causing tests to fail when it didnt on my original. Overall, I would say almost half the time was on the code, half the time on bugs. I struggled most in the syntax and proper calls of typescript. I understood how it worked and what the processes of the routes had to be but writing it was difficult, as there were some things I didnt know how to do, like for example returning the ID because I wanted to have it automatically create.
I noticed that typescript helped warned me if i tried to access fields when I am writing a tests for a route, and when I am writing a route I had to specify through type checking if the database returns a single index item or a collection of them, making sure that if there was a different type it returned back, that it would be clear that there was an issue. Some holes I can expect from Typescript is that even though I specified the type that it will get, it doesnt ensure that it will return that same one, so many times it gives me an undefined if the type it returned wasnt exactly that, which gets annoying and is extra work. I feel like I still struggle in writing the call routes and handling data that gets returned back for filtering. I am not too confident in knowing the exact way to write like "only get this specific type of data" when filtering because i feel like it varies a bit when finding the specific variable/table column. Overall, I wouldnt say I would prefer it over my other languages but maybe that will grow on me as this term continues.
I think writing tests was pretty alright, it wasnt too hard and its nice and rewarding. Especially since I was testing the curls during route, I kinda already pre tested alot of things so writing and coming up with test cases was easier. The routes werent too complex too so there wasnt much to really test and cover, just had to see if it works properly, that it doesnt work when its not supposed to, that the errorcode it returns is right, and the connections for if the book has an author related problems was checked. It didnt really find bugs, but that was mostly because i tested curls while developing so alot of the bugs and tests were culled there. I wouldnt change the structure, its working for me right now. But I learned how important it is to test every avenue that the code effects, like making sure the author part worked after implementing books because they were both intertwined in ways.
I did use LLMs mostly to help with Typescript syntaxing and formatting, and for errors relating to the NPM problems I had where it was causing problems with the files and dist/ and -p/ directories that I couldnt find answers for. It definately changed my experience of coding for the better, I think alot of the annoying parts of coding where you run into bugs where you cannot for the life of you find a solution for, it helps it immensly. I find coding more fun with LLMs and it lets me do the fun part of actually coding better. It effected what I learned relating to typsecript and react by making me not have to memorize certain parts and can just refer to it to do what I want to quickly, but I think that is kinda like the busy work that it helps me with. Not the actual learning and application part.