Skip to content

Instantly share code, notes, and snippets.

View rossedfort's full-sized avatar

Ross Edfort rossedfort

View GitHub Profile
require 'minitest/autorun'
require 'minitest/emoji'
require './lib/list'
require './lib/node'
class ListTests < Minitest::Test
def test_you_can_create_new_nodes
assert Node.new("a")
end
function setup() {
noStroke();
width = 1400
height = 780
createCanvas(width, 780);
background(0);
size = 10
}
function draw() {
one-to-one: Username and password
one-to-many: People and mailing address
People and pets
User and instagram photo
many-to-many: Teachers and mod_2 students
Hashtags and tweets
A test environment database can be set up to flush after every run, making it easier to keep track of what's in your db and what you are testing on.
A development environment database usually holds enough data to make sure your app is working as it should. It's usually fake data in the correct format.
-These can be dropped/deleted

Why Film is Better than Digitial

Digital File Formats

  • Compressed vs. Uncompressed
    • JPEG and Raw
  • Compression - Minimizing the size of the file without degrading image quality
    • Lossy vs. Lossless
      • Lossy = losing data
      • Lossless = retaining data, in different format
  • How it looks in ruby

Recap

  • function setup()
  • function draw()
  • no 'var'
  • interactivity, mousePressed(), mouseX, mouseY, etc.

New Stuff

  • p5.sound library
  • Cool project
  • How can we interact with sound through the browser
@rossedfort
rossedfort / SVG's with Robbie and Ross.md
Last active January 25, 2016 21:28
An outline of a student led session on Scalable Vector Graphics

Intro - 10 mins

Image Formats

  • Raster(pixels) vs. Vector(paths)
  • Raster images use a series of pixels in a matrix like format
    • .png, .jpg, .tiff etc.
    • Hard to scale
    • compression = gross
  • Vector images use series of points and paths to construct images
    • Makes them easy to scale(math)
@rossedfort
rossedfort / javascriptExercismComparisons.md
Last active February 7, 2016 17:55
Javascript Exercism Comparisons

Leap

my code

  • responder 1 - This person took a very similar approach that I did, except the logic was exactly the opposite. Instead of checking if the year was evenly divisible by 4, they checked if it wasn't.
  • responder 2 - Ryan's approach is very explicit in that it has different conditions for each case. To me, it reads easier event though it is slightly longer.
  • responder 3 - Amber's approach is extremely simplistic. She takes advantage of the fact that conditionals return a true or false value inherently, thus removing the need to explicitly return true or false.
  • responder 4 - This is another example of an easily readable solution even though it is slightly more verbo

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
**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 most important things to think about when chosing a sorting algorithm are space and time.. OOoooOOoooOoo. By space I mean memory to perform calculations. And by time, I mean how long the sorting algorithm will take. Bubble sort is slow, but takes up little memory, and Merge sort is super fast, but takes up large chunks of memory to perform it's recursive functions. Insertion sort is right in the middle, which makes it desirable in some occasions. However, like most times in programming, the answer of which sorting algorithm to use, is 'it depends'
**Step Four**: _Totally Optional_: take a look at some of the other forks and comment if the spirit moves you.