Home avatar

Thoughts and code

Windows 8 – First Impression

First impression is always important. I have decided to install Windows 8 in a virtual environment. Even though running it “natively” on a hardware is a better experience, I still wanted to see how well the hardware requirement was slimed down. Also, I have a very old idea of working in a VM box only, but it was always not a simple goal to achieve with Windows and Visual Studio being such a RAM / recourses pigs. This time around things looked very…. impressing.

Curing Singletonitis

A few years ago I have blogged about Singletonitis. Another place, different people, yet the same problem appears again – singletonitis. The issues I have outlined back then where

  1. Testing

  2. Difficulty to replace implementation

  3. Requirement to track all the location where Singleton is utilized once we need to replace it.

I’d like to look into these again and re-address this ‘disease’ so to speak.

Testing is important. Maybe back then (2008) some would argue, but not today. But what this testing is for? To confirm that implementation adheres to the desired design. And, as a side effect, to have a safety net. The why not to test singleton implementation and be done? The headache with singleton is not about singleton itself, but other code/components that rely on it. Yes, these days you could use tools like Moles and Typemock, but why would you if you could DESIGN your code properly to begin with?

Windows 8

Watching Build event I couldn’t not to smile. Microsoft is not always getting it right, but it looks like this time around they bet on a stronger horse. When .NET was released, ASP.NET was an attempt to bring desktop development to the web. Not the best approach. This time around, web development is coming to the desktop. Sounds interesting, and quite promising.

TFS

There’s no perfect software. If it would exist, we’d never build a newer one.

There’s also software that should never be built from the beginning. TFS is one of those.

I’ve used it for the past 3 months, and it was way far more than just an unpleasant experience. I have previously worked with VSS, TFS, and Mercurial. I am somewhat biased, yet towards proper work experience and quality of tools.  These are the issues that I have had with this software.

Being Productive With Mouse

I am a big fan of productivity and for myself mouse is usually more of a drag than help when coding. While watching a presentation caught presenter using a mouse in a way I never did, and that was quite productive!

The objective was to create an entity for an ORM. Here’s how it went.

First, a code-first entity was created leveraging prop code snippet.

image
image

Then pressing ALT key and making of selection of “nothing” in front of all the properties public keyword, including the rows with the mouse. Thin blue line on the left represent this “selection”.

DSCM – Enjoy Both Worlds

A while ago, the team I was part of had a discussion about choosing the best DSCM (Distributed Source Code Management). Two candidate back then were Mercurial (Hg) and Git. We were already using Subversion and very accustomed to VisualSVN in conjunction with TortoiseSVN. Opinions split, time frames never allowed to actually make the switch and so the question remained unanswered: which one is to go with.

While there are a lot of blog posts stating what side to take, I personally went with Hg (partially due to its similarity in work with SVN I was used to). Yet there’s a lot of code that is hosted on Git repositories, and I wanted to access it as well. Commands for Hg and Git might not always have the same name, but the final result is similar. So why shouldn’t one be able to use a single tool to access both types of repositories? And surely a quick search has revealed a way to do so in a very easy way.

ASP.NET 4 CMS–Book

I have looked for a book about CMS concepts and was excited to spot ASP.NET 4 CMS. As much as I was excited initially, that much I was disappointed as going through the book. Here a few things I did not find pleasant about it:

  1. The book is not about CMS concepts and techniques. Vastly it’s about .NET 4.0 and tools the author wanted to talk about in order to share its own experience while building a CMS system.
  2. Talking about new features of C# 4.0 and Visual Studio .NET 2010 in a CMS books is at least a waste of readers time.
  3. Using WebForms and talking about clean mark-up (or Search Engine Optimization) was a bit of a slap in a face.

Either way, I am back to my search for a good book on CMS concepts and techniques.

The Clean Coder – Book Review

image
image

Uncle Bob did it again. Another book that is full of experience and wisdom. This time it’s not about code, it’s about being a professional developer and what it means. I really loved the book. There were so many examples that I couldn’t not to smile recalling instances from my own experience having parallels with what is described in the book. One particular sentence I really loved was about TDD: