- screenshots of scores will be posted in comments
- screenshots of completed sections will be posted in comments
....aaaaand here it is!
This exercise is intended to help you assess your progress with the concepts and techniques we've covered during the week.
For these questions, write a short snippet of code that meets
the requirement. Fill in your answers on a second sheet of paper or in your
notebook. In cases where the question mentions a "given"
data value, use the variable given
to refer to it (instead of re-writing
the information).
You might reach out to use factory girl because it's familiar. That makes sense. I felt the same way. Recently I worked to overcome that to learn a bit more about fabrication and what its all about. I'll share with you what I found.
Check out fabrication at it's slick website [fabrication.org][0] or on [github][1]. The setup is very familiar if you've dealt with factory girl, just toss the line in your gemfile and make a a sub-folder fabricators
in your rails project's spec folder. From there you can create a file called fabricator.rb
where the actual magic happens.
Additionally in my last project, I paired fabrication with [faker][2], a gem that spews out random data on command with fun categories like "hipster", "starwars", and "superhero". Again it's a simple add to your project's gemfile.
Generate a new project without the included testing and with a postgres database:
rails new MyApp --skip-turbolinks --skip-spring -T --database=postgresql
Add VCR
group :test do
gem 'vcr'
gem 'webmock'
The project provides a central organizational structure for the parties involved in a construction project (supervisor, home-owner, worker).
When a construction crew has multiple jobs in a day the details of the jobs and what the crew needs to do are often confused. The workers might show up to a location not knowing the exact nature of the job and not having any contact with the home-owner. The home-owner is able to communicate concerns/vital details to the actual workers that will be doing that job (since they communicate with the supervisor).
It's interesting that javascript can be both functional and object oriented. I'd love to have more time to dig into the differences between the two paradigms and learn about which features of a given language are a hard-stop from using it in one style or another. I had no idea that built-in map() and reduce() functions are a feature of functional languages. This seems very familiar from Ruby. Javascript failing silently is an intimidating feature and we'll have to be extra vigilant about syntax and the rules that are in play. I found most if not all of this chapter interesting, although portions of the reading (notably some computer science terms) I didn't understand fully.
I do think the reading was valuable. It's a very short chapter but lays out something of a high level map/orientation for Javascript. I personally find it a great resource to later revisit and look into the different languages tha
##Contributing to Factory Girl #####Why We've all used FactoryGirl in our rails projects and it would be great to get some understanding into how it works by cracking it open while contributing to an issue
#####What I found an issue opened a few days ago that claims factorygirl will ignore similarly named fields and fail when trying to override these fields in the creation of the object.
#####I Need
To setup a simple rails project with a product model with those same fields to reproduce the error. I'll also need to crack open/familiarize myself with how factorygirl does it's magic, pontentially starting with the lead that was mentioned in the issue AttributeAssigner#alias_names_to_ignore
. I'll also need to look more closely into their contribution policies.