Archive for July, 2011

There are lots of business systems written in Microsoft Access.  One of the most successful companies I know is Gladstone, Inc, makers of ShoWorks software.  This software runs most of the county fairs in the U.S.  From entries, to checks, to vendors, this piece of software does it all to help manage and run a fair and keep track of all the data.  And it is written in Access.  Started on Access 97, I have watched this software grow through the various Access upgrades, and it tests the limits of the platform.  It’s author, Mike Hnatt, is one of the premiere Access gurus, and Microsoft has previous invited him up to the Redmond campus to be a part of internal Software Design Reviews, or SDR’s.  Mike knows the limits of access, but even with the vast array of other development options out there, nothing comes close to parity with the capabilities he relies on – until today. Read the rest of this entry »


Do you find yourself writing the same methods over and over in different classes? Say your project needs both a “Dog” class and a “Cat” class — do you end up writing a “sleep” method for both? What if, in two months, the client needs you to add a “possum” to the system? Do you end up going in and retyping “sleep” instructions yet again? When you’re modeling a system with many similar parts, it takes way too much time and effort to keep duplicating code for each class. Imagine how hard it would be to maintain a large project with thousands of classes! Besides, it violates the DRY principle of good programming: Don’t Repeat Yourself! There must be a better way. Read the rest of this entry »


Humans learn from experience. Learning to be a consultant is a pinnacle of this idea- you cannot pick up a book, read it, work a few exercises in an isolated setting, and be a consultant. However, The Clean Coder by Robert Martin puts readers in the right direction and starts them down the path to being a true professional by giving the reader both a code of conduct to live by and plethora of stories detailing Martin’s own experiences and pitfalls. This second-hand experience is the best possible resource that can be put into text, and while it will not guarantee that the reader will never make spills of their own, it reveals several of the obvious- and not so obvious- pitfalls that are on the path to being a professional developer.

This book is thin, but a very dense read; it covers a true variety of subjects, many of which that are crucial for consultants – when and how to say no and yes professionally, test driven development, project management, teamwork, and estimation, to name several. But it is because of this wealth of topics that Martin is able to show readers that professionalism and the path to a long and respected career involves dedication, practice, and time.

This is a book I would recommend not only to new software professionals, but experienced ones as well- because Martin also delves into the more detailed issues of professionalism and career development, even established professionals might learn a thing or two. There is also a section on mentoring that should prove useful to current professionals- because sharing knowledge is just as, if not more, important than obtaining it.

Overall, this book provides a solid foundation for any new software development career by giving the reader contextual experience as well as well-thought-out, time-tested rules to govern the start of a new (or existing) career as a software developer. The Clean Coder pulls all of these important topics into a central text, lending a much-needed resource to the software development community.


Ever heard the terms star schema, OLAP, fact table, dimension, or business intelligence and wondered what they meant and/or why you should care?  I learned what these terms meant five years ago, and I have found powerful usages for these concepts ever since.

Imagine your business owner is a restaurant manager.  You’ve built a point of sale system that records what customers have ordered.  Begrudgingly, you have also built some canned reports to list out sales transactions within a user-entered date range.  The restaurant manager could browse the transaction history for a particular month to learn Read the rest of this entry »


When designing a user interface, it’s important to avoid conflicts between what an action actually does and what the user expects it to do. Our goal is to minimize surprises to ensure a smooth end-user experience. This is called the Principle of Least Astonishment.

This principle should also be important to language designers. Just like a slick, AJAX-y web page is a user interface for the end user, a programming language’s syntax is a user interface for developers. When the rules of a language conflict with a typical developer’s mental model of what the rules might be, we have a problem every bit as serious as a confusing user-facing dialog.

After running into some hurdles using PowerShell, it seems that this language follows the Principle of Most Astonishment. Because its actual model conflicts with the mental model most developers take for granted in similar languages, it is very easy to run into some frustrating bugs.

Programming lanaguages can be dropped into several broad categories when they encourage similar mental models. For the Imperative Object-Oriented Languages, this makes it easy to start with Python and then learn Ruby, Java, and the like: they all have roughly similar notions of imperative control flow, Read the rest of this entry »


We are all familiar with the basic HomeController in the default ASP.NET MVC project.  We know we can pass values from the controller to the view.  Sometimes we are tempted to pass the controller itself to the view so that we can call methods on it.  The view should not have to depend on the controller.  This post provides a way to accomplish this.  For more on ASP.NET MVC, check out my book, ASP.NET MVC 3 in ActionRead the rest of this entry »


When the “Express” line of Visual Studio products was introduced with Visual Studio 2008, the Web Developer tool was a one-trick pony.  You could create a web site, and that was pretty much it.  No support for groupings of projects into solutions.  In other words, you couldn’t create libraries at the same time as the web site.

When ASP.NET came on the scene, this posed a problem.  MVC required web application projects, not the web site directory.  Visual Web Developer was enhanced a few times along with the way, and now it is a much more usable package. Read the rest of this entry »


TDD or Test Driven Development was considered an industry buzz for a while. Now a days it is considered more of a main stream development methodology. we, at Headspring, are among those early adopters who likes to walk on cutting edge technologies.

Over last 5 year, I have transition through different stages of mind set when it comes to unit testing or TDD in general. As an early adoptor I was curious to know to what extend we can take this concept. At this stage, my unit test looked more state testing i.e

[Test]
public void Should_Add_Two_Number()
{
    var number1 = 100;
    var number2 = 50;
    var sum = number1 + number2;
    sum.ShouldEqual(150);
}

As I moved further and realize power of maintainability and loosely coupled design, Read the rest of this entry »


Glimpse has generated a lot of buzz since it was unveiled earlier this year during the “Open Source Fest” at the Mix 2011 conference. If you’re not already using it to debug your ASP.NET Web Forms or MVC application, you should be. Glimpse allows you to inspect several server-side diagnostic and request related information with a UI just like Firebug. Here’s some resources to get you started if you need an intro:

There are several built-in plugins for Web Forms and MVC that will serve many needs, and you can even create your own. This tutorial will demonstrate how to create a plugin that will display the SQL generated by NHibernate.

Glimpse Plugins

Plugins are implemented by a simple class that implements the IGlimpsePlugin interface. There are a couple of great “hello world” example plugins on the Glimpse creating plugins page. Besides setting the name and some optional start-up code, a plugin’s main job is just to return some set of data that will be rendered to the Glimpse UI. What that data is and how we get it is the real magic, so read on below. Read the rest of this entry »


While JavaScript has historically been the go-to technology for animating CSS properties, CSS 3 brings us transitions: a declarative syntax for defining the transition between styles.

Adding transitions to your CSS is quite simple. First, define the “start” and “end” states of your HTML elements as separate rules, like so.

a.button {
   background: #222;
   border: solid 1px #666;
   color: #666;
}

a.button:hover {
   background: #06a;
   border: solid 1px #fff;
   color: #fff;
}
view raw gistfile1.css This Gist brought to you by GitHub.

Then, add the appropriate properties for transitioning your elements to both states (necessary since we’ll be transitioning both to and from each state). Read the rest of this entry »