Applying design patterns to real life coding problems