Skip to content

Instantly share code, notes, and snippets.

JavaScript Functions

I can explain the difference between function declarations and function expressions.

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

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

I can explain how to explicitly set the value of this in a function.

@danjwinter
danjwinter / package-management.markdown
Last active March 24, 2016 16:39 — forked from rrgayhart/package-management.markdown
The Dangers of Using Code You Don't Control

Checks for Understanding

  • In broad strokes, summarize the event

Kik wanted to create an NPM module named Kik for it's services. They sent a request to Koculu, maintainer of 250 NPM modules including one named Kik, to rename his module. Koculu refused. Kik went to NPM with their lawyers. NPM told Koculu to change it. Koculu pulled all his modules. Thousands of projects, including NPM, had a dependency on one of his modules, left-pad. They all broke. People cried. NPM retroactively restored it.

  • How do NPM and RubyGems relate?

They both manage code sets that developers can include in their projects. The former is for JavaScript, the latter Ruby.

Array Prototype Methods

I understand that functions in JavaScript can take any number of arguments.

Indeed.

I can describe the similarity between blocks in Ruby and anonymous functions in JavaScript.

Sure can. They both create IIFEs with local variables that can be used to manipulate whatever is called as a message with the anonymous function. Or not, it totally depends on that anonymous function.

Beer outline

My background as a Professional Brewer equipment mess Programming breaking down tasks to the smallest instruction Coffee in a Keurig raw coffee inserted coffee brewing process as programming

@danjwinter
danjwinter / agile.md
Created December 7, 2015 17:25
Agile Question Responses
  1. Agile is iterative and works to improve the process with each iteration while waterfall seeks to get it right the first time and is resistant to change.
  2. Agile is so popular because it puts working products in the hands of clients faster and allows them to change it to their changing vision.
  3. Agile seems applicable but I'm weary of blanket statements. Change is one of the few constants in life and anything that embraces it will normally perform better than those that do not.
@danjwinter
danjwinter / cfu_crud_in_sinatra.markdown
Created December 1, 2015 20:03 — forked from rwarbelow/cfu_crud_in_sinatra.markdown
CRUD in Sinatra -- Check for Understanding
  1. Define CRUD.
  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.
  3. Why do we use set method_override: true?
  4. Explain the difference between value and name in this line: <input type='text' name='task[title]' value="<%= @task.title %>"/>.
  5. What are params? Where do they come from?