Skip to content

Instantly share code, notes, and snippets.

View natevenn's full-sized avatar

Nate Venn natevenn

  • Prague, Czechia
View GitHub Profile
@natevenn
natevenn / cfu_crud_in_sinatra.markdown
Last active February 3, 2016 00:44 — forked from rwarbelow/cfu_crud_in_sinatra.markdown
CRUD in Sinatra -- Check for Understanding
  1. Define CRUD.

    • these are functions that stands for Create, Read, Update, Delete
  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.

get '/resources' - this retrieves the resources get '/resource/:id'- this retrieves the one resource get '/resources/new - this retrieves a form or some format for add resource post '/resources' - this creates the new resource get '/resources/:id/update - this retrieves a form that allows a specific resource to be modified or edited

@natevenn
natevenn / Vim in 2 Parts.
Last active March 26, 2016 01:30
Community content - Turing student led session - co-led by Nate Venn and Hedy
Part 1. Week One: 4/18
. Why vim is a great editor:
a. code less, edit more;
b. save yourself from typos;
c. customize to your hearts content;
d. less mousing around, with greater navigability;
2. Advantages of knowing even a bit of vim:
a. third most used editor in the software industry according to the latest StackOverflow Developer Survey;
b. pairing with someone who is using vim;
**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?"
- Insertion
- pros are that it is a stable sort and good for small data sets (use if you are sorting on the browser)
- cons are that its slow with big data (O(n2)
-Bubble
- pros are that it is easy to implement and good for small data