Sunday, September 15, 2013

NDepend for Developers to Write Quality Code

Writing code is easy. But writing quality code is not that easy. Naming conventions, variables and constants defining, right use of the enums, class member visibility and many more things exists for the developer to be concerned with. In fact, you can save your customer as well as destroy him depending on the code you write sometimes. There are unit tests and load tests that Visual Studio provides inbuilt which you can asses the accuracy and speed of the code you write. Of course there are some best practices which should be followed but when you are a day before the code freeze, it is sometimes not likely to happen. 

I have tried out StyleCop which is a style analysis tool that works at the code level and FxCop which is a static analysis tool that works on the level of managed assembly. They give a lot of support for the developer to write some quality code. But what I am going to describe in the rest of article is a tool that do many times of work than any of these does. 

I got a message on LinkedIn from Patrick Smacchia, who is the CEO and Lead Developer of NDepend with an amazing gift. It's a free professional license for NDepend. I tried the tool for a few weeks and found some interesting features in it that could save my time and improve my code quality. So I used it to evaluate one of the projects I did about an year back. In a way I was really happy that I have recorded only 51 rules violations in a project with 232 classes when I was just 1 year experienced. 

Saturday, August 10, 2013

Introduction to Windows Phone 8 Development @ Sri Lanka .NET Forum, August 2013 Meetup

I got the opportunity to do my second Sri Lanka .NET Forum presentation on 8th August 2013. Even there were many presentations done by me on Windows Phone development at MS Champs Community and once for University of Kelaniya staff, this one looked bit different as the attendees are professional developers. So no free MSDN subscriptions or developer license for this crowd. 

As Windows Phone is an interesting topic for anybody who would love a smartphone, no need explain the interest of the crowd on the technology. The presentation took place after a fabulous presentation by MS Office MVP Dr. Nitin Sadashiv Paranjape which was scheduled at last minute. 

Thursday, August 8, 2013

Windows Phone App Studio: Easiest Way on The Earth To Create A Smartphone App

It was earlier the days where websites were built with huge efforts. Content Management Systems made things easier. Creating Smartphone apps is not that easy on any platform except on Windows. Now Microsoft has made that much easier. Can you imagine creating an app in a same span of time you create a simple blog by selecting a template and adding some content?

Monday, August 5, 2013

Visual Studio Shortcuts that Save My Time

Visual Studio is an amazing IDE that have lots of functionality built in to that so that could save the time of the developer. As I have heard, except for Apple Xcode, there is no other IDE that could compete with Visual Studio. First point of attraction for me was the set of short cuts that I can use to save my time. In-fact it is Ruwan (my boss) who pulled me into using them and I started loving them. 

I would mention here some of the most frequently used shortcuts by me in day to day coding. Of course you can change them to a way which you would like within visual studio and export as a file, so can import it and use it in another Visual Studio environment. The shortcuts I mention here are valid for C# selection as the Visual Studio environment.

Sunday, August 4, 2013

Android vs Windows Phone from a Developer Perspective

First of all I must say both of them have really good innovations. Android for benefiting millions of people by giving at least a phone that could run a smart stopwatch app and call that device a smartphone and Windows Phone for providing something people can use easily and get to know quickly. What makes me surprise most is Windows Phone being able to facilitate a better user experience with a dual core processor which Android does with a quad core processor. The time I am writing this post, Windows Phone is no where with the number of devices when compare with Android and my ex-favorite iOS. 

Start making notes about the developer perspective, Windows Phone is way far better than Android and you will realize why eventually. 

Saturday, August 3, 2013

Declarative (CAML) vs Imperative (.NET Code) List Creation on SharePoint

This has been a problem for me since I got my hands on SharePoint development. I am a .NET developer and I am used to write C# code quite easily for everything. At first few projects as usual creating a list was just a matter of few code lines for me on a feature activation. I knew there is a way I could do this with CAML but I did not try. Finally when a requirement came in to customizing a list edit template, I got to know it is easy to do with CAML where as hours of my research time went in waste when I tried the same with C#. This drives me forward to look and see why did Microsoft came up with CAML approach. I spent few time and I found a bunch of Pros and Cons each have.

In SharePoint as you may know, there are 3 easy ways to add a list to a SharePoint site. 
  • Using Code (C#.NET or VB.NET), known as Imperative
  • Use CAML, known as Declarative
  • Using SharePoint user interface (Designer or Web Application)

I am forgetting the SharePoint user interface as a developer approach for the rest of this application and go bit deep in others. 

Friday, August 2, 2013

Imagine Cup 2013 - Just Missed Russia

Some would call we won. Including definitely 4 of us. But end of the day it comes to 4 or 5 people who we need to convince. Judges are known as CEOs, CIOs, CFOs but looking at the current status of country it is a truth fact that if they were much capable of handling the situations, making the right decisions, the country would not be in this state. That is why I do not give much about Sri Lankan business minds say unless he/ she is an entrepreneur. In a summary, does not matter whether you call I am illiterate or wrong for me its us who were the best. I think I am reasonable enough given that the so called business master minds would have never thought to this extend when they were students. As I mentioned earlier, unfortunately its 4 or 5 people who decides our journey. Cannot do much. That is the rule of this game.