Skip to content

Instantly share code, notes, and snippets.

View deborahleehamel's full-sized avatar

Deborah Hamel deborahleehamel

View GitHub Profile

Introduction to Sinatra

1. What is the purpose of the server file (routing)?

Acts as a gateway. Takes request and parses any logic and displays, renders or redirects as code indicates.

2. How do you pass variables into the views?

Variables can be passed into views by setting instance variables or sending local variables that can be referenced in your erb view files respectively.

3. How can we interpolate ruby into a view (html)?

@deborahleehamel
deborahleehamel / cfu_crud_in_sinatra.markdown
Last active March 23, 2016 04:23 — forked from rwarbelow/cfu_crud_in_sinatra.markdown
CRUD in Sinatra -- Check for Understanding

###Define CRUD.

C - Create R - Read U - Update D - Delete

###There are seven verb + path combinations that are necessary in a basic Sinatra app in order to provide full CRUD functionality. List each of the seven combinations, and explain what each is for.

GET/tasks

## Models, Databases, Relationships in Rails
#### What is the difference between a primary key and a foreign key? Where would we find a primary key? What would it be called by default? Where would we find a foreign key? What is the naming convention for a foreign key?
Primary key is the original id generated when a table is created. <br />
Foreign key is the relationship to another object in another table and is formatted with ending _id.<br />
#### Write down one example of:
* a `one-to-one `relationship.
one person has one social security number<br />
@deborahleehamel
deborahleehamel / git_commit_messages_helper.md
Last active February 13, 2018 21:11
Proper git commit messages

Proper git messages - Rules and examples

##The seven rules of a great git commit message

  1. Separate subject from body with a blank line
  2. Limit the subject line to 50 characters
  3. Capitalize the subject line
  4. Do not end the subject line with a period
  5. Use the imperative mood in the subject line
  6. Wrap the body at 72 characters
  7. Use the body to explain what and why vs. how

Libraries as Incubators for Tech Literacy

Public Libraries are not just books

  • Libraries seem under the radar, but are evolving into accessible and thriving modern learning spaces/hubs

Libraries can meet a critical need in a community

  • Digital divide
  • Basic computer literacy
  • Access to technology, agency for individuals
  • Closing gaps - library as equalizer

#Asset Pipeline Scavenger Hunt

####What does it mean to concatenate files? Find an image of an example concatenated file.

  • Sprockets concatenates all JavaScript files into one master .js file
  • and all CSS files into one master .css file.
  • reduce the number of requests that a browser makes to render a web page

####Why would we want to concatenate files?

  • can mean faster loading for your application
  • Web browsers are limited in the number of requests that they can make in parallel,

##What is an INNER JOIN? Inner join returns records that match in both tables. An inner join requires each row in the two joined tables to have matching rows ##What is an LEFT OUTER JOIN? Left outer join has all tables in left table (say A). returns all the values from an inner join plus all values in the left table that do not match to the right table, including rows with empty values in the link column. ##What is an RIGHT OUTER JOIN? A right outer join is just like left outer join reversed. Every row from the "right" table (say B) will appear in the joined table at least once. If no matching row from the "left" table (A) exists, NULL will appear in columns from A for those rows that have no match in B.

##Question - What does SERIAL do? SERIAL is used for ids

#Shadowing Visit to Cognizant Quickleft

####Something that was unexpected about dev team environment:

  • The dog 'Luna'
  • the new company role within Cognizant
  • no longer consulting really? One fact that stuck with me is that Cognizant has 200,000 back end devs in India.

####General info on how the team collaborates:

  • Team Retro was cool - particularly the Fibonacci Ranking system / everyone announcing their score at once.
  • It did seem that the people working in Boulder were negotiating the challenges of working with projects and teams that are separated from each other. I think the Quickleft culture wants to try and influence this.
Length Points Week
15 minutes 5 Week 1

ES6 Research

Throughout the module (and your journey to Google enlightenment while working on IdeaBox2.0) you may notice a few different ways that JavaScript code is being written.

That might have something to do with something called ES6 and ES5

##Leap My code: here

  • Responder #1 (here) - This responder defined new variables for each condition check rather than the if/return I chose.

  • Responder #2 (here) - This person also used the if/return conditionals, but separated the last condition in a separate check.

  • Responder #3 (here) - This user did an explicit check for every condition.

##Hamming My code: here