Skip to content

Instantly share code, notes, and snippets.

View acareaga's full-sized avatar

Aaron Careaga acareaga

View GitHub Profile
@acareaga
acareaga / performance_of_code.md
Created September 22, 2015 21:15 — forked from JoshCheek/performance_of_code.md
Performance of code

Performance of code

Time.now

Check the time. Do a thing. Check the time. What's the difference in time?

a = (1..60).to_a
start_time = Time.now

Setting Group Expectations

Group Member Names: Aaron Careaga, Cole Hall, Torie Joy-Warren

  1. When are group members available to work together? What hours can each group member work individually? Are there any personal time commitments that need to be discussed?

Torie can't work Saturday. Aaron wants to ski on the weekend in the morning, and meets with a mentor on Tuesday evening (5:30). Cole has mentoring for ~ an hour Tuesday and Wednesday after wrap-up. Cole likes to have some evening time, which we all like. Friday night is not good for us, after ~6.

  1. How will group members communicate? How often will communication happen, and how will open lines of communication be maintained?
@acareaga
acareaga / gist:9e4cc96cefd8ee5b7679
Created December 8, 2015 18:54 — forked from adamki/gist:20bded28810675f9e7b3
Implementing Mandrill Email
Pre-Work:
Got to Mandrill and set up and account. Have your `username` and `keys` ready.
In Rails, run ` rails g mailer NotificationsMailer` (or something similar) will set up a new file in the `app/mailer/` folder. In this case it generates a `notifications_mailer.rb`. It also creates a new dir: `app/views/notifications`
1. Configure your Mail APP . In `config/application.rb` add the following configuration :
```
config.action_mailer.delivery_method = :smtp
@acareaga
acareaga / es6-aaron-careaga.markdown
Last active February 1, 2016 22:20 — forked from rrgayhart/es6.markdown
Aaron Careaga - ES6 Homework

ES5 vs. ES6

What is ES6?

  • ES6 is the latest version of the ECMAScript standard. This standard is a scripting-language specification that JavaScript (Chrome, etc.), JScript (IE) and ActionScript (Adobe) adhere to for client side development. The first edition of standards was released in 1997 and the last major update prior to ES6 was in 2009.

What is Transpilation and how does it relate to ES6?

  • Transpilaton is the process of taking code from one language or standard and transforming it into another similar language or standard. This relates because ES6 is not yet fully supported, so the client side javascript must be transpiled into ES5 via Babel or Traceur.

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

  • An interesting update in ES6 is the let and const features. let is the new var and is used to declare a block scope local variable, where const is used in single assignment. The variable must be assigned (via

Array Prototype Methods

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

  • Yes, ultimate freedom.

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

  • Anonymous functions allow you to pass a block similar to a Ruby enumerable setup.

Where are the methods available to all arrays (e.g. forEach, map, etc.) defined?

  • Array.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

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.

@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:

@acareaga
acareaga / require.markdown
Last active February 9, 2016 20:37 — forked from rrgayhart/require.markdown
The Concept of Require

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.