Skip to content

Instantly share code, notes, and snippets.

View selfup's full-sized avatar
💻
doing the most

Regis Boudinot selfup

💻
doing the most
View GitHub Profile
@selfup
selfup / playground.rs
Last active August 17, 2017 06:55 — forked from anonymous/playground.rs
Rust code shared from the playground #1
#[derive(Debug)]
struct User {
first_name: &'static str,
last_name: &'static str,
}
impl User {
fn new(first_name: &'static str, last_name: &'static str) -> User {
User {
first_name: first_name,
@selfup
selfup / react-notes.md
Last active December 16, 2015 17:14 — forked from biglovisa/react-notes.md
React in theory

Use this gist to write down notes and questions as you read through the lesson plan. https://github.com/turingschool/lesson_plans/blob/master/ruby_04-apis_and_scalability/react_in_theory.markdown

What does React do?

It interacts with the DOM in a more elgant way than jQuery. No more DOM traversal. We can use specific locations and not have to change our CSS or HTML based on new inherant logic.

How does React interact with the DOM?

It uses the Virtual DOM to communicate with the actual DOM and figure out what needs to be updated. We can setState() and effectively tell React what to change in the event loop if a change has been requested.

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?

I can mitigate which classes are responsible for what actions. I like how she was using emacs :)

In tron I find it difficult to load two bikes in the game object. This code seems to be nice and broken into manageable pieces!

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?

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

Step One: Watch Sorting Algorithms in JavaScript

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?"

  • Bubble sort is just the slowest one ever. It checks every single element all the time. No bueno
  • Merge sort is the best. Requires more memory for storing sorted left and right arrays, but the speed is much faster
  • Insertion sort is good for arrays that are not too unsorted and remains fast until the order/size is to unordered/big
@selfup
selfup / sib.markdown
Last active December 5, 2015 23:05 — forked from worace/sib.markdown

Installing Seeing is Believing for Atom

1. Install the Gem

gem install seeing_is_believing

2. Install the Seeing Is Believing Atom package

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

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

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? 2

I can explain the difference between using a for loop and the forEach method. 3