Skip to content

Instantly share code, notes, and snippets.

View SteveOscar's full-sized avatar

Steven Olson SteveOscar

View GitHub Profile
@SteveOscar
SteveOscar / cfu_crud_in_sinatra.markdown
Last active December 2, 2015 16:12 — forked from rwarbelow/cfu_crud_in_sinatra.markdown
CRUD in Sinatra -- Check for Understanding

. Define CRUD.

An acrnym for Create, Read, Update, Delete, refering to database operations.

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

-DELETE '/items/:id' -- used to delete a specific row from the database.
-PUT '/items/:id' -- used to update a row in the database.
-GET '/items/:id/edit' -- looks up the item to be updated.

Setting Group Expectations

Group Member Names: Dan, Lenny, SteveO, BethS

  1. When are group members available to work together? What hours can each group member work individually? Are there any personal time commitments that need to be discussed? Not too late in the evening, usually leave by 8. Broncos.

  2. How will group members communicate? How often will communication happen, and how will open lines of communication be maintained? Slack @channel

  3. Which feature(s) does each group member want to work on? Which feature(s) does each group member not want to work on? Beth likes DB, Dan too, Steve too. Lenny does not like design. We will debrief one another on what we build.

@SteveOscar
SteveOscar / package-management.markdown
Last active March 24, 2016 17:57 — forked from rrgayhart/package-management.markdown
Code You Don't Control (WITH A GEM, UGHHHH!) - SteveO Responses

Checks for Understanding

Fork this Gist and Respond to the Following Questions

  • In broad strokes, summarize the event
    • A developer had released serveral packages on NPM that many programs used as a dependency, including major stuff like Babel. One of these packages was basically a simply formatting function called Kik. A large messaging comapny has that same name, and wanted to release a package called 'Kik'. They contacted the developer and offered compensation if he changed the name, lawyers at his door if he didn't. He refused, and pulled all of his packages from NPM, breaking many dependent programs in the process. NPM decided for the first time to un-unpublish a module.

JavaScript Functions

I can explain the difference between function declarations and function expressions.
-Yes. Declarations are hoisted and available right away, while expression values are undefined until they are declared.

I can explain what the value of this is in a normal function.

  • The global ojbect.

I can explain what the value of this is when called from the context of an object.

  • The object in which it was called.
@SteveOscar
SteveOscar / testable-js.markdown
Last active April 3, 2016 22:15 — forked from rrgayhart/testable-js.markdown
Writing Testable JavaScript

Consider the four responsibilities that Rebecca lists for client side code (hint: they're color coded).

Did any of the responsibilities that she lists surprise you?

None of them really surprised me, as they all seem necessary for client-side code, but I found it helpful to have these ideas explicitly stated.

Do you feel like you mentally split your client side code in IdeaBox and other past projects into these responsibilities?

I definitely didn't consciously break apart responsibilities in my mind, but I think it will help in the future to keep a clearer mental picture of what's happening in my programs. It seems like in JavaScript it's a lot easier to get lost in your own code.

@SteveOscar
SteveOscar / article.rb
Last active April 14, 2016 01:44 — forked from joshfrench/article.rb
Upworthy written exercise: Steven Olson
## This implementation assumes that there is a method in this class that symbolizes Article attributes, as I don't think Rails allows a symbol datatype for model attributes. The other option would be to add '.to_sym' on the self attribute calls. This also assumes that the given combinaitons are the only ones that need to covered.
class Article
def combinations
{:assigned => [:approved, :rejected],
:review => [:approved, :rejected],
:approved => [:rejected],
:rejected => [:approved]}
end
@SteveOscar
SteveOscar / thoughtbox.markdown
Last active April 21, 2016 14:01 — forked from rrgayhart/thoughtbox.markdown
sOlson ThoughtBox
  • Last commit on Master before 5:15pm will be considered.
  • Work should be done entirely on your own (no instructor or student support - Google, however, is your oyster)
  • Links to the deployed app must be included in the project README
  • If you have below completed you will get 70 points automatically.:
    1. all features completed ​_or_​ some features completed and showed effort to test drive
  1. a deployed app by Thursday a.m.