Skip to content

Instantly share code, notes, and snippets.

View MattRooney's full-sized avatar

Matt MattRooney

View GitHub Profile

Array Prototype Methods

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

Yes

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

Yes

JavaScript Functions

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

Yes

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

Yes

@MattRooney
MattRooney / require.markdown
Last active February 16, 2016 22:11 — 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?
**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?"
- Runtime (Big O) - Insertion and Bubble are slow, O(n^2). Merge is fast, O(n log n).
- Stability - stable sorts maintain the relative order of items with equal "values" (ex. Alex, before Adam when sorted on A). Insertion and Merge sort are stable, bubble sort is not.
- Implementation - none of them are that hard to implement.

Step One: Watch Writing Testable JavaScript - Rebecca Murphey from Full Frontal 2012 (award for worst conference name ever?)

Step Two: Fork this gist.

Step Three: 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?
  1. presentation & interaction
  2. data/server communication

Step One: Watch Mary Rose Cook Live Codes Space Invaders from Front-Trends. (The second worst conference name ever?)

Step Two: Fork this gist.

Step Three: Respond to this question in your fork: What is one approach you can take from this Mary's code and implement in your project?

The tick( ) function is something we could certainly use in building snake. That might help us sort out some of the functionality that's within our index.js. I also really liked her Keyboarder function. We could use that to hopefully clean up key event listeners to be a little dynamic and maintable when changing and adding different modes that require different keys.

Step Four: Totally Optional: take a look at some of the other forks and comment if the spirit moves you.

@MattRooney
MattRooney / readmelove.md
Last active February 26, 2016 22:00 — forked from rrgayhart/readmelove.md
README Love

My personal best READMEs:

##PROTIP: README Love

READMEs are AWESOME. They are one of the best things you can add to a repo, (other than quality code), to make it look professional.

####Things that make a README great:

@MattRooney
MattRooney / recursion.markdown
Last active February 23, 2016 03:12 — forked from rrgayhart/recursion.markdown
Recursion and Generators Homework
  • Watch Recursion
  • Fork this gist
  • Answer the following questions in your fork
    • Do you pronounce 'babel' in the same way?
      • No.
      • Follow Up Question: Will you now?
        • No. Because of the murdery stuff.
    • What is an example of why/where you might use recursion
      • A cats and dogs relational database tree!
  • Drawing a Sierpiński curve