Skip to content

Instantly share code, notes, and snippets.

@7hoenix
7hoenix / gist:cdfa8652d417864cfcd4
Created June 24, 2015 05:50
self directed study for mod 1 intersession
hours = 11
pomodoros_per_hour = 2
days = 6
original_pomodoros = hours * pomodoros_per_hour * days
pomodoros_remaining = original_pomodoros
vim_pomodoros = original_pomodoros / 6
#Vim:
#Tutorial
@7hoenix
7hoenix / Meta_8020
Last active August 29, 2015 14:24
meta_8020
"Weniger, aber besser"
Less, but better.
Intro => 80/20 is a natural principle that was first observed by a dude named Vilifredo Pareto in like the early 1900's. He noticed that year after year 20% of his pea pod's in his garden were producing approximately 80% of his yield of peas. And the other 80% of the pea pods were producing the reminaing 20% of his peas.
I'm not going to go into this but heres some examples of this natural principle working in nature/business/relationships/etc. . .
. . . . . . . . . . . . . . . . . . . . . . .
1) What habits of your group members are you hoping to adopt?
JH => Optimism.
JP => Very effective communicator.
Bret => Use pry to go through the code a lot.
JH => Just start typing. To get going. Instead of waiting
JH => Doing one thing from memory and then copying it (instead of just copying old code).
Bret => Keeping organized and logical.
JP => Wanting to learn why things work they do.
Find an example commit from your Traffic Spy project which was dealing exclusively with a Git problem
rather than a feature or bugfix (e.g. "Fix merge commit", "Really add file...", "Merge master
multiple times in a row", etc)
What do you believe the root cause of some of these issues were?
How did they impact your ability to work on the project?
What solutions worked for you and your team?
Why learn recursion?
1) It's bad ass.
2) Many people view recursion as an acid test for how well an individual understands computer programming.
Know recursion well enough to reach for it in a technical interview (not super hard don't worry)?
#Hired.
3) It's fun and is guaranteed to give you a smug sense of superiority over people that haven't taken the time to practice
it yet. Oh, and the recursive code you write will be ridiculously clean.
@7hoenix
7hoenix / gist:5ea1235c898f5d369b91
Last active October 11, 2015 17:20
Metaprogramming_in_ruby_with_send
Metaprogramming => programs that write programs.
Why does it matter? Rails uses it a ton behind the scenes.
How does it work? Many patterns but the one we are going to focus on today is #send.
Let's say you want to write a method that will contact your mother via text (because she
keeps complaining that you never talk to her anymore since you started Turing).
So you write the following method:
Weakness =>
1) Give and Get buttons on front page both lead directly to user sign up page.
2) Flow is hard to understand (even browsing around I still don't know what I'm supposed to do or how it works).
No real visual dominance of elements.
Recommendation =>
1) Instead, provide business value and only ask for user info when you need it (it will make more sense to the customer).
Allow them to browse off the home page.
2) Profile/dashboard page could really use some repositioning of elements. For instance the history column on the bottom
is cool but it should be front and center when I first log in.
Strength =>
Start with example of science experiment with 3 different temperature waters (hot, room temp, cold).
Stick hands in hot and cold and leave them for 20 seconds... Then immediately stick them both in room temp water.
The water will feel both cold and hot at the exact same time (even though its obviously the same temperature).
This is to demonstrate that we are relative beings. All our surmations about reality are really just relative to what others our doing.
Theory of relativity. Smarts. Test scores. Everything.

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 functionsin 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. 3

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

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

I can explain how to explicitly set the value of this in a function. 3

I can explain the difference between call and apply. 3