Every time I fell in love with a language, it happened when I started working on my portfolio projects. For each coding project I had ever embarked on, I conducted my own research, reached out to my schoolmates or to LEARN experts for help, and experimented with code. But help from my schoolmates and LEARN experts was usually limited. I was left to figure things out for myself, and these were the times when most of my learning happened. I gained a deeper understanding of the language and framework I was working on and that in turn made me fall in love with it. I have to admit that JavaScript wasn’t a language I thought I would come to even like. After having learned Ruby, the coding language that very much mirrored the English language, JavaScript was a culture shock. I have been spoiled by the ease and flexibility of Ruby. JavaScript was a tedious process of unlearning what I’d already learned. I felt like I was crawling the entire way but I made it out pretty well. In fact, JavaScript has intrigued me so much that I joined Codewars to better understanding JavaScript.
In my product page, I was trying to display a textbox in the form of a form_for formbuilder, and later display the user input on the DOM. The first step was attaching a event handler to a “Click Here to Order” button tag.
Nested form is the approach to take when we want a single form to manage and save multiple models that are associated with one another. There are plenty of resources out there to help people build forms for new parent record via existing child record, but I struggled to find resources that helped with building forms for a new child via an existing parent. Mine was also a unique situation because I wanted to classify the parent record into 2 different types.
This lab was generally easy though tedious. I built an app for users to store their intended Christmas gifts. I created 2 databases: one for the user and the other for the gifts. The main logic of how to create, read update and edit (CRUD) was pretty easy to write. However, the small details became tedious.