Skip to content

Instantly share code, notes, and snippets.

View erinnachen's full-sized avatar

Erinna Chen erinnachen

  • GitHub Staff
  • Seattle, WA
View GitHub Profile
@erinnachen
erinnachen / require-1511.markdown
Created May 24, 2016 13:27 — forked from rrgayhart/require-1511.markdown
The Concept of Require

When you start working with WebPack for GameTime, you'll notice that you can't just define a variable in one file and find it in another as easily as you can in Rails.

Read Node.js, Require and Exports and Organize Your Code with RequireJS

Fork this gist and answer the following questions:

  • In the context of Node, what is a module?
  • The code examples from the second blog post look very different from the first. Why?
**Step One**: Watch [Sorting Algorithms in JavaScript](https://www.youtube.com/watch?v=uRyqlhjXYQI)
**Step Two**: Fork this gist.
**Step Three**: Respond to this question in your fork: "What are some of the balances and trade offs between different sorting algoritms?"
**Step Four**: _Totally Optional_: take a look at some of the other forks and comment if the spirit moves you.
@erinnachen
erinnachen / cfu_crud_in_sinatra.markdown
Last active February 2, 2016 23:05 — forked from rwarbelow/cfu_crud_in_sinatra.markdown
CRUD in Sinatra -- Check for Understanding
  1. Define CRUD. CRUD stands for C reate, R ead/Retrieve, U pdate, D elete and these refer to the four functions for working with stored information.

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

  • Verb: GET Path: /index See all the items that are stored (Read)
  • Verb: GET Path: /item See a single item that is stored (Read)
  • Verb: GET Path: /new Load a form in order to create a new item in the database (Create)
  • Verb: POST Path: /index Store the item in the database (Create)
  • Verb: GET Path: /item/update Load a form in order to update the attributes of an item (Update)