Test Driven Development is your friend

  • 0
I have seen lots developers are not seeing benefits of Test Driven development. When you do Test Driven development there are lots of benefits. So I thought it will be good idea to write a blog post about it.

What is Test Driven Development:

As per wikipedia Test Driven Development is

Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle: first the developer writes an (initially failing) automated test case that defines a desired improvement or new function, then produces the minimum amount of code to pass that test, and finally refactors the new code to acceptable standards
Kent Ben an American software engineer and creator of extreme programming rediscovered this technique. There are three main indicators of Test Driven development.
There are few steps of test driven development.
  1. Create a test that fail (Red Indicator).
  2. Write some code (Green Indicator).
  3. Test again and see whether test is passed or not? If not refactor your code until it passed test(Green Indicator).
You can find more information about Test driven development from following links.

Introduction to Test Driven Development
Test Driven Tutorial-Presentation

Test Driven Development and Microsoft.NET:

There are lots framework available for Microsoft.NET which you can use to develop your software in test driven way. Even Microsoft Visual Studio also provides Test Explorer in built to create and run test from Visual Studio itself.

Following is a complete list of Mature framework available for Test Driven Development and supported in Visual Studio itself.
  1. NUnit
  2. Xunit
  3. MS Test
You can find complete comparison of above three at following link.

Following link will give you guidelines/best practices  for Test Driven Development in Microsoft.NET World.
Guidelines for test driven development

Following are few more links that will give you head start with test driven development with Visual Studio and Microsoft.NET world.

Quick Start: Test Driven Development with Test Explorer
Walkthrough: Using TDD with ASP.NET MVC
NET TDD (Test Driven Development) by example

A great video from Scott Alen about TDD and Test driven development with ASP.NET MVC. It will be eye opener for you if you are not doing Test Driven Development.http://pluralsight.com/training/Player?author=scott-allen&name=mvc4-building-m9-tests&mode=live&clip=0&course=mvc4-building

Benefits of Test Driven Development:

Following are benefits of test driven development.
  1. It will definitely will decrease your regression testing significantly. You don’t have to worry about test while you edit or refactor your code. You just need to run code and see whether your code passes existing test or not.  You will not fear about breaking something while you add new functionality to existing functionality you need to run the existing tests to see whether your code is working fine or not.
  2. Refactoring of your code will become easier and you will not break your functionality while to refactor your code.
  3. Your architecture will be better designed due to test driven development because you know what things will be break if you make this changes.
  4. Code reviews will be easy.  The person who is reviewing your code will first look at the test created and better understands existing code with the help of test performed. You don’t have to explain each and every lines of code to him.
  5. Your code stability will increase. Because if you write code to pass test means that every bit of your code coverage is good and confirmed to pass tests written then your code will be more stable.
  6. Accountability of code will be increase. Let’s take general scenario most of the time developers does not accept that his/her code break things but when you have tests written they need to make sure that all tests are must pass and that’s why accountability of developer towards their code will increase.
  7. Better planning and estimation: Now there will be a test written for everything so you can check every bit of business logic   to pass tests. So estimation of software development and planning of that development task completion will be near to perfect.
  8. Reduce bug : With test driven development there will be very less bug because tests are written for all the scenarios and bug will be detected at the time of development only.
  9. It’s faster then righting code without test- Take scenario you have create a feature in module and deployed it to testing server where doing testers review they found x number of bugs. So you again need to fix that bugs and give them for testing and this cycle will go on and on until testers are satisfy with feature and specification. Now consider time given for deployment, publishing of code on test server as well testers time for regression testing time. You will realize that it will take more time then writing tests.
So there is myth that Test Driven Development is not for developers and it’s not developer’s friend. So what are you waiting for start Test Driven Development if you are not doing that till now!! It will definitely make you more productive and it’s your friend!!

Hope you like it. Stay tuned for more..

Creating a WordPress blog on azure websites

  • 0
In this post we are going to learn how we can create WordPress blog with Azure web sites.

What is Azure Web Sites?

Before some time Microsoft has released Azure web sites for South East Asia region. Windows Azure web sites offers secure and flexible deployment and scaling options for any kind of web application. You can use your existing tools to create and deploy applications to Azure Websites.

Windows Azure web site provides following features.
  • Provision and deploy fast
  • Secure platform that scales automatically
  • Great experience for Visual Studio developers. Even you can edit some code with online visual studio(Monaco).
  • Open and Flexible for anyone
  • Monitor and Alert
  • Auto scale to optimize cost and performance
  • A great gallery of most popular applications and easy direct deployment.
You can find more information about above features on following link.


Creating a WordPress blog with Azure websites from Gallery:

To create a azure website you must have Windows Azure account. If you don’t have account then you can have trial account for that from following link.


