Before the consumer could purchase our products from Assignment 1, we had to develop a login and register feature page for Assignment 2. The goal was to upgrade the website by adding a login and registration form in order to make it more user-friendly. To access the invoice, the user must login to their account or register in order to purchase the products in the store. Users must be logged in to access the invoice. Otherwise, the user will be blocked and redirected to the products page.
This assignment was extremely valuable as I learned to enhance the website and make it more interactive and personalized. I learned more about how to handle the data from the user’s registration information so that they may log in anytime they visit the website. This is because once the user is registered, their information is saved and stored. I also learned more about the importance of query strings and executing an alert through server.js. Overall, creating an elegant structure can lead to simple code for the long-run.
I did not work with a partner.
I contacted the professor for guidance and received help through both Zoom and email. I needed help with pushing the validation errors to an alert on the website. Although I saw the messages in the terminal, I had conflict with displaying the messages for users to view. Then, I also had trouble with displaying the user’s name and email for personalization, but it turned out that I didn’t generate a new query string for the email. Once I added a new query string to my previous string, both of my problems (personal message and blocking non-user from invoice) were solved at once.
This assignment was difficult, but it was not as hectic as assignment 1. I say that because I barely had knowledge of why we had to use server.js until 3 days into assignment 1, but luckily our due date was extended. My node app server would also crash in assignment 1 and I had no idea why, and the process of debugging was still unfamiliar. For assignment 2; however, I knew how to solve more problems because I got the hang of creating my own server and using console.log to check for functionality. Once I encountered a problem, I would attempt to solve it and also seek guidance from the professor. After the help, I would think more critically about my code and also did more research to understand concepts. Although, there were countless minor errors because as the code in server.js continued to extend, my variables were all mixed up in my mind. It’s highly recommended to be organized.
For thinking about how to do something, it took 20% of my time because I had to visually understand the overall picture of the assignment before getting started. The directions were very detailed, so I wanted to have an idea of each procedure’s purpose.
As for writing code, it took 30% of my time. Surprisingly, writing code is pretty fast when my brain starts to click (not testing code). It takes a numerous amount of time to learn and break out of the confusion bubble, but when everything starts to make sense, the writing code process occurs quickly. This works better when I don’t shove a bunch of goals in one sitting. However, I have one focus before moving onto the next.
For testing and debugging, this took 50% of my time as there were endless problems after another. It’s all a part of the process and it helped me pay attention to every detail because a minor error could be calling a variable that hasn’t existed (exists in /login but not in /register). Some errors would also require me to go through code without having the system tell me what it couldn’t gather. For backup, I always have various copies of the assignment in case I go way off track. Similar to the WODs, I would erase the progress that didn’t work out and go to the recent copy of my assignment before errors occurred, and restart the process with more attention to detail. However, I don’t recommend deleting unsuccessful progress all the time, but it may be helpful if your thoughts are scattered (then, having a fresh start may be beneficial). Otherwise, finding out the solution is worthwhile as you can learn from your mistakes and habits.
Starting early definitely worked well. Although I didn’t start one week early, starting on the weekends helped a lot because I would have the base started and begin to ask questions during the week. However, what didn’t work well was not having knowledge on query strings. I would always forget to tie in my code with the new query and how inspecting the query in the address bar could be helpful in solving problems.