Veronica Lopez


My Developer Blog

JS Hoisting and Scope

Hoisting and scope in JS are both something I’ve had to wrestle around with. Talking about it is easier than predicting what a function will return. In javascript, hoisting is when and how we access variables in our program. Functions create new execution contexts which have two phases: the compile phase(first) and the execution phase(second). During the compile phase, declarations, not assignments, are being raised to the top of the current scope. Declarations are evaluated before the rest of our code gets run. A variable assignment without a declaration creates that variable in the global scope. Try to guess the output: ``` console.log(a)


Project 4 - Rails API with JS frontend

As I finally complete project 4, Rails API with JS frontend, I can say that was by far the hardest assignment for me so far. The front end set up was easier because I’m much more comfortable with Rails than JS. The backend took me probably two hours total. The frontend was the hard part and I think it was because it felt like we had a lot less time to learn Javascript. Also, the concepts in my opinion are just a lot harder to grasp; I definetely need to keep practicing. My cohort lead said something that relieved some of my nervousness: People typically enjoy React because it takes care of some issues you might run into with vanilla JS. One issue I ran into while working on this app was the rack-cors gem and Cross-Origin Requests. After I installed the gem ‘rack-cors’, there was some code that needed to be commented out in config/initializers/cors.rb:


My third Flatiron School project - Rails

I thought, “Oh no, the time has come again, another project?”. I started thinking about what kind of app I wanted to build. I’ve been cooking a lot so I thought maybe I’d add onto/convert my Recipes app. Then I thought it might be more advantageous for me to build a completely new project; I’d learn more. So I decided to build an app that allows you to track your workouts. You can let the app know what you focused on as well as what exercises you did while working out. You can login in with an email and password or login via facebook.


Sinatra Project

I just completed my second portfolio project which is a Web App using Sinatra and ActiveRecord. This was very challenging for me. I had to review some concepts that I thought I already had down. I had to force myself to keep trying even when I felt discouraged and like I couldn’t get past certain obstacles. Getting feedback and talking with some people in my cohort really helped, reminding me that I wasn’t the only one struggling and we all have things to overcome. My project is a simple recipe web app that allows you to Signup and Login with password encryption to make sure your information is kept safe. Once logged in, you can create a recipe or read recipes posted by all users of the app. You can also update and delete recipes but only if you’re the author. Even though my app is pretty simple, I’m still proud of myself. I have yet to style it with CSS so I’ll be working on that with any free time I have available. I’m nervous but very excited to be moving onto the next part of the curriculum - Rails!


My first portfolio project (CLI Data Gem)

First thought: Well, that was intense!