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 / speaking-javascript.md
Created March 26, 2016 17:21
Reflections on selected readings from Speaking Javascript by Dr. Axel Rauschmayer

####Which sections were interesting?

  • It was cool to see just how many other languages influenced javascript.
  • I liked the functions section and would like to read it again. There's a lot of great information in there.
  • lexical scoping - I don't understand what it really means, but it perked my interest.

####Which sections did you totally skim?

  • Parts of chapter 16 and most of 17. My brain was getting completely fried. I know programming is technical, but I believe that it can be written about in much more accessible manner than this.
@PenneyGadget
PenneyGadget / array-prototype-review.md
Last active March 24, 2016 15:11
Array.prototype review

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

  • Indeed! I like it!

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

  • Yes. In Ruby we pass a block in which we name an anonymous variable to be a placeholder for whatever we are iterating through. The anonymous function is the same - we can pass in the arguments we want to use in our iteration and name them as we see fit. Or we can pass in a function that we have already created.
@PenneyGadget
PenneyGadget / javascript-exercisms.md
Last active March 19, 2016 21:57
A comparison of my javascript exercism solutions with 5 other peoples solutions

##Leap My code

  • Solution #1 - This is Jamie's solution which I found super interesting in terms of readability. Instead of just writing code to say a year is or is not a leap year, he's defined what the conditions are with descriptive names so the code reads in a very English way. I think it's cool.
  • Solution #2 - I'm really confused by the variable assignments in this.. Unless I'm missing something, the way century is calculated it will ALWAYS return true for century % 100 === 0, so it's a useless check. The else { return false } is also unnecessary.
  • Solution #3 - This is some interesting and bizarre syntax I've never seen before. It's very short and concise, but in a way that makes it less readable. T
@PenneyGadget
PenneyGadget / metz-dev-rules.md
Last active April 24, 2017 06:58
Sandi Metz' Rules For Developers

THE RULES:

  1. Classes can be no longer than one hundred lines of code.

  2. Methods can be no longer than five lines of code.

  3. Pass no more than four parameters into a method. Hash options are parameters.

  4. Controllers can instantiate only one object. Therefore, views can only know about one instance variable and views should only send messages to that object (@object.collaborator.value is not allowed).

@PenneyGadget
PenneyGadget / github_keyboard_shortcuts.md
Last active January 7, 2016 17:02
GitHub Hot Keys!
  1. While in a repository, press and hold "t" - this will bring up a file finder

  2. Press and hold "s" to take you to the search bar at the top of the page

  3. "g + c" takes you to the main page for your current repo

  4. "g + p" takes you to your pull requests

  5. "l" allows you to pick a line to jump to in your code (by line number)

@PenneyGadget
PenneyGadget / waterfall_vs_agile_development.md
Created December 7, 2015 17:30
Project Management modalities
  1. How does the Agile model compare to the Waterfall model? The Waterfall model is a sequential approach to working on a project - it moves step by step and generally has seperate departments for varying tasks. The Agile model is an iterative approach and requires that team members have skills in multiple disciplines. It takes small complete rotations of the final project and repeats those rotations, building the project outward from the first small interation. I think of the iterative approach like fractals - each iteration is a complete model of the whole.

  2. Why do you think Agile is so popular in software developement? Because it promotes flexibility and collaboration. Like with anything, the more people can pool their resources the more successful they will be. When each person understands the whole entity instead of just a small piece, they