Happy 3 year anniversary!
My wife and I celebrate our 3 year anniversary today. Cards are cheap, and programming is fun.
While this may seem like a lot of code to tell my wife Happy Anniversary, it is re-usable for many years to come. This is what happens when it gets late. Code for her to run in her terminal.
anniversary.rb
class Fixnumdef wonderful"#{self.to_s} wonderful"endendclass Stringdef years_of_marriage"#{self} years of marriage"endendmodule Weddingdef location"on a #{self.conditions} beach in #{self.city}, #{self.state}"enddef city"Cambria"enddef state"California"enddef dateTime.utc(2005, 06, 05)enddef formatted_dateself.date.strftime("%A, %B %d, %Y")enddef conditions"cold and windy"endendclass Wifeattr_accessor :nameinclude Weddingdef initialize(name)self.name = nameenddef +(msg)return "Dear #{self.name}, on #{self.formatted_date} we got married #{self.location}. Thank you for #{msg}. Happy Anniversary, I love you."endendputs Wife.new('Tessa') + 3.wonderful.years_of_marriage
Which gives us (drumroll, please):
anniversary.rb
Dear Tessa, on Sunday, June 05, 2005 we got married on a cold and windy beach in Cambria, California. Thank you for 3 wonderful years of marriage. Happy Anniversary, I love you.=> nil

8 Comments Add your comment
eric June 5th, 2008
Happy Anniversary. :)
Brad Dielman June 5th, 2008
Happy anniversary, Nate!
Joe F. June 5th, 2008
Happy Anniversery, geek! :P
Josh Walsh June 5th, 2008
I feel so happy for you guys, and I pity your wife for putting up with cheezy moves like this one.
Congrats my friend.
Dana Kashubeck June 5th, 2008
Happy anniversary!!!
Geof Harries June 5th, 2008
Happy anniversary, Tessa and Nate. I think this would look great on a t-shirt.
brendan cullen June 5th, 2008
Should we all pitch in and register isitnateandtessasanniversary.com, so this code has a proper home?
Chris Hattery June 27th, 2008
I liked this site when it had more... content. It needs more content. And more frequent content. Content on a daily rotation.