- ECMAScript 6 is the gin and juice of 2015.
- installation: $ gem install sprockets-es6
- gem "sprockets"
- gem "sprockets-es6"
- require "sprockets/es6"
#Fish in a Barrel || Check-in #1
###Team
###User Story
- User will press start game
if you need to add upstream | |
- git remote -v to check | |
- git remote (add) upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPO.git => sets remote to upstream repo(ex: ruby submissions) | |
- git fetch upstream | |
- git checkout master | |
- git pull upstream master | |
- git merge upstream master | |
- git remote -v should be original |
#####In the context of Node, what is a module?
- modules are self-contained chunks of code that serve a specific purpose
- equivalent to a Ruby class
- module.exports is anything that is exposed from one file to another. It can be a constructor, function, variable, etc.
#####The code examples from the second blog post look very different from the first. Why?
- the second article uses RequireJS, which loads asynchronously and packages the module in a define/require function.
- in the example, they return variables/methods within the define function. This define method seems to wrap everything, but only the pieces that are exported are returned.
- can pass other module dependencies into the define function ex: define(["models/Person", "my/utils"]), function (Person, utils) {...}
- require is used when the dependencies are loaded immediately
I can explain the difference between function declarations and function expressions.
- Declarations are hoisted to top priority, whereas function expressions are declared but not defined until that line is run.
I can explain what the value of this
is in a normal function.
- global object
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 watched the video a few days ago, but it was crucial to undestanding collision detection.
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?
- Presentation & interaction
- Data/server communication
- application state
Want to implement p5.js into your Node application? This is one way to do it!
-
Download the p5 libraries. I recommend using the minified files due to the bulk of p5.
-
Within the head of the index.html file, require each library. The individual files are stored with the libraries folder.
<script type='text/javascript' src='./libraries/p5.min.js'></script>
<script type='text/javascript' src='./libraries/p5.dom.js'></script>
###Pull Request
- @jecrockett - refactor partner
- @rrgayhart - instructor
- @dastinnette - member of another refactor team, please review!
####What's this PR do? Abstracts draw object functionality into a canvasPainter object. This removes responsibilities from the generateFish function in the game class.
####Where should the reviewer start?
- Follow this Lesson Plan
- Fork this gist
- Include a link to your version in the gist fork