Visual Studio 2010 (Rosario)

Microsoft has provided the first look at its new development platform Visual Studio 2010 which is based on the new .NET Framework 4.0.

Microsoft described the next release through the following five focus areas:

  • riding the next-generation platform wave
  • inspiring developer delight
  • powering breakthrough departmental applications
  • enabling emerging trends such as cloud computing
  • democratizing application life-cycle management (ALM)

Their efforts in the area of ALM is the next step after their launch of Team Foundation Server (TFS) in 2005 and their efforts to combine Management, Analysis, Design, Testing, and Deployment all together under one platform.

The new announced features includes enhanced modeling with new diagram types such as use case, activity, and sequence beside the tightly close integration of modeling with existing and new code.

My favorite in the new features is the new testing capabilities which includes a stand-alone Test Runner that allows for running manual test, and at the same time take system snapshots with pertinent information and can be even used to take video captures of what was done during the test and report a bug to TFS directly with the captured data as an attachment.

Another favorite is the Test Impact View, which allows the developer to view the code changes made and the impacted tests that needs to re-run before checking in the latest modification.

For more info you can check the Visual Studio Team System 2010 Overview page.

DeKlarit and Observed Requirement

A few days ago I have read the article of Observed Requirement by Martin Fowler.

In this articles he stated that what customers ask for is not always what they need, regardless of the common interpretation errors and ambiguity and so on. Typical customers can ask for some features which they actually don’t use, or forget about some other features they badly need.

The solution in Fowler’s opinion is to “observe” the actual behavior of the customers, and this is typically possible in web applications where you have the ability to log everything; common user navigation scenarios, areas used most, areas almost ignored, and so on.

I took a while thinking about the same case for desktop applications, and how we can apply such technique. Of course logging might not be much important as in the case of web applications, because communication is much easier with few customers, and sales personnel can watch customers behavior while in demo.

But the customers need something (a prototype) to “play with” so that we can watch their behavior. And this prototype should be easily modified, rapidly built, and it should be as close as possible to the business model of the customer.

I then recalled a Model Driven Architecture (MDA) tool I have came across a couple of years ago and it was known to build database applications with associated GUI in few hours, if not less.

Please watch the demo of the tool DeKlarit which shows you a quick example on how to build, manipulate a simple business object in few minutes and have a convenient GUI to persist and view data to database. This GUI also can be used by you (the developer) to enter test data in a convenient way without worrying about building data layer and business layer. And if you change the physical layer, your saved data is copied automatically to the new model.

And if you are interested to explore its other features, you can download a fully functional 60 days trial.

Coding to the core

I remember in my first job, I have joined a project that was based on an infrastructure built by some other developers who had left the company.

During my first days of training, I was told “never to touch” that infrastructure, and it made me write a funny poem about that on our whiteboard.

I was always encouraged to find other workarounds rather than modifying the infrastructure. And when it was really needed, it has to be kept minimal, done under close supervision, treated with high suspection, and always thought of first as the source of every bug that might appear later.

And in the following years, I started to read about good software design, refactoring, so I was always leaning toward “butchering” old code, but I always depended on my own manual testing to verify that I didn’t break anything in my refactoring “rides”. Manual testing was good for about 90% of the times, but there were few cases that skipped me, and hence I got that look “we told you not to touch it!!”. I was much experienced then, but it didn’t give me the right to try something that was considered a “taboo” before.

I still remember how terrified was one of my junior colleagues when I proposed adding a method to a base class instead of adding it to all subclasses.

Today, one of my colleagues asked me about a problem, and after 5 or 10 minutes of discussion, we found out that one of the solutions is to add the new required functionality to the base class (may be it was not the best solution, but it was better than the one she implemented). And then I wondered why didn’t she thought of it in the first place, and as I expected, she didn’t want to “touch” the base class although it was the straight forward solution, and thought of workarounds. And I was happy I encouraged her not to fear the “core”.

My point is, why do we keep building barriers to improvements? development is an innovative process, and it is the duty of seniors to encourage juniors to learn and try. In addition, we have all the tools that help us in our mission; source control, refactoring helpers, clone detectors, code analysis, unit testing, and more. And believe me, the cost of maintaining a badly designed project, is much much higher than the cost of a bug that might skip from the core.

I have also to stress that refactoring with freedom has to be coupled with extensive Unit Testing and Code Coverage, but that might be the topic for anothe post.