Saturday, July 28, 2012

Migrating Legacy Applications

Legacy Systems

Legacy systems are systems that have grown over the years and became harder and harder to change and or are build on outdated technologies. Since business is changing rapidly these systems no longer can keep up the pace. Certainly in people that sell services products that are sold can be very complex, take for instance insurances.
Often these systems are the core of the systems, if these systems go down you the company looses money, in certain areas you can loose thousands of dollars per minute you are down.


Signs that tell you that your current system will become unstable can be:
  • Downtime
  • More and more bugs, regression
  • Implementing new features takes longer and longer
  • Solving bugs takes longer
  • Unable to scale up your system
  • Upstaffing of your operational team
More about these symptoms you can read about here.
Usually when you start experiencing the negatives effects of these systems your legacy system will need to be changed quite urgently.
These symptoms will result into an increased TCO. Keeping the system operational will become increasingly difficult since people that operate these systems become older, skills required will become very rare.



There are several different approaches that can be taken to modernize your legacy system.
  • Garbage in-garbage out: for certain languages there are tools that convert your source code from one language to another like vb6 to vb .net, vb .net to c#
  • Big Bang Migration: full migration of a system, you rewrite your whole application at once and one magic day you put everything at once in production.
  • Incremental Migration: You partition your system in smaller subsystems and you put your system in production increment per increment.


Migration by tool

This approach can work if for instance you need to upgrade your system from one version to another. The biggest risk here is that when you do this you will not solve the fact that your software is difficult to adapt. It's an illusion that a system will be easier to adapt in a new technology than it was in the older one. What can be an added value of new technology is better development tools helping you with better support for refactoring to bring your system in a condition that is more suited to change and easier to change.

Big Bang Migration

This approach where you rewrite application from scratch and migrate your data from the old system to the new system. The biggest risk here is that when your project fails the entire project fails, the outcome becomes more unpredictable the bigger the project gets. The risk in this undertaking are generally huge and need to be assessed carefully.
This approach can be successful in projects that are quite small, your data is of high quality, you know your data structures and don't have a lot of dependencies on other systems.
There also is no guarantee that the new system you build will not start to show the same symptoms as your old one. If you do not put in place good programming techniques and adhere very strict quality guidelines the chance is big that the new system will become hard to change quite quickly.
Another downside is that business will not stop the evolve either you will be faced with the fact that you will need to implement old functionalities and in the mean time keep track of new developments also.
The cost is very high since you need to be operating your legacy system and in the meanwhile develop a new one which requires input from the people that are operating your legacy system which will have low availability due to the fact the need to keep the business afloat.
This approach is often chosen but often fails or costs enormous amounts of money.

Incremental Migration

When performing an incremental migration. You will have to divide your legacy system into smaller functional components and migrate each one step by step. The partitioning needs to be done just-in-time, enough to keep you busy.
The huge upside of this approach is that its the risks are highly controllable and that if something goes wrong the feedback is rapid and the impact of the failure is limited and predictable.
Another big advantage is also that you will be forced to build your system in such a way that is easily extended and changed.
The downside of this is that the people that operate your legacy system need to be actively involved with the new developments since they have indispensable knowledge about how the old system and the business operates, since they are responsible for operating the old system their availability might be quite limited. Combined with a significant increase in cost having to keep two teams.
It need to be taken in mind also that when doing an incremental modernization that every step you take needs to able to be rolled back so in the beginning this will require a significant effort to easily and rapidly deploy and rollback your changes.

Sunday, July 08, 2012

Git and Visual Studio 2012

Some points to take into mind when using Git in combination with Visual Studio 2012, Resharper and NUGet.
Manually add following entries to your .gitignore file
  • packages/
  • TestResults/
## Visual Studio

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files

# Build results


# Visual Studio profiler

# ReSharper is a .NET coding add-in

# Installshield output folder

# DocProject is a documentation generator add-in

# Click-Once directory

# Others
Generated_Code #added for RIA/Silverlight projects

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)

## Windows

# Windows image file caches

# Folder config file

## Python


# Packages

# Installer logs

# Unit test / coverage reports


#Mr Developer

# Mac crap

Saturday, July 07, 2012

SharpPOS: The Personae


basil Basil is a restaurant owner. At the end of the day he would like to have an overview of what has been paid by what means. At the end of the month he would like to have an overview of how much has been sold per day per tax category so he can pass this information to his accountant.


manuel001 Manuel is a waiter at basil’s restaurant. When he takes orders from customers he writes it down on a notepad, after he has written down the order he walks to the cash register and copies the information in the POS, if an order contains food it should be printed automatically to a secondary printer which is located in the kitchen, so the chef knows what dishes he has to prepare.

When a customer asks for the check Manual wants to be able to print an overview of what the customer has ordered and the total amount that he needs to pay. After getting the money from the customer he enters the amount that has been paid, the system should indicate how much money he has to render.

At the end of his shift he needs to close his shift and an oveview should be printed of how much he has sold, so he can count the money that is in the register

Friday, July 06, 2012

New Project

A few weekends ago a friend of mine lost his POS program during renovations. I told him maybe I could help him out and find him a new (open source) alternative instead of having to buy a new one. I deceided to give OpenBravoPOS a go, it is a neat system with tons of functionalities. However it has some quirks the most important one is that the Close Cash report, that is printed at the end of the day has not the possibility to print the total amount that has been sold per tax category, so it needs to be calculated afterwards which is a bit a pain in the ass... 

Other things I noticed is entering products is really, but really a painful experience, reference and barcode need to be unique... when in fact we don’t need neither the reference neither the barcode. When entering the price of the product you need to set the amount of tax before you can enter the sell price + tax because the base of the calculation is the price excluding the tax is a bit annoying also. 

So I came up with the idea to write him a brand new program called SharpPOS. First thing I did was write up the personas, I wrote one for the owner and one for a waitress. Then I went forward to identify the Minimal Marketable Product which was quit ok. the goal of my little project is to show the real power of Agile.
update: project canceled due to changed legislation