Skip to content

Instantly share code, notes, and snippets.

Web Sockets Lesson Plan

  • Fork this gist
  • Include a link to your application's repo
  • Your repo should have a link to your production app in the README
  • Git Repo
  • Include questions/comments for anything you'd like us to specifically give you feedback on
  • Would you recommend using jQuery to add elements to the DOM? I had a hard time pulling in the the library...

The websockets homework is graded on 'completion' or 'semi-completion' - but we'll try to leave you feedback on anything we see that requires feedback in the gist.

  1. Follow this Lesson Plan
  2. Fork this gist
  3. Include a link to your PR in this fork

My PR

@matt-stj
matt-stj / express.markdown
Created March 1, 2016 21:55 — forked from rrgayhart/express.markdown
Building Express Applications
@matt-stj
matt-stj / recursion.markdown
Last active February 26, 2016 21:48 — 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?
    • I do not use the word 'bobble' in place of babel.
      • Follow Up Question: Will you now?
      • If it makes me a better programmer, yes.
    • What is an example of why/where you might use recursion
  • If you're building a binary search tree and want to add functionality where you can remove a node and rebalance the tree, recusion can be very useful. I tried to solve this problems with ~80 lines of code in multilpe loops, and found out later than ~10 lines of a recursive function could do the same thing.

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?
I really liked her use of a game constructor that oversaw the main functions of how the game would be played. Makes her code very clear and easy to understand. Her use of a keyboarder object and way to implement collision detection were also cleaner than what I currently have in my game, and I'll look to model mine after hers.

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

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?
  • All of the responsibilities that Rebecca lists make sense now, but I hadn't thought to break up my Javascript that way before. In the past, I wrote code based on convenience instead of splitting them up into clearly-defined pieces. I really like the data/communication/server interactions piece, as I wasn't breaking up my code that way before.
  • Do you feel like you mentally split your client side code in IdeaBox and other past projects into these responsibilities?
**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?"
Speed, resources required to perform, stability, and size of incoming dataset are all things that must be taken into consideration when using sorting algorithms. There's no single perfect solution -- the best algorithm depends on what data you have coming in, but insertion or merge sort offer the best performance + reliabililty. Bubble sort === the worst.
@matt-stj
matt-stj / require.markdown
Last active February 9, 2016 07:14 — 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?
@matt-stj
matt-stj / es6.markdown
Last active February 9, 2016 17:33 — forked from rrgayhart/es6.markdown
ES6 Homework

Throughout the module (and your journey to Google enlightenment while working on IdeaBox2.0) you may notice a few different ways that JavaScript code is being written.

That might have something to do with something called ES6 and ES5

Fork this gist and answer the following questions:

  • What is ES6?
  • It's the newest standard for EMCAscript - an update from ES5, which is ~5 years old.
  • What is Transpilation and how does it relate to ES6?
  • Transpilation is the process of taking one version of a language and making it compatible with other versions of that langues. With ES6, for instance, developers who want to start writing in ES6 before major browsers adopt it, can do so by transpiling their code from ES6 -> ES5. It's my understanding that Babel is used specifically for transpilation tasks like this.
  • Looking at the ES6 Features link below, discuss one update from ES5 and if it seems useful/superfluous,