Kasi Prasad

Lifestyles of an Urban Coder

Continuous Integration and Build Automation

Saturday, 22 May 2010 22:42 by Kasi Prasad

Without a strong continuous integration process, a well organized Agile/Scrum project can quickly turn to chaos. Agile is most commonly associated with iterative development, which in turn, implies continuous visibility of a project (Scrum Masters, Product Owners and Stakeholders are always interested in the state of a project) and continuous integration via build automation supply the the foundation for supporting the demanding pace of an Agile/Scrum project.

When I’m developing code on a team, its nice to know that at the very least, the code compiles, unit tests/specifications are passing, the code is well covered and that when I check it in, everyone in the organization who is interested in the state of a project can easily get access to it.

Currently, I am using a set of crafty NAnt scripts along with Team City to ensure the visibility of our project and its associated artifacts.

The NAnt build scripts include features which can compile, execute automated tests/specifications and generate reports, generate code coverage reports, generate code analysis reports, version, create environment specific versions (DEV, QA, PROD, etc), zip the output and back it up to network drive, deploy the the target applications (in my case, web applications) to an integration server for immediate availability as well as an assortment of other things.

Team City listens for check-ins to occur on my source control repository and when it detects one, it grabs the latest version of code and executes the associated NAnt build script. All of the reports generated by the build are visible through the Team City web site interface as well as access to the final build output along with some custom reports that I generate to make it easy to track all of the applications which were affected during the build (paths to generated output, version numbers which were deployed to integration server, etc).

All in all, the combination of a Source Control Repository, NAnt and Team City provide a simple continuous integration solution with valuable information about the latest version of an emerging project.

Did I mention that Team City Professional is FREE for up to 20 Build Configurations and 20 Users! NAnt is an open source .NET port of the popular Ant tool from the Java world and while I know that there are some more modern (non XML) alternatives (Albacore, psake) I decided to stick something I knew for the current project, however in my free time, I’ve been looking at UppercuT, Powershell and Ruby as a .NET build tool.

Executable Specifications – A side-effect of TDD

Tuesday, 20 April 2010 01:31 by Kasi Prasad

When we write our code test first we are forced to make decisions about how the application will operate. We have to express the intent of our code using expectations and verifications before we ever begin implementing any actual functionality. By writing code test first we free ourselves to mold our API from the perspective of a consumer, almost ensuring that we end up with a simple API containing only what is absolutely essential.

A powerful side-effect of TDD is testability. When we write code test first we end up with a set of specifications which can be used to verify the behavior of our application. When these specifications are checked (by running the suite of tests) we can verify that our application behaves appropriately. When a change is made to the behavior of our application, these specifications will indicate (by way of failing tests), that such a change has been made. The testability aspect of TDD, while quite helpful is not the main focus of TDD it is only a side-effect.

While TDD forces us to create high quality code (because we must test pieces of the system in isolation) , doing TDD doesn’t guarantee we’re going to produce bug-free code! TDD needs the accompaniment of Integration Testing and Acceptance Testing in order to ensure quality. If TDD were a drawing, integration and acceptance testing would be the frame you’d place your finished masterpiece within.

Tags:  
Categories:   TDD | Testing | Agile
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

TDD - Test Driven Design

Friday, 23 January 2009 03:48 by Kasi Prasad

I was really pleased to hear Scott Belware’s recent interview (TDD – The Final Word) on Scott Hansleman’s podcast – Hansleminutes. Scott B was really adamant about explaining that TDD is an activity that is focused on design as opposed to testing. He mentions the term Behavior Driven Development (BDD) and how it would be better suited since the word Test in TDD is often the source of confusion. I’m happy that he went as far as to have an entire interview dedicated to changing this common misconception about TDD. Test-Driven Development/Design is not about testing, it’s all about driving out the design of our applications.

Stay tuned for more…
Tags:   ,
Categories:   Architecture | General | TDD | Testing
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Blogging!

Wednesday, 21 January 2009 18:02 by Kasi Prasad

Well, after much procrastination, I’ve decided to get my act together and jump on the blog roll. Expect to see new articles added on a weekly basis.

To tell you a little bit about myself:

I'm a Software Analyst / trainer & mentor living and operating out of New York City, New York. I operate a consulting firm which designs and develops applications, primarily on the Microsoft stack using the .NET Framework. I hold an assortment of Microsoft certifications and I'm an active Microsoft Certified Trainer (MCT).

I believe in Agile values and practices and employ methodologies such as eXtreme Programming, Scrum and Lean to manage software projects.

I'm also a big supporter of the ALT.NET community. One of my favorite quotes describing what it means to be an ALT.NET type of developer:

"You know tools are great, but they only take you so far. It’s the principles and knowledge that really matter. The best tools are those that embed the knowledge and encourage the principles"

Tags:  
Categories:   General
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

.NET 2.0 Development Boot Camp starting January 28th, 2008

Monday, 21 January 2008 03:38 by kasi

Since this is my first blog entry I’d like to start by thanking everyone that has inspired and motivated me, not only in my development career but all throughout the way. I couldn’t have made it without you…

Starting on January 28th, I’ll be delivering a 12 day, boot camp style (10 hour day) course in which we’ll cover the .NET Framework 2.0 BCL (Base Class Library), Web Application Development using ASP.NET and Windows Application Development. This boot camp is geared toward preparing students for Microsoft Certification as Technology Specialist’s (70-536, 70-526, 70-528) on both the Web and Windows platforms. The content is presented at a high pace so it’s expected that attendees have at least one year of hands on .NET (1.0, 1.1, 2.0) in either C# or VB.NET. The course outline can be found here. It’s going to be held at the NetCom Information Technology training center (Empire State Building)

To give a quick rundown of what to expect (note: this is based on Microsoft Official Curriculum, so as much as I’d like to break out some Design Patterns, TDD and an ALT.NET mindset, I’ve got a schedule to keep and a strict set of curriculum, so it won’t be happening):

  • Basics of the Base Class Library (lots to cover, system types, system interfaces, etc)
    • Reference Types / Value Types
    • Boxing / Unboxing
    • Exception Handling
    • Generic’s (with an emphasis on generic classes rather than collections)
    • Inheritance and Polymorphism (due to time constraints this is mainly a syntactic discussion)
    • Object Lifecycle (Instantiation, Disposal, Garbage Collection)
  • Advanced aspects of the Base Class Library
    • Globalization
    • Code Access Security
    • Cryptography
    • COM+ Interop
    • Creating Windows Services
    • Reflection
    • Multithreading
  • Data Access using ADO.NET
  • Web Application Development using ASP.NET
    • Web Forms
    • Master Pages
    • Themes
    • Web Parts
    • Membership / Authentication / Authorization
    • Globalization
    • Creating custom controls
  • Windows Forms Applications
    • Menus
    • DataBound Controls
    • Performing Asynchronous Tasks
    • ClickOnce
    • MDI Applications
    • Customized Printing
    • GDI+

As always, I will be doing a lot of code examples on the fly and I will post them all here once the course has completed so stay tuned for that. If you’d like any information about this course or would like to attend feel free to drop me an e-mail. Thanks.

Tags:   ,
Categories:   .NET General | .NET 2.0 | Training
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed