Deep Dive on Closure Pitfalls

I’ve blogged about closures in C# and their pitfalls before.  I keep seeing problems with closures–more now that lambdas expressions and statements (“lambdas”) are becoming more widespread–even with experienced developers. So, I’d thought i’d post about some of the details surrounding where the C# compiler generates closures in the hopes that people will recognize more where they write code that creates a closure and its context. The C# language spec does not refer specifically to “closures”, with regard to capturing state for anonymous methods (including lambdas)–it refers to “outer variables” and “captured outer variables”.  The captured outer variables for a specific … Continue reading Deep Dive on Closure Pitfalls

DevTeach 2009 Vancouver

The schedule for DevTeach 2009 Vancouver has been announced (http://www.devteach.com/).  There’s lots of great software development sessions from some of the leaders in our industry. If you’re planning on improving yourself, this is the conference to go to.  Not only can you attend excellent sessions; but you can hob-knob with the presenters and pick their brains. If you have a friend or co-worker who’s interested, there’s a limited-time two-for-one offer for an even better price: http://www.devteach.com/Register.aspx

Oww, my brain hurts. Extension methods *will* cause me grief.

As a consultant, a task that I’m commonly asked to perform is to troubleshoot applications in need of repair.  The underlying source code and architecture for many applications in need of repair has, let’s say, “problems”.  One of the issues I run into with circumstances like this is the source code was not well organized, not well thought out, or not well managed as it evolved.  This type of code has poor style, poor coding habits, and often the programmers have code stepping all over other code through lack of cohesion and excessive coupling.  Believe me, as Visual Studio codenamed “Orcas” is released … Continue reading Oww, my brain hurts. Extension methods *will* cause me grief.