Skip to content

Instantly share code, notes, and snippets.

View roscalabrin's full-sized avatar

Roberta Doyle roscalabrin

View GitHub Profile
@roscalabrin
roscalabrin / rd-prework.md
Last active May 9, 2016 04:27 — forked from mbburch/prework.md
Turing pre-work Gist

Turing School Prework - Roberta Doyle

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:

@roscalabrin
roscalabrin / rails_setup.md
Last active October 23, 2016 04:12 — forked from ryanflach/rails_setup.md
Common setup for a new Rails project
  1. rails new <project_name> -d postgresql --skip-turbolinks --skip-spring -T
  • -d postgresql sets up the project to use PostgreSQL
  • --skip-turbolinks & --skip-spring creates a project that does not use turbolinks or spring
  • -T skips the creation of the test directory and use of Test::Unit
  1. In the Gemfile:
  • Available to all environments:
    • gem 'figaro' - store environment variables securely across your app (docs)
  • Inside of group :test:
    • gem 'rspec-rails' - user rspec in place of minitest (docs)
  • gem 'capybara' - act as a user navigating your site in tests (docs)

##Leap My code: here

  • Responder #1 (here) - This solution is very close to mine, but with a one line return method, which makes it more efficient.

  • Responder #2 (here) - I liked this implementation. It's short and clear. Rather than using a if statement, this person is just returning the result of a combination of comparisons (true or false).

  • Responder #3 (here) - This person used a nested conditional, which made the implementation more complicated than what it needed to be.

  • Responder #4 (here) - This solution used an if statement, however the user added an extra step to return false in case that the else if statement evaluated false, which is unnecessary.