Skip to content

Instantly share code, notes, and snippets.

View bad6e's full-sized avatar
💭
Founder of TrekWeather.com

Bret Doucette bad6e

💭
Founder of TrekWeather.com
View GitHub Profile
@bad6e
bad6e / gist:db72d1f2dc3028ff0789
Last active August 29, 2015 14:28
Lightning Talk - 8/28
#Your Credit Score - Myths and Legends
*Setup - Why?
-- Most people don't know their credit score or have major misconceptions about what makes up their credit scores
-- I hope to clear up the misconceptions about credit scores and show people what acutally makes up a credit score
-- Also I love to travel and travel credit cards have excellent sign in bonus but the cards require great credit so knowing about your credit is important.
*Explanation
-- Step 1: What is a Credit Score - score lenders use to judge how likely you are to pay them back. Ranges from 300 to 850
-- What things make up a credit score - Payment History, CCU, Remarks, Length of Credit History, Number of Accounts, Hard Credit
#The Best Travel Credit Cards
*Setup
-- Most people are not familar with the travel deals offered by travel credit cards.
-- I hope to talk about four of my favorite travel credit cards and the associated perks and demonstrate potential trips you can take
*Explanation
-- Card 1 - Chase Sapphire Preferred
-- For each card I will chat about worth of points, airplane partners, required spending, hotel partners (if applicable), and times of the year to apply for them.
-- Card 2 - Barclays World Travel Elite
@bad6e
bad6e / gist:7f1c4a3ba01c7edb9108
Created October 13, 2015 22:02
Lightning Talk - 10.16.15
#Nokogiri
*Setup
-- Talk about what Nokogiri is - basic HTML reader/parser
-- Show a basic project I built with Nokogiri
*Explanation
-- LIVE CODING - First open terminal and requre Nokogiri and Open-URI -- explain each briefly
-- Open website - show the audience what data I will be scrapping (credit cards for travel airlines or Github stats - TBD)
-- In IRB - find show how you can use css selectors to find all the information and interators to sort all the information.
#Time in Rails
*Setup
-- Start by talking about my recent PlaneBlame Project and how I used Time.now - show methods via slides
-- Time.now.hour/ Time.now.day /Time.now.year
-- Talk about Rails time helpers I used (1.hour 1.year etc)
-- Talk about other Rails Time Helpers (demonstrate a few - http://api.rubyonrails.org/classes/Time.html)
* Talk about UTC Time
-- Time.now & Time.current - pitfalls of Time.now

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. (3)

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

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

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)

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

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

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

**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?"
1. Insertion Sort - great for almost fully sorted arrays - takes up little space - however when the dataset is completely reversed it is slow
2. Bubble Sort has no advantages. Slow and not stable - It checks through every item which makes it slow. Order 2n - worst possible scenario.
3. Merge Sort - fast and stable - however takes up more space - as you need temporary space for arrays and recursive calls.

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?

I'll answer the latter question first - hell no. My CRUD applications take all the data in and so everything on it - in one big method. I like the first step of untagnling your code without writing massive document ready / event handlers to do everything. I also agree that it comes down to design.

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?

Take her brain... just kidding. I am going to use the game function to instantiate the game board upon window loading. Also passing everything into arrays and her collision method.

Step Four: Totally Optional: take a look at some of the other forks and comment if the spirit moves you.

function countDown(number){
if (number >= 0){
console.log(number);
number = number - 1;
countDown(number);
}
}
countDown(5);