Archive for April, 2010

Excellent C# Threading Memory Model Article

April 28th, 2010

I just read an excellent article on the memory model in .Net and C# as it relates to threading, written my Microsoft’s Igor Ostrovsky.  I think I had gathered most of these details over the years from various MSDN articles and CLR Via C# (1 & 2) by Jeffrey Richter.  However, Ostrovsky provides a solid narration of how the model works.  I was unaware that the local thread cache (conceptually) is all or nothing on reads and writes.  There are a lot of misconceptions of how threads, locks, and volatile variables work and this article does a pretty good job of nailing it all down.  There are some pieces of information that I had previously found slightly contradictory that really make sense when reading the article.

The New SyFy Riverworld Review

April 26th, 2010

I just finished watching the “4 hour” Riverworld movie on SyFy.  I was not that impressed.  As a fan of the Riverworld books, and knowing that SyFy can put together a good movie or mini-series when they want to (Tin Man, Battlestar Galactica), I was hopefully that this time SyFy would get it right.  My optimism was further encouraged by some good looking trailers for the show.  My optimism was misplaced.

I understand that any television or movie adaptation must change some things from the book.  To me a faithful interpretation is one that keeps the main characters and themes of the book in place.  Neither was done with any integrity here.  The books revolve around a cast of characters that alternately act as the main character in any given book or section of a book.  However, the overarching protagonist for the novels is Sir Richard Burton.  In the novels Burton leads a complex existence.  He is not an easy man to like but we like him all the same.  It becomes easy to overlook his shortcomings when his strengths are so many.  The author, Phillip Jose Farmer, created a believable character in his version of Burton.

Farmer had an ingenious science fiction concept when he reincarnated all of humanity, everyone that had ever lived, along the shores of a giant, planet-sized river.  But the real plot, and underlying theme of the book is so much more interesting.  Riverworld is a story about redemption and control, about religion and science, and about love and loyalty.

In the SyFy Riverworld, Burton is a 2-dimensional villain, wasting the talents of Peter Wingfield in the role.  A new protagonist is invented, with a new cadre of travel companions.  The new characters are likable, if not a little flat.  We don’t see any real character growth over “4 hours” of television (I keep putting the running time in quotations because SyFy inserted a lot of commercials.  I would suspect the running time with normal commercial usage would have been closer to 3 hours).

In the SyFy Riverworld, the plot of the books is twisted into a silly civil war between the aliens controlling the Riverworld.  So many interesting things could have been done with the real conflict from the books, but instead SyFy turns to a vanilla conflict.  They do try to take a stab at something more interesting than a black and white, good versus evil plot, but they never quite get there.

Once I realized that SyFy was once again trashing the characters and underlying plot of a great science fiction story, I decided to try to give the show a chance on its own merits.  Even pretending that I had not read the books didn’t make the movie better.  Plot holes were not adequately explained.  The motivations of characters seemed too generic.   Decent performances were turned in by many of the actors, but they had very poor material to work with.  And the entire time the film suffers from what must have been a very low budget for extras.  For a river that is supposed to hold billions of people, we see very few individuals outside the small cast of 10 or 15 people.

I wouldn’t recommend the movie.  Go get the books and read them.  They really are fantastic.

Belief vs Truth: Sara Mayhew Video

April 21st, 2010

Sara Mayhew, TED Fellow and Manga artist asks us, do we have the courage to let go of our beliefs in order to grab on to what is true?

Where Capitalism and Climate Science Meet

April 19th, 2010

Wired has a great article about how businesses are actually listening to the scientists and changing their business practices based on the reality of global warming.  Some businesses, like global shipper Beluga, are using new Arctic Sea routes that weren’t open even a couple of years ago.  Other businesses like insurance companies are betting that global warming is real.  Corporations cannot afford to listen to science-denier politics.  A corporation has to, you know, actually exist in the real world of facts and make money in that world.  Here is a short quote from an unusually good article from Wired.  I would encourage you to read the whole thing.

Companies, of course, exist to make money. That’s often what makes them seem so rapacious. But their primal greed also plants them inevitably in the “reality-based community.” If a firm’s bottom line is going to be affected by a changing climate — say, when its supply chains dry up because of drought, or its real estate gets swamped by sea-level rise — then it doesn’t particularly matter whether or not the executives want to believe in climate change. Railing at scientists for massaging tree-ring statistics won’t stop the globe from warming if the globe is actually, you know, warming. The same applies in reverse, as the folks at Beluga Shipping adroitly realized: If there are serious bucks to be made from the changing climate, then the free market is almost certainly going to jump at it.

Four Chords

April 19th, 2010

.Net 4.0 and VS 2010 GA

April 12th, 2010

Microsoft has released the 4.0 version of the .Net Framework and Visual Studio 2010.  The release includes several framework enhancements.  The Dynamic Language Runtime has been added, which will act as a useful bridge to such languages as IronPython and IronRuby.  The DLR optimizes dynamic languages at runtime for better performance with .Net.  Also added is the dynamic pseudo-type, which allows run-time lookup of properties and methods on dynamic and compiled types.  This will assist in the usage of dynamic code from compiled code, and also fits into some polymorphism scenarios.  There are also a number of Base Core Library changes.

C# will be gaining some new language functionality with the .Net 4.0 release.  C# now supports option parameters, named parameters and default parameter values to assist with those situations where overloads are cumbersome.  C# 4.0 also supports a type of covariance and contravariance for collections.

The .Net 4.0 framework was delayed because of performance issues.  I am glad they waited to get it right.

Silverlight 4.0 is scheduled to be released later this week.  ASP.Net MVC 2.0 was released a couple of weeks ago, which takes advantages of a couple of new .Net 4.0 scenarios.

SciFi Riverworld… Again

April 10th, 2010

Philip Jose Farmer wrote a serious of science fiction books that are collectively known as The Riverworld.  The works are classics in the realm of science fiction literature.  The first book in the series, To You Scattered Bodies Go, won The Hugo in 1972.  I have read all of the books from the original series, and thoroughly enjoyed them.  Farmer wrote another novel using the Riverworld characters after what was supposed to be the final novel, and also has published various short stories in The Riverworld universe.

SciFi made a failed pilot for a Riverworld Series a few years back.  I remember watching it, and remember that it sucked.  But the general idea behind the movie/pilot was very interesting, which eventually led me to read the books.  In a way this rather bad 86 minutes of television is responsible for my discovery of a great set of novels.

On April 18th SciFi is taking another stab at telling The Riverworld story with a new, four-hour Riverworld movie/miniseries.  It looks like it will be much better that their earlier effort.  From the few clues I garnered from the trailer it would appear they have included much more from the books.

Pigasus Awards 2010

April 6th, 2010

Opening Day

April 4th, 2010

By Bill Burns

And again it is time…
and you know it.
Without looking at the calendar
you know it’s the time
because you can smell it in the air
and feel it on your neck and back.
You hear the rising voices of the young
as they begin again
to toss the ball around.
So…
you get ready one more time
for that first trip to the park
to see the boys play the game
again.

It’s baseball.

BASEBALL…

Not more than life,
but pretty damn close.
Something you can love
eat
breathe
taste
& hold onto…
a language all its own
that you can share with friends,
your wife,
your children,
strangers even.

And so you must go
once again
to feel it and hold onto it,
to savor and be hurt by it…
to jump for joy and cry in deep despair…
to make it a part of you
before it’s gone…
or you are.

George Takei on the 2010 Census

April 2nd, 2010