|
Scott
wonders whether God stored the universe's constants "as a
readonly field in a static constructor or a singleton pattern, or assuming
parallel universes, a factory pattern?"
He also presents a
sample which unfortunately sports two serious
bugs:
a) God doesn't use
Hungarian notation for variables. He's a great supporter of the theory
that choosing a reasonable name for a variable
combined with an OO languages with strict type checking and
extensible metadata render Hungarian notation pretty obsolete.
b) God also faced the problem that most constants
aren't finite. Therefore he decided not to store them in any field. Instead he
created methods which returned the results as a stream and combined these with
some factory methods returning delegates to the helper
functions thus creating a pretty pluggable
architecture.
After
implementing a prototype, he saw that streaming of infinitely
long numbers doesn't work pretty well in a SOAP 1.1 based distributed
environment incorporating multiple Universes. As an interim solution
he therefore limited Reality to a single instance. Somehow he has been
assigned to a different project in the meantime so we still live in a single
Reality.
He seriously
promises that the application is nevertheless scalable to multiple instances -
if he only gets to fix the bug in the calculation of the answer to the Great
Question of Life, the Universe and Everything.
Don't
panic.
|