For my final project, I decided to build a mock Airbnb application. Going into it, I was very nervous because React and Redux were both so new to me. I struggled a lot trying to understand how they work while going through the lessons, but as I worked on my project things started clicking more and more for me. I’m still not 100% confident in using them, but I’m much more so than I was just a week ago. This project was a huge learning experience and an emotional rollercoaster but I feel more secure in my coding skills after building it. If I could improve on it, I would implement a user model. Currently, anyone can add or delete any listing or booking so adding a user model would ensure that only the owner of a listing can delete it, etc. I would also implement some sort of visual calendar to show which days a listing already has bookings for while creating a new booking. I would also allow for images of a listing to be submitted and displayed when creating a listing. Over all though, I’m proud of myself for getting through this project. It was my first time really trying to use bootstrap effectively. My styling turned out to be simple but visually appealing, which was my goal! In conclusion, I’m glad that I had this experience to test my skills. I’m excited to work on my craft and use these skills for future projects.
“Hoisting” refers to Javascript’s default behavior of raising function and variable declarations to the top of a given scope. For example, you could invoke a function before defining it and it would still be carried out where it was invoked. This is because Javascript reads files in two phases: the compilation phase, and the execution phase. During the compliation phase, all invocations of functions and variables are skipped over while function and variable declarations are read and stored in memory, so when Javascript reads an invocation during the second phase, the declaration for that invocation has already been created. When declaring a variable using var, you might run into some hoisting issues. When a variable is declared, its value is undefined until it gets assigned one, which doesn’t happen until the execution phase. Because of this, invoking that variable before it is declared will cause that variable’s value to be undefined in that invocation, since at that point in time, that’s what the variable’s stored value is. Unlike with var, if you declare a variable using let or const after invoking it, you will get a “variable is not defined” error instead of that variable existing with a value of undefined. This is because Javascript doesn’t allow let and const to be referenced before they are initialized. In either case, to be on the safe side you should try to always define your variables before they’re invoked.
Making this project was a bit of a journey. At first, I didn’t know whether to do something difficult and impressive, or simple and easy for this project. I eventually settled on the latter for fear of not finishing on time. I tried to go for something practical. To me, an app where you could post recipes and have a shopping list made for you from those recipes’ ingredients was both practical and took care of the has-many relationship that was required. While I was building the app, I was relying on selecting a specific child of certain elements to carry out my functionalities. I now know that this was bad practice and I should have been assigning those elements their own ids, but by the time I realized that I should have changed things, I was already in too deep. As expected, when I tried to change things up it was difficult because “element.children[3]” might have changed while I was switching things around. I’ll try not to do this for future projects. On the bright side, I learned a ton about Javascript while creating this project and I actually really enjoyed working with it! I’m becoming a much better problem-solver and a much better programmer! I’m looking forward to learning even more while creating the next project.
My experience with this project was an emotional rollercoaster. I was actually supposed to finish it about a month ago with my previous cohort, but because I took so long doing the Sinatra project, I was behind on studying the Rails section. Because of this, I was sort of just rushing through all the material and I wasn’t fully absorbing everything. Of course, this lead to a lot of panicking when it came down to project week. I felt so lost and discouraged because I felt like I wasn’t prepared at all. It was very difficult, but I made the decision to move to the next cohort so I could repeat the Rails section. At first, I was so dissappointed in myself. I knew I could’ve done better. But as time went on and as I went through the lessons that I had gone through before, I realized that I was learning more than ever! When it came to redoing my Rails project, I felt so much more confident and comfortable in my knowledge. This time around, I had a much better plan of what I wanted my site to be, and when things got tough, I didn’t panic! I’m so proud of myself and how far I’ve come in so little time.
My Sinatra project is a very simple web application where you can sign in as a user and create your own penguins, as well as edit and delete them. To be honest, I’m not happy at all with the way this turned out. All the basic structures and features are there, but I imagined it to be much more grand with css styling and even a visual representation of your penguin. Time got the best of me though, so I had to settle for what I have now. Even if I’m disappointed with how it turned out, I still learned so much from this project. Now, when I look at websites such as Twitter and Facebook, I can begin to understand how they might’ve been constructed.