Skip to content

Instantly share code, notes, and snippets.

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?

Ultimately I think the vast majority of Mary's code will have to be changed in order to conform to our TDD-driven structure. Her strategy was no doubt designed for speed, but it lacks the clarity or testability of the TDD-driven approach.

However, there are certain specific functions in her code that could likely be easily imported:

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: Respond to this question in your fork: Consider the four responsibilities that Rebecca lists for client side code (hint: they're color coded). Respond below with your thoughts. Did any of the responsibilities that she lists surprise you? Do you feel like you mentally split your client side code in IdeaBox and other past projects into these responsibilities?

  1. Data/server communication
  2. Setup
  3. Application state
**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 Sort
- not terrible in terms of speed or computing cost, but does not work well when items are far from sorted (reverse order)
- effective when items are already partially sorted or close to sorted

I can explain the difference between function declarations and function expressions. (3)

I can explain what the value of this is in a normal function. (2-3)

I can explain what the value of this is when called from the context of an object. (2-3)

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

I can explain the difference between call and apply. (3)

Array Prototype Methods

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

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

Where are the methods available to all arrays (e.g. forEach, map, etc.) defined? (1)

I can explain the difference between using a for loop and the forEach method. (2)