Geeky baby announcments

A couple of years ago, we announced the impending arrival of small ginger #3.  My Mrs, however, is the shy type and didn’t want me to broadcast it on social media.  I made a deal with her that I could do it if I wrote it in code.  I was just surfing through my Facebook timeline and found it again and thought I’d share since it made me laugh. Written in AS3, for my sins. :-/


package com.humanity
{

/**
* @author andrewdobson.co.uk
*/

import dobson.family.*;
public class Dobsons extends Family
{
private var parents:Vector.<Human>;
private var children:Vector.<SmallHuman>;
public function Dobsons()
{
super();
parents = new Vector.<Human> = ["Andy", "Sam"];
children = new Vector.<SmallHuman> = ["Theo", "Rowie"];
if(var now:Date = new Date() == var due:Date = new Date(2013,3))
{
var baby:SmallHuman = new SmallHuman({_g:Gender = Human.type[Math.random()]});
children.push(baby);
welcome();
panic();
}
}

private function welcome():void
{
trace(children.length);
children[children.length-1].echo("Hello World!");
}
//panic!
private function panic():void
{
for each(var parent:Human in parents)
{
break;
}
}
}
}

About Andrew

Andrew Dobson has built websites for 13 years and now manages creative technology for Sky Creative, the internal creative agency of BskyB. Andy regularly lectures on creative technology and other geek matters and writes, records and performs as Digitonal He lives in North London with his family, the world of cat, and a righteous collection of classic electronica records. The opinions expressed on this site are the authors own and do not state or reflect the views of BSkyB.

1 comment

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>