Skip to content

Instantly share code, notes, and snippets.

View acareaga's full-sized avatar

Aaron Careaga acareaga

View GitHub Profile
@acareaga
acareaga / cognitive-coding.md
Last active February 28, 2016 00:29
Cognitive Coding: A Mindful Geek

Cognitive Coding: A Mindful Geek

What is Mindfulness?

  • brief background (not a religious practice)
  • raise your awareness
  • living in the present

Why should I care?

Positive effects on:
  • relationships (personal, friends, professional... pair programming)
@acareaga
acareaga / pr-template.md
Created February 26, 2016 16:23 — forked from rrgayhart/pr-template.md
Modified Quick Left PR Template

What's this PR do?

Where should the reviewer start?

How should this be manually tested?

Any background context you want to provide?

Screenshots (if appropriate)

What gif best describes this PR or how it makes you feel?

@acareaga
acareaga / readmelove.md
Last active February 26, 2016 21:54 — forked from rrgayhart/readmelove.md
README Love

Updated Readme for Tetris

Check out the new ski-resorts README

##PROTIP: README Love

READMEs are AWESOME. They are one of the best things you can add to a repo, (other than quality code), to make it look professional.

@acareaga
acareaga / recursion.markdown
Last active February 26, 2016 21:41 — forked from rrgayhart/recursion.markdown
Recursion and Generators Homework

Do you pronounce 'babel' in the same way?

  • Definitely not.

Follow Up Question: Will you now?

  • Depends on the context. But probably.

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

  • I might recursively call "checkIfRowFull" for each row on the board before calling "clearRow" and "moveBlocksDown" in Tetris ;)

Step One: Watch Writing Testable JavaScript - Rebecca Murphey from Full Frontal 2012 (award for worst conference name ever?)

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 think the overall divide of the list was most surprising: Presentation & Interaction, Data/Server Communication, Application State, Setup. It makes a lot of sense after hearing Rebecca's talk, especially with being cognizant of what you're actually testing.

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

  • Yes - because of how "new" everything was. I think I also intermingled responsibilities on the list.

Step One: Watch Mary Rose Cook Live Codes Space Invaders from Front-Trends. (The second worst conference name ever?)

What is one approach you can take from this Mary's code and implement in your project?

Watching Mary dream-drive-development gives me confidence in starting Tetris. I think I should follow a similar pattern as hers, moving up in complexity only after that base foundation is in place. I also think it's important to not get caught on little details off the start.

@acareaga
acareaga / require.markdown
Last active February 9, 2016 20:37 — forked from rrgayhart/require.markdown
The Concept of Require
@acareaga
acareaga / gist:3bd0b1e5578586bb9dc3
Last active February 16, 2016 22:01 — forked from stevekinney/gist:9e9cfeb225c8133fda73
EmpireJS - Sorting Algorithms

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

Everying we're dealing with is sorting arrays. Consider Speed vs. Space when deciding what algorithm to use.

Notes:

  • Insertion: good for small data sets and sorting in the browser, stable (alex before adam, etc.), doesn't take much space
  • Bubble: looks similar to insertion sort, even if array is sorted we're checking through every item (slow)
  • Merge: recursively split array to sort then merge (divide & conquer), won't work with a lot of data in the browser (memory constraint)

Pros:

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

  • Yes

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

  • Kinda

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

  • Yes

I understand how to place method on a prototype.

JavaScript Functions

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

  • yes

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

  • yes

I can explain what the value of this is when called from the context of an object.

  • yes