Once you you are done with creating account you can directly go to https://manage.windowsazure.com/ Once you click on that it will present you the sign in screen like below. Here you need to put your azure account credentials and login into the windows azure portal.

How to login into Microsoft Azure

Once you login into account a dashboard will launched from there like below.


here in the above link You can see web site below All Items (high lighted on yellow). Click on that. A create new website screen will be presented.
Microsoft Windows Azure Create Web site

If you got any existing site it will list all the sites and it will also have create new site button(highlighted with yellow colour in above picture. Once you click on that create new web site it will give user a few options like Quick Create, Custom Create and from Gallery like following. We need to create WordPress blog from gallery so we are going to select gallery.

Create website new from windows azure gallery

Once you click new gallery it will present a different options with categories. We need to create a WordPress blog so we have selected blog and selected WordPress.

Word press blog created from windows microsoft azure

Once you click next it will ask various configuration settings like URL,database etc.

Configuration settings on wordpress blog on windows azure

Once you move to next step it will ask for MYSQL database name as WordPress works with MySQL database.

Wordpress blog mysql database creationg windows azure

Once you agree with terms and condition it will create a WordPress site as above now once you put that URL i.e http://dotnetjalpswordpress.azurewebsites.net/ it will ask for site details of WordPress and user account creation.


Once you click on install it will create user and ask for login like following.

login word press site azure

Once you click on azure it will ask for your login credentials.

give login credentials wordpress admin windows azure

Once you click login it will present a word press dashboard.


So you are done with creating WordPress blog. Now you type blog url above specified it will load your WordPress blog like following.


That’s it. It’s very easy. Hope you like it. Stay tuned for more.

Visual Studio 2013 Cookbook review

  • 2
The marketing team from Packt Publication has given opportunity to Review Visual Studio 2013 Cookbook. So, this post is all about  reviewing Visual Studio 2013 Cookbook . It’s total 333 pages of long book with full converge of visual studio features.

1966EN _Cover
About Authors:

This book is written by Jeff Martin and Richards Banks both are quite experience person.

Jeff Martin is well known technology enthusiast and has been contributing writes for InfoQ(www.infoq.com) for over two years focusing on Microsoft .NET and related  platforms.  Readers are encouraged to follow @VSDevTips on twitter to receive updates of books and visual studio related stuff.

Richard Banks have more then 20 years of experience in software development. During his career his gone through various role like developer, team lead, project manager,CIO and CTO. He is a professional scrum trainer and runs Sydney ALT.NET user group and spoken at number of Microsoft events. You can find him on his blog http://www.richard-banks.org/

Table of Contents:

Following are table of content of a book. You can find sample chapters from the following link.

Table of Contents:
Chapter 1: Discovering Visual Studio 2013
Chapter 2: Getting Started with Windows Store Applications
Chapter 3: Web Development – ASP.NET, HTML5, CSS, and JavaScript
Chapter 4: .NET Framework 4.5.1 Development
Chapter 5: Debugging Your .NET Application
Chapter 6: Asynchrony in .NET
Chapter 7: Unwrapping C++ Development
Chapter 8: Working with Team Foundation Server 2013
Chapter 9: Languages
Appendix: Visual Studio Medley
  • Chapter 1: Discovering Visual Studio 2013
    • Introduction
    • Synchronizing settings
    • Touring the VS2013 IDE
    • Project round-tripping
    • Managing the editor windows
    • Finding Visual Studio commands
    • Searching and navigating
    • Navigating in depth 
  • Chapter 2: Getting Started with Windows Store Applications
    • Introduction
    • Getting a Windows Store app developer license
    • Creating a Windows Store app
    • Adding a Windows Store item template to your app
    • Using the Windows Store app simulator
    • Defining capabilities and contracts
    • Analyzing your App's performance
    • Packaging your Windows Store app
    • Validating your Windows Store app 
  • Chapter 3: Web Development – ASP.NET, HTML5, CSS, and JavaScript
    • Introduction
    • Getting started with Bootstrap
    • Previewing changes across multiple browsers
    • Creating HTML5 web pages
    • Taking advantage of the CSS editor improvements
    • Understanding the JavaScript editor improvements
    • Adding bundling and minification to JavaScript and CSS files
    • Verifying pages with the Page Inspector tool 
  • Chapter 4: .NET Framework 4.5.1 Development
    • Introduction
    • Adding the Ribbon to a WPF application
    • Creating a state machine in Visual Studio
    • Creating a task-based WCF service
    • Managing packages with NuGet
    • Unit testing .NET applications
    • Sharing class libraries across runtimes
    • Detecting duplicate code 
  • Chapter 5: Debugging Your .NET Application
    • Introduction
    • Maximizing everyday debugging
    • Debugging on remote machines and tablets
    • Debugging code in production with IntelliTrace
    • Debugging parallel code
    • Visualizing concurrency 
  • Chapter 6: Asynchrony in .NET
    • Introduction
    • Making your code asynchronous
    • Understanding asynchrony and the Windows Runtime
    • Using asynchrony with web applications
    • Working with actors and the TPL Dataflow Library 
  • Chapter 7: Unwrapping C++ Development
    • Introduction
    • Using XAML with C++
    • Unit testing C++ applications
    • Analyzing your C++ code
    • Using a custom rule set
    • Working with DirectX in Visual Studio 2013
    • Creating a shader using DGSL
    • Creating and displaying a 3D model
    • Using the Visual Studio Graphics Diagnostics 
  • Chapter 8: Working with Team Foundation Server 2013
    • Introduction
    • Creating a new TFS project
    • Managing your work
    • Using local workspaces for source control
    • Performing code reviews
    • Getting feedback from your users
    • Using Git for source control 
  • Chapter 9: Languages
    • Introduction
    • Fortifying JavaScript applications with TypeScript
    • Integrating Python into Visual Studio
    • Integrating Python with .NET 
  • Appendix: Visual Studio Medley
    • Introduction
    • Creating installer packages
    • Submitting apps to the Windows Store
    • Creating Visual Studio add-ins and extensions
    • Creating your own snippets
There are 9 full fledged chapters which includes all the features that is provide by Visual Studio 2013 including latest ones like Typescript and Python into Visual Studio.

Details Review of all the Chapters:

Chapter 1: Discovering Visual Studio 2013:

In this chapter, Authors given a complete tour of Visual Studio 2013 including new Synchronizing features with Microsoft Live login. It also explained about searching and navigation features of visual Studio.

Chapter 2: Getting Started with Windows Store application:

In this chapter a complete overview of Windows Store application is given from getting a developer licence to develop Windows store application to packing and validating Windows Store app. It shows various way of Windows Store application and choosing right development technology from choices of JavaScript,C#, and HTML5- JavaScript.

Chapter 3: Web development – ASP.NET, HTML5, CSS and JavaScript:

This chapter is my favourite among all the chapters included in book. Because its all about web development. It includes portions like Getting Started with Twitter Bootstrap which is now default part of ASP.NET Inbuilt template. It also tell all the features of latest CSS editors and JavaScript editors improvement in Visual Studio 2013. At last it describes about page inspector a must have debugging tool with Visual Studio. 

Chapter 4: .NET Framework 4.5.1 Development:

This chapter describes some of latest WPF ,WCF and Workflow foundations related development and how we can use those technology and development software with Visual Studio 2013. It also teaches about Sharing class library and detecting duplicate code. This duplicate code detection feature is my favourite one. You can easily find duplicate code and refactor that with help of this feature.

Chapter 5: Debugging Your .NET Application:

This chapter makes you master of debugging in .NET application, It teaches you various techniques to maximizing your debugging effort. It also tells us how we can debug the remote machines and tables connect to your computer and in last portion of this chapter it described how we can debug parallel code and Visualize concurrency. It also tell how we can debug production code with Intellitrace feature.

Chapter 6: Asynchrony in .NET:

This chapter describes how we can create asynchronous code and have less blocking of CPU during operations. It also describes how we can use this asynchronous code for windows runtime and ASP.NET web applications. It also got a complete section for Task Parallel DataFlow Library and tell us how we can utilize it and boos performance of our application.

Chapter 7: Unwrapping C++ Development:

This chapter describes how we can use Visual Studio 2013 for C++ development. Its contains different sections like using XAML with C++, Unit Testing, Analysing existing C++ code , Custom rule set, Working with Direct X in visual studio, Visual Studio Graphics diagnostics etc.

Chapter 8: Working with Team Foundation Server 2013:

In this chapter you can find all information Team Foundation Server 2013 from creating TFS project to Managing your work to local web spaces and source control etc. It also include how we can perform code reviews as well as we can get input from customers. In last section it also describes how you can use Git with Team Foundation Server 2013.

Chapter 9: Languages:

This chapter describes about languages supported by Visual Studio 2013. It explains how we can use TypeScript, Python in Visual Studio and how integrate python with .NET. Here I missed Node.js tools for Visual Studio 2013.


Visual studio 2013 Cookbook is a great book for beginners and intermediate users and for advance users of Visual Studio like me also can learn something new. Its explains all the features of Visual Studio with great details. Still I miss a dedicated chapter about Visual Studio tips and ticks to increase your productivity with Visual Studio 2013 and some visual studio 2013 hacks. I would highly recommend this book for no voice to intermediate user of Visual Studio. It can work as reference book for them.  For advance users of Visual Studio, It will surely add values to your existing knowledge.  But for no voice and intermediate users it is a must buy book!!

On this occasion, I would also like to thanks Packt Publication marketing team specially Dyson D' Souza for choosing me to review this book. I had fun reading this book.

Stay tuned for more!!