Thursday, January 06, 2005

Wanna see what Bill G has to say about Media Center PCs?

Bill Gates did the keynote for CES in Las Vegas, where he demo'd Windows Media Center Edition. Of course, like any Microsoft demo he ever does, it crashes at some point (I think they stage the crashes on purpose, to get media interest higher). The entire keynote is taped and can be viewed online at:

 

http://metahost.savvislive.com/microsoft/20050105/ms_ces_20050105_300.asx

 

***This link has been slashdotted, so the playback is a little rough right now. I recommend setting your media player to a 64k stream max with a sixty second network buffer before trying to view this...

Thursday, January 06, 2005 10:18:54 AM (Eastern Standard Time, UTC-05:00) #  Disclaimer | Comments [1] | 

 Tuesday, January 04, 2005

Old Media

A lot of lip service has been given to the “new media” lately, and I am as guilty of this as anyone. We like to talk about our MP3's, our DivX's, DVDs, media centers, iPods, blah blah blah....

But what about what is arguably the best media to be found? I am of course talking about the printed word: Books. They have been around far longer than any other communication device. And even in this era of eBooks, podcasts, and pay-per-view, they are still the absolutely best form of storytelling there is.

A perfect example: Rent “Starship Troopers” (~1997) and watch it with all of its special effects, cheesy lines, and ridiculous plots. If you make it through that (or at least far enough to follow my point), then go pick up Robert Heinlein's Starship Troopers (~1959) from a bookstore or your local library. There is no comparison. The original story is a masterpiece, especially considering that it was written in the 1950's. The movie is at best a mediocre mentally-void shoot-em-up special effects flick. I could list more examples (Lord of the Rings Trilogy) if I really wanted. Not in another hundred years will electronic story delivery be able to beat the tactile realness of a good printed book.

I had almost forgotten this, having been literally overwhelmed with all of the “new media technology” in the last few years. But today I happened to glance over at a bookshelf I had not payed attention to in four years. There, among the rows of books I had read, were six of them I had not. I had purchased and forgotten them. Such a waste (not of the money for the books - but of my time in the last four years). One book authored by Charles Sheffield, another by Robert L Forward, and the other four by my favorite author of all time, Greg Bear (I am so envious of Scoble).

I think it's also of no coincidence that for 4 years I have been having trouble keeping focused and motivated. Reading is a very healthy activity for the mind, and I have been neglecting this for too long now. I have recently taken the steps to rejuvenate my health (diet and exercises), but I have been forgetting to take care of my mind.

So as my first resolution for the New Year, I am going to read these six books. The 10 or so DVDs I was given for the holidays will just sit unused while I take this time to dust off the creative side of my brain.

I still cannot believe I ever allowed one of my favorite intellectual pastimes (hard sci-fi reading) fall away unnoticed like that...

 

Tuesday, January 04, 2005 7:29:29 PM (Eastern Standard Time, UTC-05:00) #  Disclaimer | Comments [2] | 

New phone devices coming from Samsung

Here is a link to some very interesting smartphone concept devices that were leaked from Samsung. I am especially intrigued by the third one:

Samsung "Thor"
Processor unknown, 3GB hard drive for memory, Bluetooth, GSM/GPRS, 18-bit Color 240x320 display, 4.45" x 1.89" x 0.83", and "MS Smartphone Magneto"”

Yes, this is a phone. With bluetooth and a 3G drive. No idea what “Magneto” is, but my guess is its a Smartphone version of Portable Media Center Edition. Wow, phone + camera + PDA + bluetooth + streaming media. This is really approaching the “all-in-one” personal device. I also notice it lists “Stereo BT Streaming” as a feature, and also “OTA / Online Music Service”... I don't suppose these will accept arbitrary sources. This could lead to *realtime* mediacasting if so.

Very promising direction here...

 

Tuesday, January 04, 2005 3:16:08 PM (Eastern Standard Time, UTC-05:00) #  Disclaimer | Comments [1] | 

 Saturday, January 01, 2005

