Jay McGavren's Journal

2009-08-24

I love VMs.

picture-1.png

Read more...
2009-08-24

FAIL... whale?

picture-2.png

Read more...
2009-08-22

Album version...

#songsincode

class Bitch
  def love(person)
    puts person
  end
end
bitches = [Bitch.new, Bitch.new, Bitch.new]

me = Object.new
me.instance_eval {def rock; 'the projects'; end}

bitches.each do |bitch|
  bitch.love(me) if me.respond_to? :rock
end

Read more...
2009-08-21

Don't blame me, blame @bm5k.

@bm5k a,b,c,d,e=" bottles of beer","on the wall"," Take 1 down pass it around ",a+b,d+c;(1..99).map{|i|"#{i}"+d+" #{i}"+e+"#{i-1}"+d} #songsincode

Resulted in:

99 bottles of beeron the wall 99 bottles of beeron the wall Take 1 down pass it around 98 bottles of beeron the wall

99 bottles of beeron the wall 99 bottles of beeron the wall Take 1 down pass it around 98 bottles of beeron the wall

98 bottles of beeron the wall 98 bottles of beeron the wall Take 1 down pass it around 97 bottles of beeron the wall

Which resulted in:

beer.mp3

Read more...
2009-08-20

#songsincode #songsintests

In response to a Twitter meme… Sarah McLachlan’s “Ice Cream”.

require 'test/unit'

class TestYou < Test::Unit::TestCase
  def test_you
    you = Object.new
    ice_cream = Object.new
    assert you.love > ice_cream
    anything_else = Object.new
    assert you.love > anything_else
    here = ['a', 'b']
    here.each {|body| assert_respond_to(body, :fight)}
  end
end

Read more...