One Fish,
Two Fish,
Red Fish,
Blue Fish!
- Dr. Seuss, 1960
My favorite construct in the C# programming language has to be the foreach
loop. I get a little jolt of pleasure every time I use it. I can enumerate
rows in SQL Queries, nodes in XML documents, ArrayLists, and Hashtables. You
name it, I can enumerate it all without mucking around with a single loop
conditional.
foreach is super convenient to use, but I don't use it as much as I should in
my own programs because writing the code to support foreach is tedious and
dull. Personally I'd much rather be off doing some kind of asynchronous bind
to a Web service thing than grinding out yet another iterator class. That's a
shame because iterators can be used for a lot more than just enumerating data
structures.
So I was happy to find that in C# 2.0 the dreary work is largely a relic of
the past. The introduction of ... (more)
When I was in junior high school music was one of the most important factors
in life. Few things were more important than being up-to-the-minute on which
bands were "cool" and which were to be eschewed. Regardless of what genre you
liked, yesterday's bands sucked and today's bands ruled. So it is with the
software industry. At any given moment there are the "cool" technologies (as
I write this the prevailing attitude is that Web services rule) and the
has-beens (COM was cool but now seems positively dowdy). I don't think this
is necessarily unhealthy experimentation is the only... (more)
Eighteen months ago Microsoft upset the Win32 apple cart by announcing a new
execution technology and promptly labeling it with the ActiveX-esque name of
"Microsoft .NET." I think it's safe to say that life hasn't been the same
since for anyone who works with Windows. .NET makes it seductively easy to
write code that just seems to work. No more puzzling through WNDENUMPROC or
IUnknown** or malloc/free all that grungy stuff is handled for you.
I've observed that when confronted with this prospect developers tend to
react in one of two ways. Some developers shrug and happily accep... (more)