Skip to content

Instantly share code, notes, and snippets.

View lsaville's full-sized avatar

Lee Saville lsaville

  • Denver, CO
View GitHub Profile
@lsaville
lsaville / ls-prework.md
Last active August 18, 2016 20:50 — forked from mbburch/prework.md
An example template for your Turing pre-work Gist

Turing School Prework - Lee Saville

Task A- Practice Typing:

  • screenshots of scores will be posted in comments

Task B- Algorithmic Thinking & Logic:

  • screenshots of completed sections will be posted in comments

Task C- Create your Gist:

....aaaaand here it is!

Module 1 Week 1 Diagnostic

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).

@lsaville
lsaville / blog.md
Last active November 8, 2016 15:10

For those times when you want your tests looking good...

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.

In Action

@lsaville
lsaville / rails_projects_and_testing.md
Created January 1, 2017 23:34 — forked from epintozzi/rails_projects_and_testing.md
Setting up rails and testing

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'

WorkaDay

Pitch

The project provides a central organizational structure for the parties involved in a construction project (supervisor, home-owner, worker).

Problem

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).

  1. Transferable Skills
  2. People skills * Interview, draw out * Communicate well, in person * Serve, care for, follow instructions faithfully
  3. Skills with Data/Ideas * Use my intuition * Visualize, including three dimensions
  • Synthesize, combine parts into a whole

Instructions

  • Fork this gist
  • Do 5 JavaScript exercisms
  • Compare your completed exercises to five answers that other folks got, writing a comment of what you saw when comparing the answer
  • Fill in the template below with your work

My Submission

hello-world

Speaking Javascript

Chapter 3

What was interesting?

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.

Do you think the reading was valuable?

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

Goals

######Elixir *current status *what success looks like *resources *mentors *meet-ups/conferences *ideas *talk ideas

##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.