The views expressed on this weblog are mine alone and do not necessarily reflect the views of my employer.
 Friday, February 14, 2003
Where did God put his readonly variables?

I've got one more physics class and two math classes to finish my 11 year quest for a 4 year degree.  As I was sitting in Physics yesterday we were talking about the Ideal Gas Constant and Avogadro's number and the thousand other constants that make It All Work.  And I was thinking...in my programming I'm always trying to avoid superfluous constants when possible, and use enums to group related consts when possible. 

But in the Universe, for It All To Work we seem to need a lot of very precise and specific Constants and learning physics for me has been as much learning another person's code and algorithms as it has been understanding the constants they needed to get the job done.

My real question is, did God put these constants as a readonly field in a static constructor or a singleton pattern, or assuming parallel universes, a factory pattern? Either way, it makes me think when I write C# code, how would God write this loop? :)

(and please note God's use of a modified Hungarian naming convention)

public Reality
{
      public readonly double dblAvogadrosNumber = 6.022137*10^23....etc;
      /* additional Reality Code removed for clarity... */
      private static Reality singletonInstance;
      private static int cReference;
      public static Reality GetInstance()
      {
          if(singletonInstance== null)
          {
              singletonInstance= new Reality("Let there be light, etc");
          }
          cReference++;
          return singletonInstance;
      }          

}


Updated Link to this post 2:37:52 PM  #    comment []  trackback []
Multiple-Monitors are love

Update on dual monitors. Don "luddite" Box comments about how much he likes the larger 1024 x 768 pixels on his Thinkpad x30. Hey - how many pixels do you need to run emacs and type all those angle brackets anyways? :) [IUnknown.com: John Lam's Weblog on Software Development]

Withholding any barbs against Don's choice of editor...I run 1600x1400 (120dpi) on my laptop and 1280x1024 (96dpi) on my laptop.  When people say they don't dig the ultra-high-res you get on a 120/130dpi laptop (like Tablet PCs, that require 120) I say, two words: Large Fonts.  I run large fonts and large icons.  I run my fonts in VS.NET in 14 point bold Lucida Console.   The ratio of the size of the fonts in relation to the physical dimensions of the screen higher, but what to I get with all my "extra" pixels?  Resolution, Baby.  ClearType, clarity, the feeling of staring at Paper not an LCD or CRT.  And personal preference aside, anyone who doesn't believe in ClearType (ClearType Online Tuning Wizard here) needs to think twice.

Someone still running 800x600 or 1024x768 happily because they didn't want to take the time to scale their screen elements on a higher-res screen is probably renting those "special" Full Frame DVDs because they think they are missing information covered by the black bars. ;)

Product Tip: There's another great Screen Scaling for the technologically challenged who like "big pixels" and want that 1024x768 feel on a 1280x1024 screen - LiquidView from Portrait.  (It's arguably 100% necessary as XP includes a plethora of support for sizing things, but it scales EVERYTHING) 

I also use their Pivot software RELIGIOUSLY.  (They'd sell more software if their website didn't suck egregiously) When you're editing a giant doc, it's nice to view it like paper on a portait oriented display.  Even better, Pivot is smart about multi-monitors and having a pivotable LCD next to a non-pivotable one. 


Updated Link to this post 9:01:13 AM  #    comment []  trackback []