• Home
  • Interactive Resume
  • Blog
    • Coding
    • Health & Fitness
    • Success & Lifestyle
  • Contact
  • About

BAOSS

  • Home
  • Interactive Resume
  • Blog
    • Coding
    • Health & Fitness
    • Success & Lifestyle
  • Contact
  • About

Week 3 Day 3 – Practice Assessments Lessons and More Rails!

Home Coding Week 3 Day 3 – Practice Assessments Lessons and More Rails!
Week 3 Day 3 – Practice Assessments Lessons and More Rails!

Week 3 Day 3 – Practice Assessments Lessons and More Rails!

Feb 9, 2017 | Posted by Bao Le | Coding |

Man, associations are kinda confusing. I haven’t really nailed understanding the relationships just yet, but I’m getting better. There’s a fairly simple strategy on implementing it at first when you don’t quite grasp the relationship between each of the classes and it involves delving into the schema to grab foreign id’s and start from there. It seems like you’d typically start the association with a belongs_to in the class with the foreign id, and go to the class that the foreign id refers to, and set up the has_many or has_one relationship there. I feel like if I follow this convention for now, I’ll be able to intimately understand relationships a lot better. It’s a bit ironic though, that as verbose and English-like Ruby on Rails is, if you try to understand the relationship by interpreting the belongs_to and has_many on English terms, you’ll get confused.

Regardless, my partner and I did fairly well today on the associations exercises. Well enough in fact, that I decided to do the practice assessment that night. Lol…. not exactly as confident afterwards, but here’s the thing, I learned A LOT from just taking the practice assessment. The sheer amount of practice I was able to get from doing the practice assessment helped me with understanding queries a bit more as well as the associations. The associations were also tested a bit differently as well. In the projects, we’ve been testing them through pry, whereas the assessment, associations were tested through the RSpec, which was huge for naming conventions of the associations The specs were also very helpful in mapping the relationships.

Oh! A helpful tip i think would help a lot of people in understanding the relationships is to create a chart of all the different id’s that are within the schema. By doing so, you should be able to map out the base relationships, and once you have those mapped out, it’s fairly easy to map out the has-through relationships.

Last night’s readings and homeworks were difficult. Active Relations… which from what I learned is basically utilizing SQL queries with Ruby code, which is both similar and different to object-relational mapping, or ORM. Active relations also has to do with being able to treat the results of those queries as objects. I’m not too clear just yet, a lot more practice and reading needs to be done, but I’m sure I’ll get it with time!

That’s pretty much it for today, another day of study hall so I’m going to get back on those readings, homeworks and today’s project readings. Talk to everyone tomorrow!

0
Share

About Bao Le

Web Developer at Dropbox. Reach out, I'd love to connect!

Latest Posts

From Bootcamp to Dropbox: Part 2 – Success in the Program

From Bootcamp to Dropbox: Part 2 – Success in the Program

November 27, 2017

Before reading Part 2, make sure you’ve read Part 1!...

From Bootcamp to Dropbox: Part 1 – Application Process

From Bootcamp to Dropbox: Part 1 – Application Process

October 9, 2017

The Decision The decision to go into programming, without...

Signed with Dropbox!

Signed with Dropbox!

September 8, 2017

After a grueling 3 months or so, my job search has come to...

How I Overcome Rejection and Stay Motivated

How I Overcome Rejection and Stay Motivated

July 17, 2017

Having just had my first real rejection from a company I...

How I Overcome Imposter Syndrome Every Single Day

How I Overcome Imposter Syndrome Every Single Day

May 22, 2017

Before I really go into how I personally overcome imposter...

Future Googler

Future Googler

May 2, 2017

I’m finally “finished” with my interactive...

Introducing the Graduate Job Seeker Program

Introducing the Graduate Job Seeker Program

April 26, 2017

I almost forgot to blog today haha. Please expect not as...

Progress on Progress

Progress on Progress

April 25, 2017

The end of Week X Day X titles are here! And with it marks...

Week 13 Day 5 – Google Co-Working Meetup

Week 13 Day 5 – Google Co-Working Meetup

April 24, 2017

The Google meetup was absolutely dope. It was an incredible...

Week 13 Day 4 – Catching Up

Week 13 Day 4 – Catching Up

April 21, 2017

I think I have a pretty solid game plan of how to attack my...

Contact Us

We're currently offline. Send us an email and we'll get back to you, asap.

Send Message

Let’s Connect!

© 2025 · imbaoss.com

  • Facebook
  • Twitter
  • Instagram
  • LinkedIn
  • GitHub
Prev Next