Archive for October 2008
Think of it as a hi-tech version of Woody Allen’s statement that life is what happens to you while you’re out doing something else.
The above excerpt was written by Jeff Johson, the creator of the Xtree file management software in his quasi-blog post title “An Unapologetic History of XTree” written in 1991, six years after Xtree 1.0 was released.
Jeff was the lead developer on the Xtree software project that originally started out as an in-house tool but would soon become one of the most popular applications ever released for the DOS operating system.
What set Xtree apart from every other application was how it showed you where your files were located.
Among the subjects discussed were how the program would represent the DOS directory structure on-screen, and what the screen might look like. I drew a picture of this outline on a white board. It looked like a tree that needed water. It was a swell picture but no one thought it could be done. Impossible, they said.
Famous last words.
Xtree was the first application to use what we now call the Tree View it was created and shipped a full ten years before Microsoft would patent the idea and claim it as theirs. Although never officially credited, Jeff Johnson created of one of the most widely used UI components since the button.
Sadly, Executive Systems, the makers of Xtree, were aquired by Central Point Software in 1993. Symantec bought Central Point Software in 1994 and stopped all production of Xtree in 1995.
Jeff never recieved any compensation from Microsoft when they added file manager to Windows and, in 1992 he contracted the flu and his health began to decline. Although he has not gotten any better he does plan to work on another file manager when his health improves.
His article is a must-read for anyone that used Xtree and a strongly suggested read for anyone that develops software professionaly. Next time you open folder view in Windows Explorer, think of Jeff Johnson and all the talented people at Executive Systems.
I know I will.
So Jquery is going to become part of Asp.net MVC. First off, congrats to the Jquery team. They’ve put out a really awesome product. Second, congrats to Microsoft for catching every .Net developer completely by surprise, proving, again, that they are listening to the community.
I never really got into the microsoft javascript libraries that shipped with the ajax control toolkit because I found that I could do things much faster using external javascript libraries .
It will be interesting to see what Microsoft contributes back to the Jquery community in later updates to the ASP MVC product.
.NET · asp.net · jquery · MVC · Programming
The prototype javascript library has a class (Try) and function called these(). This function accepts an array of functions as it’s sole argument and it will execute each function in the array, in the order they are added, and return the result from the first function that executes without error. If none of the functions executes successfully undefined is returned.
For example:
var i = Try.These(
function() { return 9 / 0; },
function() { return 1; }
);
If we ran the sample above i would equal 1 because the first function would encounter a division by zero error. However:
var h = 0;
var i = Try.These(
function() { return 9 / h; },
function() { return 1 / h; }
);
i will equal undefined in this example.
With the .Net framework’s generics library we can achieve roughly the same results. We won’t be able to assign an undefined value to the result but we can play around with the default keyword. :D
public class Try
{
public static T These(params Func[] delegates)
{
for (int i = 0; i <= delegates.Length - 1; i++)
{
try
{
return (T)delegates[i]();
}
catch
{
}
}
return default(T);
}
}
So for example:
static void Main(string[] args)
{
int i = 0;
int y = Try.These(
delegate() {
int x = 0;
return i / x;
},
delegate() {
return ++i;
});
Console.Write("y is " + y.ToString());
}
Will output
y is 0
.NET · c# · Programming · prototype · try.these() · try/catch
