Friday, February 11, 2011

icicle and savedInstanceState are examples of geek humor

iciclesphoto © 2006 liz west | more info (via: Wylio)
Have to keep remembering that at the core, computer geniuses like a joke as much as the next person. Today's example: by default, the bundle variable for an Android class is called "savedInstanceState". However in most examples, you will see it called "icicle". Icicle seems to have become common like "foo" or "x" in examles as a generic variable name. This is because it is shorter to type than "savedInstanceState" and because in earlier versions, the method definition for "savedInstanceState" was called "onFreeze".

No comments:

Post a Comment