Handy for an upcoming project :)
if we only manage what’s easy to measure we’re not really managing at all.
Inside a Javascript function, the arguments keyword has a property callee that refers to itself. You can use this in anonymous functions to recursively call itself, or when removing event listeners.
Recursive:
function() {
try {
// Do something that might throw an error
} catch (error) {
setTimeout(arguments.callee, 0);
return;
}
}
Removing event handlers:
document.attachEvent("onreadystatechange", function(){
if (document.readyState === "complete") {
document.detachEvent("onreadystatechange", arguments.callee);
}
});
Interesting piece on the state of the .NET ecosphere, mirrors a lot of my own thinking recently.
One of the biggest things I think is missing from .NET is a central place for developers to discuss and collaborate on open source projects. Codeplex proposed to do this and is where a lot of .NET developers look to collaborate, but the problem is it sucks in so many ways… There seems to be a number of .NET projects making their way onto github, which is good but sadly I think using github effectively is beyond the average .NET developer (who has probably never heard of github).
The result is that there are a number of silos where clever .NET developers are creating good projects, but failing to collaborate together effectively. Often these communities are very difficult to penetrate for anyone but the smartest programmers.
Microsoft does nothing to help any of this. In there quest to lower the barrier to entry of .NET development, they’ve effectively generated all of the “how to pop-up Javascript alert box from C# code-behind?” questions that litter most .NET discussion forums. The asp.net site itself has a huge number of tutorials that present themselves as best practice, but are full of anti-patterns, maintenance nightmares and just Bad Programming (no doubt a few security holes as well).
I don’t see how this can change on the scale it needs to, not while a company like Microsoft is at the helm and constantly rendering the best open source projects redundant with it’s meager attempts at copying them. Oh, and don’t get me started on the Microsoft Patterns Library…
So jj, if you’re reading this, when can we start our first Rails project? ;o)
The community is sick, poisoned by the component vendors with closed source software “solutions” and stymied by Microsoft themselves who are so cleverly changing just fast enough to keep developers from solving problems themselves.
Third party vendor support forums are swamped with questions like “I put a GridView onto my CallBack control and now I get a ViewState is corrupt error”. The real answer to this question is not the one supplied: “this is fixed in the next version”. The real answer is of course “STOP USING SO MANY ILL-CONCEIVED ABSTRACTIONS AND LEARN FROM YOUR PEERS HOW THE #@$#@% WEB WORKS!”.
Also stop using codeplex it’s not real open source! Real open source isn’t submitting a patch and waiting/hoping that one day it might be accepted and merged into the main line.
(Source: whatupdave)