Skip to content

Instantly share code, notes, and snippets.

View PenneyGadget's full-sized avatar

Penney Garrett PenneyGadget

View GitHub Profile

This was so fun to watch!

  • What is one approach you can take from Mary's code and implement in your project?

Space Invaders is very different from what Beth and I are building, however I think the concept of the 5 checks for collison detection are invaluable and can be applied in all sorts of scenarios. These 5 checks tell us that 2 objects are NOT colliding if:

  1. object1 is the same as object2
  2. the right-most side of object1 is to the left of the left-most side of object2
@PenneyGadget
PenneyGadget / require.markdown
Last active April 2, 2016 19:30 — forked from rrgayhart/require.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?

JavaScript Functions

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

Yes.

function declaration - this entire function gets hoisted
function someThing(x) {
console.log("stuff");
}

@PenneyGadget
PenneyGadget / 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?