- 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?
- Yes, bobble FTW
- What is an example of why/where you might use recursion
- Do you pronounce 'babel' in the same way?
- An example of when I would use recursion is if I had a linked list or tree-like data structure that I needed to parse. Instead of looping through every element of the data-set, I could use recursion to format it.
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?
- One approach from Mary's implementation of space invaders that I could use in flappy bird was her use of the
.filter()
method for collision detection. It would be great for Flappy Bird because we are already instantiating our pipes as an array of nwe pipe objects. I think with some simple refactoring, we could improve upon our 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?
The part about application state surprised me a little bit, because it is not something I usually think about while writing client side code. It's not that I don't know it's a very important factor of client side code, it's just that I don't usually realize how it ties in to my application. For me, 'state' is an ambiguous concept that I don't fully understand.
-
Do you feel like you mentally split your client side code in IdeaBox and other past projects into these responsibilities?
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
- 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?" | |
The most important things to think about when chosing a sorting algorithm are space and time.. OOoooOOoooOoo. By space I mean memory to perform calculations. And by time, I mean how long the sorting algorithm will take. Bubble sort is slow, but takes up little memory, and Merge sort is super fast, but takes up large chunks of memory to perform it's recursive functions. Insertion sort is right in the middle, which makes it desirable in some occasions. However, like most times in programming, the answer of which sorting algorithm to use, is 'it depends' | |
**Step Four**: _Totally Optional_: take a look at some of the other forks and comment if the spirit moves you. |
- responder 1 - This person took a very similar approach that I did, except the logic was exactly the opposite. Instead of checking if the year was evenly divisible by 4, they checked if it wasn't.
- responder 2 - Ryan's approach is very explicit in that it has different conditions for each case. To me, it reads easier event though it is slightly longer.
- responder 3 - Amber's approach is extremely simplistic. She takes advantage of the fact that conditionals return a true or false value inherently, thus removing the need to explicitly return true or false.
- responder 4 - This is another example of an easily readable solution even though it is slightly more verbo
- function setup()
- function draw()
- no 'var'
- interactivity, mousePressed(), mouseX, mouseY, etc.
- p5.sound library
- Cool project
- How can we interact with sound through the browser