Closures

Once you use them, it’s hard to go back. The Java Jakarta Collections didn’t have true closures, but they were close enough and very useful. Here’s a C# example using anonymous delegates:


rules.ForEach(delegate(PriceRule rule)
{
ruleCatalog[rule.Item] = rule;
});

For loops are bronze age.

One of the humbling (and slightly frustrating) parts of switching technology stacks is learning how to do something you knew by heart in the old tech. Case in point: figuring out which item you selected in a GridView in ASP.net. I had a pattern down cold for this in Java web development. I eventually found the DataKeys property of GridView, but the online help did not describe how to use multiple keys. Thanks to the internet, I found a very helpful answer (and it’s not intuitive) here.

Debuggers: I’m all for them

There was yet another huge flamewar over whether or not debuggers are useful or the tools of lazy slobs. Count me in the former: I like using a debugger. Tests are great for shaking out issues with code and for maintaining confidence. However, when things get rough (and they will), it’s nice to look at exactly what’s going on inside the code.

My New PC Build

My AGP-based, first generation Athlon 64 was getting long in the tooth, and didn’t have a lot of upgrade room. With an eye towards doing more .NET development, and…uh…Bioshock’s impending release I built a new machine.

  • Athlon64×2 4000+ with stock heatsink/fan
  • ASUS M2N-SLI mainboard
  • 2GB of RAM (Crucial, of course)
  • ATI x1950Pro video card
  • PC Power & Cooling 610 power supply

I reused a SATA drive and Antec case I had already. The power supply seems like overkill but that video card (crucial for productivity), eats a lot of amps. The build went easily, and even with considerably more horsepower this PC is quieter than the old model.

I’m also trying running as a limited user under XP on this machine. I’ll fast-switch to an admin account when I need to install something. Now to get Visual Studio and…uh Bioshock installed.

C# and Yield

I just discovered yield. Wow. After using some of the new tools languages like Ruby provided (blocks, process control), it’s been hard to go back to Java. Nice to C# is up to more than just adding syntactic sugar (cough, Java5, cough).

Next Page »