Random Thoughts of a Scatterbrain.
 Tuesday, June 03, 2008

Celebrating Science

6/3/2008 4:53:36 PM (Eastern Daylight Time, UTC-04:00)

I like this Kamen interview:

Outfitting wounded veterans with dramatically better prosthetic limbs has been an emotional and rewarding journey for famed inventor Dean Kamen. But the project that has the biggest hold on his heart is a nonprofit called FIRST. The organization features a series of intellectual and scientific competitions. Students celebrate robotics the same way they celebrate football – complete with arenas, crowds, and cheerleaders.

Kamen says declines in graduating students and qualified engineers and scientists aren't an educational problem -- but a cultural one. When you celebrate sports and entertainment culturally, that's what kids naturally want to become. Solution? He's bringing sexy back to science. In this clip, he shares FIRST's results, and what corporate America is getting out of it too.

It needs a bit more love.  He makes a good point about the "unlimited class" of competition.  Whereas a cheetah can run faster than any human and an elephant can lift more than the strongest human, no animal can out-think humans.  Thus competitions of intellect are truly competitions of "unlimited class".

 Monday, June 02, 2008

China Bans "Free" Plastic Bags

6/2/2008 9:10:09 AM (Eastern Daylight Time, UTC-04:00)

I like this story:

China is banning free plastic bags common at shops and supermarkets and ordering customers to be charged for any they use, the government said Wednesday.

Shops have been instructed to mark the price of the plastic bags clearly and not fold them into the cost of other items.

Environmental organizations, including Greenpeace, praised China's move, and Christopher Flavin, president of Worldwatch Institute, an independent research organization in Washington, said "China is ahead of the U.S. with this policy," AP reported.

The Chinese use up to 3 billion plastic shopping bags a day.

Often, the flimsy bags are used once and discarded, adding to waste in a country grappling with air and water pollution as a result of rapid economic transformation, officials said.

"Our country consumes a large amount of plastic bags. While convenient for consumers, the bags also lead to a severe waste of resources and environmental pollution because of their excessive use and low rate of recycling," the statement at the Web site Gov.cn said. "The ultra-thin bags are the main source of 'white' pollution as they can easily get broken and end up as litter."

I think it's time for the US to do the same.  Not only are they not environmentally friendly, plastic bags are made from petroleum, contributing to the rising energy costs (fractionally).

 Thursday, May 29, 2008

Awesome News For Web UI Developers

5/29/2008 8:58:04 AM (Eastern Daylight Time, UTC-04:00)

Google's new AJAX Libraries API should help quite a bit with developing web UIs.  From Dion Almer:

I just got to announce the Google AJAX Libraries API which exists to make Ajax applications that use popular frameworks such as Prototype, Script.aculo.us, jQuery, Dojo, and MooTools faster and easier for developers.

Whenever I wrote an application that uses one of these frameworks, I would picture a user accessing my application, having 33 copies of prototype.js, and yet downloading yet another one from my site. It would make me squirm. What a waste!

When I joined Google I realised that we could help out here. What if we hosted these files?

Read more about it here.

By the way, I caught this little tagline from ajaxian:

Because after 10 years, we're still hand-coding.

There's a lot to be said for the productivity gained from drag-&-drop RAD tools, but ultimately, software engineering is still at a stage where craftsmanship matters (a lot) and there is no substitute for a skilled craftsman.

 Wednesday, May 28, 2008

When Will The Stupid End?

5/28/2008 10:46:23 AM (Eastern Daylight Time, UTC-04:00)

Seriously, what is this country coming to?

Does Dunkin’ Donuts really think its customers could mistake Rachael Ray for a terrorist sympathizer? The Canton-based company has abruptly canceled an ad in which the domestic diva wears a scarf that looks like a keffiyeh, a traditional headdress worn by Arab men.

Some observers, including ultra-conservative Fox News commentator Michelle Malkin, were so incensed by the ad that there was even talk of a Dunkin’ Donuts boycott.

‘‘The keffiyeh, for the clueless, is the traditional scarf of Arab men that has come to symbolize murderous Palestinian jihad,’’ Malkin yowls in her syndicated column.

‘‘Popularized by Yasser Arafat and a regular adornment of Muslim terrorists appearing in beheading and hostage-taking videos, the apparel has been mainstreamed by both ignorant and not-so-ignorant fashion designers, celebrities, and left-wing icons.’’

First of all, Michelle Malkin is a fucking idiot; everyone uses "Arabic" numerals every day...guess we need to start a ban of Arabic numerals lest the enemy think that we are sympathizers!  What's next?  A boycott of ottomans?  Gum arabic?  When will the stipid end?  Second of alll, Dunkin' Donuts must be run by a bunch of idiots, too.  Have some balls, especially after you've already paid Rachel Ray for the spot.  And gosh, just use some common sense, people.

Hit the link to see a pic of the supposed keffiyeh (not even close).

