How I Ended Up Here

It all started with a childhood obsession with Super Nintendo. As I grew to love the game, I wanted to learn everything about my favorite characters and their stories. However, there was a problem: the stories within the game were not in my native Portuguese but in English. Soon I noticed that I was not only missing out on the game intricacies, but also a vast amount of information on the internet that could only be accessed in English. It was the first time that I realized that I needed knowledge to achieve life goals, as well as a passion and commitment to expanding that knowledge.
Continue reading “How I Ended Up Here”

JS Tertiary Operator- FizzBuzz Solution

I decided to refactor my fizzbuzz solution in Javascript. This week we are delving into this programming language and I am enjoying it.

My goal was to see how much I could refactor my fizzbuzz code below.
Continue reading “JS Tertiary Operator- FizzBuzz Solution”

On JS and Ruby

This blog is about my musing on the differences between Javascript and Ruby, especially concerning values, variables and scope in both languages.

Values are virtually the same in Ruby and Javascript. Both are weak/loosely typed and possess strings, integers, booleans and the like. The striking difference though happens when you try to do some bizarre operations gymnastics with values in each language.

Take Ruby for instance, one would never be able to add an integer to a string.

1 + "1"
#=> TypeError: String can't be coerced into Fixnum 

Continue reading “On JS and Ruby”

Flashing the User

I learned last night the flash variable in Rails. It is a special variable that stores data temporarily.

My group at flatiron school is building an application this week and I was assigned the task to research on how to build a signup/signin functionality. The Rails flash would show the user a welcome message as soon as he/she creates an account for example.

Here is how I added the flash variable to the application. In the layouts/applications.html.erb file I used erb to iterate over the flash.
Continue reading “Flashing the User”

My First Rails Debugging Session

This morning students were given the task to debug an app built in Rails.

The app was not saving the created entries to the database and we needed to figure out why.

Well, I had an idea about it as I had previously discussed a similar problem with my smart classmate Sara. My hunch was that something was amiss when the controller told the database to save the entry.

This is how I solved the issue:
Continue reading “My First Rails Debugging Session”

And…BOOM!..It’s Rails Time

Soooo today at the Flatiron School, we learned some Rails of the first time. After practicing with Sinatra for a few weeks being introduced to Rails felt sort of odd. For example, the wind was knocked out of me when after installing rails I typed in the command line:

rails new my_first_rails_project

Boom! I had now all these folders in my_first_rails_project folder. So many that I was overwhelmed and perplexed.
Continue reading “And…BOOM!..It’s Rails Time”

Database Design- My First Attempt

Getting my hands dirty in database design, or at least trying to as this is a brand new concept for me. But I am learning on the go. I have read recently a few articles on database normalization and relational databases.

In my first attempt to design a database about my favorite video games of all time and their consoles, I came up with this:
Screen Shot 2014-01-03 at 1.38.51 PM
Continue reading “Database Design- My First Attempt”

Box-Sizing in CSS

Just learned about box sizing in CSS and before I forget I decided to write a blog post about it.

When you set the width of an element in CSS, the element will appear bigger because the border and padding stretch out the element beyond the specified width. Look at the following example, where two elements with the same width value end up different sizes as the result.
Continue reading “Box-Sizing in CSS”