Skip to content

Instantly share code, notes, and snippets.

@tgraham777
tgraham777 / m4_portfolio.md
Last active January 21, 2016 20:20
Module 4 Portfolio

Tyler Graham - Module 4 Portfolio

Mission

Coming into this module I was excited to learn Javascript because I knew I would probably need it at some point during the creation of my company's application. However, what I most needed to learn was how to link Javascript with an existing back-end framework and how to leverage the unique qualities of Javascript to make an app look smooth and performant.

Module summary & takeaways

Module 4 delivered on teaching what I was hoping to learn. Although I certainly wouldn't call myself a Javascript master, I know enough now to truly polish the front-end of an application and to add the speed and smoothness expected from good software.

@tgraham777
tgraham777 / js_exercism_comps.md
Last active November 27, 2016 21:13
A comparison of my first three js exercisms (excl. "Hello World") to those of other responders

##Leap My code: here

  • Responder #1 (here) - This responder took largely the same approach as me but used the "if/return true" approach rather than the single line return method. In this case I feel the one-line method is sufficiently clear and therefore would probably be preferred over using if/return.

  • Responder #2 (here) - This user employed an even more broken-out approach than the first responder, creating a three part "if - else if - else" conditional. For the same reason as #1 I feel that the one-line approach would be preferred in this case.

  • Responder #3 (here) - This user decided to build the logic out with a nested conditional, nesting the %100 and %400 checks within the %4 conditional. It appears cleaner at first glance and the ne

@tgraham777
tgraham777 / global_hacking_war.md
Last active January 12, 2016 04:36
Mod 4 LT - The Global Hacking War
@tgraham777
tgraham777 / countdown.js
Created December 15, 2015 17:56
Remote day work - recursion and generators in Javascript
function countdown(n) {
if (n >= 1) {
console.log(n);
countdown(n-1);
}
}
countdown(5);

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?

Ultimately I think the vast majority of Mary's code will have to be changed in order to conform to our TDD-driven structure. Her strategy was no doubt designed for speed, but it lacks the clarity or testability of the TDD-driven approach.

However, there are certain specific functions in her code that could likely be easily imported:

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: Respond to this question in your fork: Consider the four responsibilities that Rebecca lists for client side code (hint: they're color coded). Respond below with your thoughts. Did any of the responsibilities that she lists surprise you? Do you feel like you mentally split your client side code in IdeaBox and other past projects into these responsibilities?

  1. Data/server communication
  2. Setup
  3. Application state
**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?"
Insertion Sort
- not terrible in terms of speed or computing cost, but does not work well when items are far from sorted (reverse order)
- effective when items are already partially sorted or close to sorted

I can explain the difference between function declarations and function expressions. (3)

I can explain what the value of this is in a normal function. (2-3)

I can explain what the value of this is when called from the context of an object. (2-3)

I can explain how to explicitly set the value of this in a function. (2)

I can explain the difference between call and apply. (3)

Array Prototype Methods

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

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

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

I can explain the difference between using a for loop and the forEach method. (2)

@tgraham777
tgraham777 / trading_algorithms_for_the_masses.md
Last active August 16, 2018 22:23
Trading Algorithms for the Masses - Outline

Trading Algorithms for the Masses

What is quantitative trading?

  • Quantitative trading is an extremely sophisticated area of finance
  • It has four main components:
    1. Strategy Identification - Finding a strategy, exploiting an edge and deciding on trading frequency
    2. Strategy Backtesting - Obtaining data, analysing strategy performance and removing biases
    3. Execution System - Linking to a brokerage, automating the trading and minimizing transaction costs
    4. Risk Management - Optimal capital allocation, "bet size" criterion and trading psychology