a glob of nerdishness

February 8, 2008

Age algorithm

written by natevw @ 12:00 am

I think I’ve figured out an easy way to keep track of my age through the coming journey. All I need to do is subtract year_born from year_current.

You’re smacking your forehead because they’ve been teaching this in school since way before year_born. Well, the school method of figuring age out involves annoying trifles like “have I had a birthday this year?”. I haven’t practiced answering that question enough to be very good at it; growing up, I just knew how old I was because it was somehow important. Not anymore.

I think my simplification will serve me well in the coming years. Since I don’t usually mentally increment year_current until about February anyway, my method has a good chance of being right without needing any conditional branches.