Tuesday, September 27, 2011

Invest now for a brighter future!

How does the title - "Invest now for a brighter future" apply to software development?

I've worked on quite a few engagements where the original solution is often extended/enhanced many months after the initial build/release phase is over and typically by a different team.

When building software, there are some simple things you can do in the 'now' that will assist with quality further downstream. 
Often yourself, or the original development team may have moved on to pastures new and the maintenance of the original solution is left to others. 

The new team may have an understanding of a module within the solution, but often this is based on their assumptions and is often not as complete as the understanding the original team had whilst developing the solution - even with comprehensive documentation!

What can I do in the 'now' .... 

I've built a web page that displays widgets. It's clear during the initial development what the navigation paths to this new page will be, but what happens downstream when the customer would like to leverage this asset from another entry point within the application? 

As a new resource on the project, I could call the page and assume I have passed all the parameters required to render the page correctly, but there may be some exceptional use cases for this page that require additional parameters to be passed in for it to render correctly or for extended functionality to operate correctly.

I would say at the initial point of development, I am best placed to know what the mandatory parameters are, and as such I can invest some effort in ensuring that anyone calling the page has passed in the expected values. 

I could throw an informative exception if a parameter is omitted from the URL. This would ensure the issue is resolved early in the development phase and can be addressed upfront. (Early = Cheaper/Easier to resolve!)

This approach to protecting public interfaces from calling code is often referred to as Programming by Contract or Design by Contract and is still a useful tool in the toolbox for software developers wishing to ensure quality when changes are applied in the future.

So consider investing now for a brighter future - or at least, a brighter future for the solution!

Make the asset you are developing, an asset to your development skills!







No comments:

Post a Comment