Skip to content

Instantly share code, notes, and snippets.

@Kealii
Kealii / creact.markdown
Last active February 29, 2016 16:52 — forked from rrgayhart/creact.markdown
Creact Links
@Kealii
Kealii / recursion.markdown
Last active February 26, 2016 21:49 — forked from rrgayhart/recursion.markdown
Recursion and Generators Homework

Do you pronounce 'babel' in the same way?

No...

Will you now?

No! What would you call bobble heads then? Bohble heads??

What is an example of why/where you might use recursion?

###What is one approach you can take from Mary's code and implement in your project? Since we're building the same app, it's all pretty relevant, though specifically it was nice to see how to break logic out into a presenter, a function that checks state, and even getting a peek into how to map keyboard controls into on screen actions. I really hope to be as modular as she was and make a serious effort to keep different logic types separate.

###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?

  • I'm not sure that it was surprising, but it was interesting to notice that when looking at the page itself and breaking out the actual display elements into those categories, that there wasn't any mention of testing the presentation side of things. We've been shown repeatedly that it is possible, but told to question whether that's really what we should be testing (ie test biz logic instead).

Do you feel like you mentally split your client side code in IdeaBox and other past projects into these responsibilities?

  • I haven't specifically tried to break out testing into these responsibilities, but it's obvious Rails tries to push that kind of breakdown by using things like Model tests to strictly test Data and View tests to test Presentation. I could see Feature tests being viewed as a way to test that your Applications State is be
@Kealii
Kealii / require.markdown
Last active February 9, 2016 20:40 — forked from rrgayhart/require.markdown
The Concept of Require
  • In the context of Node, what is a module?

A module is a reference to a value or function stored in another file but made available for use in another file.

  • The code examples from the second blog post look very different from the first. Why?

The code examples in the 2nd post are for a specific library (RequireJS) that handles javascript modules for easier requiring.

What are some of the balances and trade offs between different sorting algoritms?

####Bubble Sort - Ideal for small lists or large lists that are almost in order. #####Pros

  • Great with almost sorted lists
  • Memory Cheap

#####Cons

  • Slow

I can explain how the new keyword changes the way a function behaves.

8/10

I can explain the implicit steps that happen in my function when I use the new keyword.

8/10

I can explain the difference between an object's prototype and the prototype property on the constructor function.

@Kealii
Kealii / es6.markdown
Last active February 9, 2016 17:37 — forked from rrgayhart/es6.markdown
ES6 Homework

What is ES6?

ES6 is a tool for translating new Javascript functionality into syntax that is accepted by older browsers and browsers that suck....cough IE...cough

What is Transpilation and how does it relate to ES6?

Transpilation is taking code from one language as the input and translating it into an output that is code in another language. In ES6, this is specifically taking newer javascript functionality and translating it backwards to allow developers to use the newest features without worrying about shitty browser incompatibility (still looking at you IE...).

Looking at the ES6 Features link below, discuss one update from ES5 and if it seems useful/superfluous

JavaScript Functions

I can explain the difference between function declarations and function expressions.

8/10

I can explain what the value of this is in a normal function.

8/10

Array Prototype Methods

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

True.

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

True.