Skip to content

Instantly share code, notes, and snippets.

View danmelnick's full-sized avatar

Dan Melnick danmelnick

View GitHub Profile
@danmelnick
danmelnick / gist:3623035
Created September 4, 2012 16:23
Simplistic
A product manager and a developer are discussing a feature. The product manager mentions it should just be a couple lines of code to implement, evincing a simplistic understanding of the problem.
@danmelnick
danmelnick / gist:1320035
Created October 27, 2011 16:22
Vonnegut
Here is a lesson in creative writing.
First rule: Do not use semicolons. They are transvestite hermaphrodites representing absolutely nothing. All they do is show you've been to college.
- Kurt Vonnegut, A Man without a Country
def insertion_sort(array)
n = 1
while n < array.length
key = array[n]
i = n - 1
while i >= 0 and array[i] > key
array[i + 1] = array[i]
i = i - 1
end
array[i + 1] = key