Assess your .Net skills (and get a job) with this online test

Brant Estes of Magenic Technologies has just posted a very nice online quiz for .Net programmers. The test is there to pre-screen potential candidates to work at Magenic, but it’s also a very nice test for any .Net programmer to take (or to give to any .Net programmer you have considered hiring).

My Magenic Technologies .Net test scoreI took the test and scored a 75 out of 100 (without cheating, mind you), and was told I may make a great addition to Magenic. Unfortunately, I live in New York, and I’m not relocating. Besides, I just put in my resignation with my current employer so I can go back to independent consulting, so I’m not exactly on the market for full-time employment… but more on that another day.

Two-fifths good, three-fifths bad: Doublespeak, Radiohead, and Statistics

In October 2007, Radiohead released their latest album as a free digital download, giving consumers the choice to send money for it (i.e. they don’t have to, but they can if they want).

A month later, the news reports are negative: three out of five people did not pay for the album.

Wait a minute! I’d say this is good news. A free product was made available to people, and two out of five decided to pay for it anyway!

Compare this to Wikipedia, which claims on their web site that 19,163 people have donated to their cause. Considering they have 5,775,882 registered users and are, according to Alexa, the eighth most popular web site in the world, responsible for 8% of the world’s web traffic.

When 38% pay for a Radiohead album and one in 300 registered users (or an estimated in 6,000 total visitors) pay for Wikipedia, I’d say Radiohead is the clear winner.

Lies, damn lies, and statistics. I still say Radiohead’s experiment shows that it has potential as a viable business model.

Firefox, LinkButtons, and the Panel.DefaultButton: a (Prototype) fix

Recently I’ve stepped away from the MonoRail world to work on a project that uses ASP.Net WebForms. It didn’t take long before I found an annoying problem. (Actually I found many annoying problems, but I’ll focus on one here.)

The <ASP:Panel> control has a DefaultButton property which, according to the documentation, "Gets or sets the identifier for the default button that is contained in the Panel control." In other words:

Use the DefaultButton property to indicate which button gets clicked when the Panel control has focus and the user presses the ENTER key.

It works perfectly, if you’re not using a LinkButton control. Actually, that’s not true; if you use a LinkButton control and Internet Explorer, it works fine. It just doesn’t work in Firefox. Why?

Dmytro Shteflyuk outlines why in his blog post, Using Panel.DefaultButton property with LinkButton control in ASP.Net. Apparently, it’s an issue with the JavaScript code that Microsoft generates, which expects a click() method on the anchor (i.e. LinkButton). Firefox doesn’t have such an event for anchors — at least, not by default.

Dmytro outlines a fix which requires you to injext some JavaScript for each button. I prefer a simpler approach using CSS selectors, so I wrote the following script (Prototype required) to do it. Simply add this script to your web page, add the CSS class "button" to each LinkButton control, and press ENTER on your Firefox forms.

function prepareLinkButtonClicks()
{
	$$('a.button').each(function(tag) {
		if (tag && typeof(tag.click == 'undefined')) {
			tag.click = function() { 
				var result = true;
				if (tag.onclick) result = tag.onclick();
				if (typeof(result) == 'undefined' || result) {
					eval(tag.href);
				}
			}
		}
	});
}
Event.observe(window, 'load', prepareLinkButtonClicks);

Falling back in sync with development

I’ve been falling a bit out of sync with what’s going on in the development world lately, so to catch up I went to the web site for one of my favorite frameworks: Castle Project. Scrolling down their home page to the News & Events section, I read this:

Hey, that Brian is me! Thanks, Hammett! That little effort has since been supplanted by the far-superior online Castle API, but it was nice to see my effort was appreciated. Castle truly is a fantastic project, and the guys who work on it are among the smartest developers I’ve come across. I can only hope to reach their level of ability. However, to get there I need to exercise my development muscle more — something I haven’t done lately, because my responsibilities at my full-time job have changed to mostly systems infrastructure work. However, that may be changing soon, as my employment situation may be changing soon… but more on that, soon…