Please update links... now using my own blog software.

http://www.simplegeek.com has the latest entries. Comments didn't get ported.


 Tuesday, January 07, 2003

I'm just starting to learn about politics, but today seems interesting...

"Making History. Nancy Pelosi was all smiles Tuesday as she formally took the reins as House minority leader. The California Democrat is the first woman to lead either party in Congress. ... "In our lives, there are always times and days that we will never forget where we feel we are part of history," the Missouri Democrat said. "This time, on this day, is one of those times."


10:53:51 PM    comment []

Brian was giving me grief at work today asking when I slept (because I've been spending too much time blogging)...

I'm trying something new - a schedule.

  • Leave house by 7am... go to coffee shop
  • Leave coffee shop by 8am... go to work
  • Read email, plan for day until 9am
  • Arrive home by 7pm
  • Dinner, family time, tv, etc. until 9pm
  • Then i have from 9pm until whenever I go to sleep to blog, read, watch more tv, etc... typically I go to bed around 12-1am...

My goal is to keep to this schedule for the month of January, and then decide if I should keep it...


10:39:14 PM    comment []

Question from my brother Brent:

Is there a way to determine what file and method called my function?  I have a logging object that I would like to be able to automatically add the function, file, and line number of the caller.

Also, I'd like to automatically generate debug output when a function begins and exits

there are a couple options here...
 
If you want to profile, there are several profilers (Rational, Numega, etc.) and they are are managed aware. Given that you want this for logging, etc, there are even more options, read on...
  • You can use context bound objects and produce a somewhat heavy, but really cool framework for auto-logging, which can give you the begin/exit outputs
  • You can use the StackTrace class to get file, line, and function name information at any point during execution

The caution I would give about either of these is performance. ContextBoundObject has some significant performance implication, as does using the StackTrace class. In addition, the StackTrace class will only give file and line information if the PDB is available.

Since C# doesn't support macros (a good thing, btw), you are faced with either hand coding a lot of Debug.Write*(...) method calls, or living without this feature.

Maybe this is something we should think about adding to .NET? you could imagine something that plugs into the JIT and lets you compile in pre/post code for any method... ouch, and API into the JIT - that sounds scary. Maybe we shouldn't consider this :)


10:13:17 PM    comment []

Jon's fascination with libraries has given him a deep understanding of the ISBN format. This reminds me of all the people that "whip" together a XML parser and forget to support all the complex corners of it. Everything is much more complicated than it first seems once you have understood it completely.

Favorite bug of the day: Someone was parsing version numbers and thought the format was always 4 sets of 1-4 digits separated by periods. (1.23.456.5678)... of course, the actual format for version numbers is 4 DWORDs, which, when printed can be many more characters long... boy I wish people would read specs before writing code!


9:42:34 PM    comment []

Wow... a lot of traffic about macworld... Keynote, Safari, and a 17" Powerbook. oh my!

The most interesting news (to me, at least) - Safari being an open source web browser based on KHTML... awesome to see Apple take on something like this.

 


9:22:30 PM    comment []

ok... this may be against blog-ettiquete... Windows Media 9 released today... coolest player feature - the ability to have a minized player appear in your taskbar... I appologize in advance it the mention of this has offended, angered, or otherwise pissed you off... now, get over it! :)

And if Don likes it, it can't be all bad.


8:38:22 PM    comment []

From Mr. Lessig... I agree, you better be famous (and rich) to try this stunt :)
8:30:50 PM    comment []

Drew: I'm glad you liked the sample. I was supposed to do one entry a month, but I've fallen way - way! - behind...


8:28:35 PM    comment []

Did you ever want to pimp out your gameboy?
8:22:51 PM    comment []