Tips and Tricks: String.Intern()

In my recent pilgrimage through the .NET memory model, the garbage collection process, and the fine art of improving performance through runtime profiling and heap inspection, I came across this little piece of knowledge that may one day (maybe today?) benefit you as well. This is a short discussion of the subtle and rarely mentioned static function:

String.Intern()

From the MSDN documentation, this method is explained as such:

“The Intern method uses the intern pool to search for a string equal to the value of str. If such a string exists, its reference in the intern pool is returned. If the string does not exist, a reference to str is added to the intern pool, then that reference is returned.”

Sounds innocuous, but this little core feature may end up having great impact on your applications. Essentially, when you use String.Intern(), instead of making a copy of the string data on the managed heap, you instead are returned a reference to a shared copy of that same literal string. When you embed literal string values (string myString = “some value”) in your program code, the compiler automatically does this for you. Embedded literal strings will be “interned” for you without any additional effort.

So you might be wondering, “OK so now why do I care about this, if the compiler already does this for me?”. The answer is that the compiler only handles hard-coded string values. Consider this snippet of code:

public string[] BurnBabyBurn(string Input)
{
    string[] MyHugeArrayOfJunk = new string[2000];
    for (int Index = 0; Index < 2000; Index++)
    {
        MyHugeArrayOfJunk[Index] = Input;
    }
   return MyHugeArrayOfJunk;
}
[...]
string[] test = BurnBabyBurn("0123456789");

As you have probably guessed, this will make 2000 copies of the same literal string “0123456789“. Not very friendly to your memory footprint. So let us alter the previous code sample to make use of String.Intern():

public string[] ByNiceToMe(string Input)
{
    string[] MySmallerArrayOfJunk = new string[2000];
    for (int Index = 0; Index < 2000; Index++)
    {
        MySmallerArrayOfJunk[Index] = String.Intern(Input);
    }
    return MySmallerArrayOfJunk;
}
[...]
string[] test = BeNiceToMe("0123456789");

The difference is significant. This second version of the same logic will now make 2000 references to the same string value, rather than 2000 copies of it. This is a huge difference in terms of memory allocation on the managed heap (don't believe me? Try both routines and use CLR Profiler to see how much String data is sitting on your heap!).

Now sure, this example is simple and contrived (you really wouldnt ever build a 2000 element string array with the same values would you?). However, it illustrates a very useful way to reduce your memory churn in an application (and therefore reduced footprint, GC time, etc). Supposing you had a DataSet filled with values. Suppose there were 10 string columns, and 500 rows. Assume much of those 5000 string values were duplicates (result of enumeration domains, looked up values, etc)... I wonder what the memory savings (and GC savings when you Dispose() it!) would be? A hint: big enough to pay attention to.

Saturday, January 01, 2005 9:10:46 PM (Eastern Standard Time, UTC-05:00) #  Disclaimer | Comments [2] | 

 Friday, December 31, 2004

Geek dinner attendance

Wow, just look at the “roll call” from last night's geek dinner in San Francisco. Thats fourty-nine people. Well, sure they had some well-known names there, but then again we also have some well-known names at our own Atlanta events (at least as far as I am concerned).

I am quite envious. We only had what, five people at this month's event? We can do better. Is it just a matter of “getting the word out”? I know it cannot be because of the holidays... the SF dinner was held between xmas and new years. Southerners are noted for their sociability and accomodation - such a recurring event should fit right in with culture here.

 

Friday, December 31, 2004 12:27:44 PM (Eastern Standard Time, UTC-05:00) #  Disclaimer | Comments [1] | 
View Keith Rome's profile on LinkedIn

On this page....

Archives

Navigation

Categories

Microsoft Weblogs

Web 2.0 / AJAX

Local Atlanta Bloggers

SharePoint / MOSS

WPF

Other Weblogs

MSDN Monitoring

My Blogmap

About

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

Sign In

Certification Logo Certification Logo Certification Logo Certification Logo Certification Logo

Powered by: newtelligence dasBlog 2.0.7226.0