Skip to content

Instantly share code, notes, and snippets.

View emilyfreeman's full-sized avatar

Emily Freeman emilyfreeman

View GitHub Profile

#Blogging Q+A

Everything you need to know about blogging while at Turing — and beyond!

I'll cover:

  • Why blogging will help you get a job
  • What to blog about
  • How to improve your writing

Abstract

Tests should work for you, not against you. Teams that hate testing don't test. But tests can make you a better programmer. They're like silent pair partners, guiding you to write the best code.

Your success at testing relies heavily on your approach and design. This talk will cover different approaches to testing, the great debate over end-to-end tests vs. unit tests and tools for testing your app. After which you'll be able to design tests that best serve your team.

Audience

Title

Ember Testing Pyramid: Finding the best approach for your team

Abstract

Tests should work for you, not against you. Teams that hate testing don't test. But tests can make you a better programmer. They're like silent pair partners, guiding you to write the best code.

Your success at testing relies heavily on your approach and design. This talk will cover different approaches to testing, the great debate over end-to-end tests vs. unit tests and tools for testing your Ember app. After which you'll be able to design tests that best serve your team.

Array Prototype Methods

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

Yes

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

Yes

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 how the new keyword changes the way a function behaves.

-ish

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

No

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

@emilyfreeman
emilyfreeman / require.markdown
Last active February 9, 2016 20:39 — 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?
  • A module is a little like a class in Ruby and allows you to package and reference information in other areas of your code. The only public information is what's exported, all other information is kept private.

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?
    • Presentation and Interaction, Data/Server Communication, Application State and Setup
    • Prior to watching this, I wouldn't have been able to list these four responsibilities, but looking at them, it makes perfect sense. It's not unlike MVC and pushing logic down the stack. Setup is the only one that surprised me because it's a little different than what we've done in the past, but still makes sense. I think setup may be the trickiest responsibility to separate out.
  • Do you feel like you mentally split your client side code in IdeaBox and other past projects into these responsibilities?

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?

  • Mimic her tick() function to get the gates to pass at a set interval
  • Using .prototype to set aspects of an element
  • Creating an isDown method to see if the user is pressing the left or right arrow buttons
**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 sorting algorithm you choose depends on what you're sorting and how many resources you have to allocate.
* Bubble sorts can very little memory but are slow and unstable.
* Insertion sorts are stable but have similar downsides to bubble sorts. They're not ideal for large amounts of data.
* Merge sorts are kind of like the Cadillac of sorting algorithms, but like a Cadillac, they takes a lot of resources. If you have the memory to give, the merge sort is fast and stable.