The stupidity...it hurts my head.

 Friday, May 16, 2008

Digging Into REST

5/16/2008 11:26:01 PM (Eastern Daylight Time, UTC-04:00)

I've been on a REST kick for a while now.  It's been brewing in the back of my head since an interview I did a few months back.

Pete Lacey gives an in depth interview on the topics of REST and WS-* over at InfoQ.  And he points to Dave Megginson's one line pitch for REST:

 With REST, every piece of information has its own URL.

It's an incredibly powerful concept and it's empowering for the end user, IMO.

One thing that's bugged me about REST is that -- without having written an explicitly RESTful application -- is that using REST over SOAP means much more "plumbing" for web services development.  It was kind of interesting to hear Lacey address this:

There's scalability, there's performance, which is primarily influenced by caching, which is built deep into the bones of REST and HTTP, there is simplicity of architecture, not necessarily of development, and this is especially true if you are a client side developer, the point is that we don't want to hide the network from you and so you actually have to do more work as a RESTful developer of clients that you would simply by spitting out code from a WSDL.

Indeed.  I think this is where I'm a bit torn on REST since the ideal of a resource based view of a system is empowering for end users but today's tools for working with WSDL allow for much greater producitivity for developers.

 Tuesday, May 13, 2008

Impulse Buy...Almost

5/13/2008 7:11:57 PM (Eastern Daylight Time, UTC-04:00)

I usually have problems spending more than a few dollars on anything non-functional.  For example, art or posters (which to my wife's chagrin, leaves most of the walls in our house bare).  However -- for a moment -- I actually considered if I would be willing to go all out and buy a hand written letter from Einstein:

A letter being auctioned in London this week adds more fuel to the long-simmering debate about the Nobel Prize-winning physicist's religious views. In the note, written the year before his death, Einstein dismissed the idea of God as the product of human weakness and the Bible as "pretty childish."

The letter, handwritten in German, is being sold by Bloomsbury Auctions on Thursday and is expected to fetch between $12,000 and $16,000.

I dunno...$16,000 seems like a bargain for a piece of history that seems almost priceless. A hand written letter by one of the greatest scientific minds in human history on one of the most oft debated aspects of his personal life?  $16,000 is a downright steal.

Which reminds me, I should pick up a print of the cover of Newton's Principia Mathematica one of these days.

log4net With SharePoint Layout Page Applications

5/13/2008 12:36:55 PM (Eastern Daylight Time, UTC-04:00)

Using log4net with SharePoint layout page applications is really no different from using it with other types of web applications with the exception that there really isn't a convenient way to initialize the logging configuration from your custom binaries.

The answer lies in the oft overlooked AssemblyInfo.cs file.

Add the following line to the file:

[assembly: log4net.Config.XmlConfigurator(Watch = true)]

You may also want to add log4net binary to the /App_Bin directory of the WSS virtual directory (as well as the configuration into the web.config file of the application, of course).

 Tuesday, May 06, 2008

Buy This Book!

5/6/2008 7:15:31 PM (Eastern Daylight Time, UTC-04:00)

This is quite exciting: my wife is now a published author (with her own ISBN and everything :-D)!

Check out her book The Parent Connection for Singapore Math.

:-D She's also got a media set, you know, if you've got $459 and nothing better to spend it on :-P

SharePoint "Unknown Error" Quirk

5/6/2008 3:16:53 PM (Eastern Daylight Time, UTC-04:00)

Anyone who's done any bit of SharePoint development is probably familiar with the completely useless "Unknown Error" view.  Well, in fact, SharePoint actually knows what the error is, it just doesn't want to tell you (okay, it's really just disabled for users).

In ASP.NET, you can usually get error messages to show up by setting <customErrors="Off"/>

However, this is not sufficient with SharePoint. As Stefan Keir Gordan points out, to get the nitty gritty details, you also need to set <SafeMode CallStack="True""/>

 Monday, May 05, 2008

MbUnit And TestDriven.NET On x64

5/5/2008 12:23:45 PM (Eastern Daylight Time, UTC-04:00)

I came across an interesting issue while trying to run some MbUnit RowTests this morning.

Namely, it seemed that the rows being passed in contained all null values.  It left me scratching my head.  I ran the tests using MbUnit console and it worked fine but didn't work as expected from TestDriven.NET in VS2005.

Well, it turns out that (I think) the install for MbUnit does not create the requisite registry keys in an x64 environment.  It properly creates the keys under the Wow6432Node, but it does not create the keys under the path:

HKEY_LOCAL_MACHINE\SOFTWARE\MutantDesign\TestDriven.NET\TestRunners

So to make it work, all you have to do is to copy the string values from the Wow6432Node to the key above and restart VS.

Hope this saves some headaches for other developers working in an x64 environment!

Update: Jeff Brown notes in the comments that this should be fixed with future releases so that x64 environment registry keys are properly generated.

RSS 2.0 Atom 1.0 CDF