Are you doing cool stuff? If so, you need to communicate how cool it is, with demo apps, exciting examples, articles, talks, and seminars. I love to bring the best new technologies into the public eye. I'm especially a fan of innovative programming tools and mobility software (Tablet PC, SmartPhone, and .NET Compact Framework). Contact me:
Code, industry analysis, and miscellaneous cross-links from Larry O'Brien, the former editor of Computer Language and Software Development magazines.
To receive an occasional announcement message regarding my seminars or publications, please subscribe to my mailing list.
Inspired by Jon Udell's link to a New York Times article on network maps of polarized political books, I wrote a similar program in C# and mapped the polarization between readers of "The C# Programming Language" by Hejlsberg et al. and "The Java Programming Language" by Arnold et al. It's really fun to watch when the network is just a couple of hundred nodes.
Unfortunately.... even with 2000 nodes, the books aren't connected! Amazing. I don't know what to do... maybe work outward from suspected "connectors" like "Design Patterns," and "Design Patterns in C#" and "Design Patterns in Java." Anyway, my SpringEmbedderPanel doesn't zoom out, so it's impossible to generate a readable universe of connected books in a single image. Here are two images, one from early in the run with the complete network in play(with "C# Programming Language" on the left and "Java Programming Language" on the right), and another showing a portion of the display when the network is only around 200 books.


It's a fun program; I can't release it yet because it's all in C# 2.0 (with typesafe generics for which I'm very grateful!).
Bruce has an interesting discussion entitled “Generics Aren't”. It's primarily about the new support for generics in Java, but it has a lot of “generic generic” material as well.
via [Eric Gunnerson's C# Compendium]
The argument applies to C# generics, but dismisses type-safe data structures as only of concern to collections classes, but that's a narrow view. Using an interface loses type information (pace loose-typing discussion!). Consider the following, in which there's a desire not to allow Cats, Dogs, and Horses to interbreed :
interface BreedingAnimal
{
BreedingAnimal Breed(BreedingAnimal spouse);
}
class Dog: BreedingAnimal
{
public BreedingAnimal Breed(BreedingAnimal spouse)
{
return new Dog();
}
}
class Cat: BreedingAnimal
{
public BreedingAnimal Breed(BreedingAnimal spouse)
{
return new Cat();
}
}
class Horse: BreedingAnimal
{
public BreedingAnimal Breed(BreedingAnimal spouse)
{
return new Horse();
}
}
class TypeSafeBreeder<T> where T:BreedingAnimal
{
public T Reproduce(T aParent, T anotherParent)
{
return (T) aParent.Breed(anotherParent);
}
}
class TypeSafeGenericsAreUseful
{
public static void Main()
{
Dog lassie = new Dog();
Dog rintintin = new Dog();
Cat garfield = new Cat();
TypeSafeBreeder<Dog> kennel = new TypeSafeBreeder<Dog>();
Dog puppy = kennel.Reproduce(lassie, rintintin); //Isn't that nice?
// Dog x = kennel.Reproduce(lassie, garfield); //Won't compile. Isn't that nice?
Horse flicker = (Horse) garfield.Breed(lassie); //<- Compiles clean, runtime error. Darn you, type unsafe code!
}
}
(exercise for the reader: as an interface BreedingAnimal.Breed is necessarily public, allowing access to the Breed() method without using a TypeSafeBreeder<T>. Change the design so that such a threat would only apply to classes in the assembly where these classes are defined.)
| March 2004 | ||||||
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 | |||
| Feb Apr | ||||||
Recent code:
Recent writing:
Review of Borland's C# Builder 1.0
Recommended .NET Programming Books
Programming Sabre with Java, C#, and XML
Best Practices for .NET Architecture
Windows Server 2003 as an Application Server
Toolroll:
Motion Computing M1200 Tablet PC
Visual Studio 2003 Enterprise Architect
Rational Rose Enterprise Edition 7
T Mobile Pocket PC Phone Edition