Well, I’m currently digging a bit deeper into WPF and the thousand little things you can do with it. Naturally I’ve been looking through my fair share of demo apps and tutorials too. And that’s where I stumbled upon this little gem of information hiding:

Exactly, that is what you get to see of a 200 LoC file when opening it up in Visual Studio. And the author did that for every single file, so whenever I opened a file I had to hit “Toggle all outlining” (Shortcut by default is CRTL+M, L).

Now, I’m all for clean code and tidy classes. But there are one thing fundamentally flawed with regions:

Once you need regions – Your code is simply too long. My most successful (and biggest) project to date had no class that exceeded 100 lines of code, and you simply can’t imagine what a joy it was to work with that codebase. You simply can’t put enough logic into 100 LoC to make it hard to test, just by limiting the length of a class you also lower the possible complexity of test and maintenance by a huge amount. Nice side effect: 100 LoC almost fit onto one screen so you understand the code without having to scroll through 3 pages of code to look up the name of a field.

Oh, Microsoft took it’s sweet time with Visual Studio 2010 and C#4 but now that it’s finally here I had to find out that the Vibrant Ink theme I’ve been using for years now needs an update to match new stuff in the language.

Thank god I did a quick search to see if someone already did that, and I stumbled on a pretty cool little website: studiostyles.infoA website dedicated to Visual Studio Themes, apparently written in ASP.NET MVC it allows users to create styles with a pretty simple editor and then share it with the world. They also added voting and some community stuff to it, but even if it was only a user-generated theme gallery for VS I’d love it. Cool stuff.