- Recent
- Popular
- Tags (0)
- Subscribers (5)
- A Train of Thought – QCon San Francisco 2008Yesterday
-
I’ve been at QCon San Francisco most of the week, and I think I can say that content wise, it’s the best “eyes forward” conference I’ve ever attended. I’m finished with all my speaking and relatively satisfied with how it went. All the talks were filmed and will appear on InfoQ.com at some point.
As always, everybody I talk to is working on a more interesting project than I am, but that’s just a case of the grass always being greener on the other side of the hill. I don’t have much at the minute, but here’s a start on a wrapup. I’ll catch up on StructureMap requests and emails over the weekend for all of you waiting on something from me.
The Highlights
- Martin Fowler and Rebecca Parsons talk on reconciling enterprise architects with Agile processes. I think they made a very good case for using incremental delivery mechanisms and the transparency that Agile can provide to aid architects. Buuuuuuttttttt, in order for their recommendations to work, I think that large companies will have to dramatically change their attitudes towards the people that build software. Hands on skills and application architecture skills have to be held in much more regard by many companies than it is today.
- Seeing some Google Web Toolkit in action at a talk from Alex Moffat (fe
- Back to Basics: GenericsYesterday
-
Introduction
There are language features that are nothing more than syntactical sugar. For example, C#'s coalesce operator (??) is a short-handed and specialized if-else. Object initializers make it easier to set properties on a newly created objects. Some features though go beyond mere convenience and add real value. I know it seems like we constantly have to learn new things, while at the same time actually produce code to pay our bills. It can be hard to pick and choose what to learn and what can wait. Let me be straight up though: if you haven't mastered generics yet, you're starting to fall dangerously behind.
I don't say that to put you down. I say it because not only are they used all over the place (and it's important that you understand the code that you use), but also because they've been around for a relatively long while and provide some serious benefits (generics were first introduced in .NET 3 years ago, but the concept dates back to the 70s).
I think the problem is threefold:
- The syntax is odd,
- The problem generics solve isn't well understood, and
- How they actually work isn't clear
The Problem
The best way to learn how generics work is by looking at the problem they solve – which is rather straightforward. You use a generic whenever you have a piece of code which can be re-used by different types. The classic example is a data structure, like a list or a hashtable.
A list is
- Øredev is differentYesterday
-
Following in Oren's suit, I wanted to let everyone know that Øredev is one awesome conference, and I am having a real blast! If you know me, then you know I am usually really bad about blogging about conferences I attend. I already have a backlog that includes PDC, Kaizen and the p&p summit. Why this one? Well I am really feeling inspired, and thus it's became a moral imperative. :-)
A few things about this conference stand out for me.
- The graciousness of the hosts. On the night before the conference I attended a private party at Magnus (my track owner's) house. Magnus welcomed a bunch of us into his home, which was wonderful. Magnus thank you and your wife for your amazing hospitality! After that we headed over to a beautiful dinner at one of the local government buildings. There we were hosted by the deputy mayor of the city of Malmö! The architecture of the building was amazing, and it it was filled with some very old works of art. The mayor gave us a nice talk about the history of the building, and thanked us for coming from all-over to attend the conference. Last but not least, I'd like thank Michael Tilberg. He and his crew have really gone out of their way to make sure all our needs are provided. All I can say is Wow!
- The level of seriousness of the attendees. I have attended a host of different conferences. In this one,
- ASP.NET MVC: ActionNameAttribute and ActionMethodSelector ClassNovember 19
-
I presented the MVC Framework this past Monday and am following up on a question regarding details of the ActionNameAttribute in the MVC Framework....(read more)
- An easy and efficient way to improve .NET code performancesNovember 19
-
Currently, I am getting serious about measuring and improving performances of .NET code. I’ll post more about this topic within the next weeks. For today I would like to present an efficient optimization I found on something we all use massively: loops on collections. I talk here about the cost of the loop itself, i.e for and foreach instructions, not the cost of the code executed in the loop. I basically found that:- for loops on List<T> are a bit more than 2 times cheaper than foreach loops on List<T>.
- Looping on array is around 2 times cheaper than looping on List<T>.
- As a consequence, looping on array using for is 5 times cheaper than looping on List<T> using foreach (which I believe, is what we all do).
The foreach syntax sugar is a blessing and for many complex loops it is not worth transforming foreach into for. But for certain kind of loops, like short loops made of one or two instructions nested in some other loops, these 5 times factor can become a huge bonus. And the good news is that the code of NDepend has plenty of these nested short loops because of algorithm such as
