Assignment 2 is a continuation of Assignment 1. We had to upgrade our e-commerce website to allow users to login and register to make a new account. Data also had to be persistent where user information entered in the registration form had to be stored and used for when the user logs in. Additionally, we had to implement several security measures. For instance, users were not allowed to purchase items or access the invoice page without logging in. After a successful login, we also were required to personalize the invoice page to the user by displaying their name.
From Assignment 2, I learned about the functions readFileSync(), existsSync(), and writeFileSync(), which were all useful for being able to check if a file and a specific email exists, as well as write data to the user data file, which were all extremely useful for the login and registration pages. I also gained a better understanding of how to use query strings and how to pass errors and product quantities as query string parameters in the URL. I have also been exposed to the power of regex and its ability to specify complex patterns with different characters and symbols to match and validate data.
No, I did not work with a partner.
When I needed help, I first tried to figure it out on my own by using the resources I had available, such as W3Schools and ChatGPT. If I still needed help, I would ask my friends, but I found that we were often dealing with the same problems. Looking back on it, I realize it would have been best for me to receive help from Professor Port. Throughout this entire assignment, I needed help with passing my quantities to the invoice page.
There were more tasks involved in the development of Assignment 1, but the labs and WODs prepared us for it, so not much felt new to me. I feel that for Assignment 2, we had to apply a lot of things we learned with server-side processing from completing Assignment 1. I also think that I relied on the internet and outside resources a lot for this assignment, as I did not have much experience with many of the tasks for Assignment 2, including validations and using regex. There was also more debugging and testing involved with Assignment 2, so it took a really long time for me to move on from one specific task to the other. I somewhat wish we had a little bit more time to complete this assignment.
I would say that I took 30% of the time thinking of how to do something, 10% of the time writing code, and 60% of the time testing and debugging. For this assignment, I had to do a lot of testing and debugging for mainly passing the quantities, errors, and doing the validations.
I think besides the small setbacks I had, I think that doing the validation for login and registration was, despite being very tedious, sort of enjoyable. It also went more smoothly than expected. As I mentioned, passing quantities to the invoice page did not work well at all. While the quantities passed to the login page, I could not get it to pass to the invoice. This ate up a lot of my time and slowed my overall progress with the assignment. I would work on this one problem for hours on end, and often became so exhausted that I did not have the energy to shift to other tasks I had to do for the assignment.
If I could go back in time, I probably would have started a day or two earlier. I told myself I would start early, but I instead gave myself time to recover from finishing Assignment 1. I also mistakenly thought we would have around two weeks for this assingment from looking at past E5 essays, but we were given less time than anticipated. I also would have probably asked for help earlier, as my progress was so slow when trying to figure out problems myself, especially when I didn’t have a good understanding of what I needed to do. I found that I would often get lost in the path that the user would need to take while navigating the website and how I could execute it. I now realize that this would have probably came easier to me if I took the time to draw or write down the path so I could get a better visual understanding of what I needed to do.