Skip to content

Instantly share code, notes, and snippets.

@drewlesueur
drewlesueur / lagnuage.markdown
Created December 15, 2010 03:27
Thoughts on programming languages

Programming Language Thoughts

What makes a good programming language?

A good programming language is expressive. That means I can easily turn the thoughts of my head into code. A good programming language is easy to read. It's important for code to be read because code lives. Others edit it, extend it, learn from it. A good programming language is fast.

@drewlesueur
drewlesueur / grrrails.markdown
Created December 13, 2010 04:32
Things that make me go Grr in rails

GRR Rails

I am learning Rails.

Here are the things that make me go GRR

  1. I see code like this MyModel.like "apples". Is there any documentation on that? or did someone write the method like? Is there a cool way to do likes relationally?
@drewlesueur
drewlesueur / polymorphism_go.go
Created December 7, 2010 05:31
polymorphism in go
//the terms "late binding", "dynamic binding", "polymorphism" kind of blur together for me
//here is an example of this concept in Go
package main
import "fmt"
type Animal interface {
Say()
@drewlesueur
drewlesueur / hello_object.go
Created December 5, 2010 10:31
The hello world of Object Oriented Prorgramming in Go
// run this code at http://golang.org/
package main
import "fmt"
type Person struct {
age int
name, fav_band string
}
@drewlesueur
drewlesueur / lang.coffee
Created November 29, 2010 19:59
Language experiment
# link with an extra property .__meta
# or each object has a .__uid that links
# if you are going to have an extra property anyway, why not make it the meta property.
meta = {}
get = (scope, variable) ->
if scope.__meta.get?
return scope.__meta.get scope, variable
else
return scope[variable]
@drewlesueur
drewlesueur / JavaScript_Wishlist.markdown
Created November 25, 2010 17:24
JavaScript Wishlist

Javascript wishlist

@drewlesueur
drewlesueur / cse310_proj2.cpp
Created November 24, 2010 12:51
my cse310 assignment
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
typedef struct record{
int key;
int data;
@drewlesueur
drewlesueur / learning.cpp
Created November 24, 2010 11:37
learning c++
#include <iostream>
using namespace std;
typedef struct record{
int key;
int data;
} record;
record* new_record() {
record *ret;
@drewlesueur
drewlesueur / iphone_audio_tag.coffee
Created November 23, 2010 11:34
example coffeescript for iphone audio tag
$(document).ready () ->
#alert screen.height
audioElement = document.createElement('audio');
audioElement.setAttribute 'src', 'audio/star_good.m4a'
audioElement.addEventListener 'canplay', () ->
alert 'canplay'
audioElement.controls = false
document.body.appendChild audioElement
audioElement.oncanplay = () ->
console.log "can play"