Repository pattern overuse: The double repository with Microsoft Entity Framework and other ORMs

Martin Folwer’s blog and website is a common reference for modern design pattern so we will start with his glossary definition for the repository pattern. The linked article contains more detail, but in short a ‘repository’ acts as an data store layer on top of the storage system and provides (more) object oriented methods for accessing said system. Unfortunately, something I have also seen is the over application of this pattern in combination with RDBMS ORMs leading to contorted code with unnecessary interfaces and classes. This post covers what I have seen in some projects in order to provide some of the code smells to avoid.

Read more

Share

Of null VARCHAR fields and empty strings

How to represent a blank user input is a reasonably innocent design question. On a couple occasions though I have been bitten by systems that have been designed without considering that question seriously. Maybe it’s a clear choice to some, but today’s post makes an argument that in representing an empty input as a null is better than using a empty or blank string.

Read more

Share

Agilefall: gracefully delivering (some part of) a project on a fixed deadline

IT consulting is an odd place to be when it comes to software engineering practices. We often end up writing software for business groups that have fixed budgets and more importantly fixed deadlines. We also try to follow an agile methodology for software development that roughly follows scrum (warning: PDF), but with defined roles for a project manager and a development lead. Today’s post discusses some of the difficulties seen in using Agile to deliver business software and how we can mitigate those difficulties, basically things that worked and things that didn’t.

Read more

Share

Project War Rooms: How many ways can we interrupt each other?

Being an IT consultant has occasionally had me working in unusual or cramped quarters at client offices, the result of being hired help instead of a full time employee. One type of psychical situation I have ended up working in a few times is something we called “the project war room.”

Read more

Share

Interface mania: Considering when to add an interface for class.

Something introduced fairly early in programming courses is the concept of an interface. In practice interfaces help to define the boundaries between components of a system, define the behavior of underlying implementors of the interface, and make it easier to switch implementations of said behavior down the road. Today’s post offers a few thoughts on where interfaces should and should not be used.

Read more

Share

Java ArrayList resize costs

Today we will look at whether it’s worth developer time to pre-size ArrayList objects in Java application code. We will take a similar approach to the one taken in a prior post on how long it takes to handle an exception in Java.

Read more

Share

How long it takes to throw an exception in Java

Today post is exceptional, we’ll take a brief look at the time cost of throwing and re-throwing exceptions and put that time cost in context. To be specific, we’ll look at the timing information for a set of exceptions which might be found in a typical 3-tier business application. In our example the exceptions are thrown and caught in hierarchical order in order to promote separation between the tiers of the application.

Read more

Share

Server-client date time management in web applications

Previously we have discussed one approach and gave some implementing code for providing time zone adjusted date times to client web applications. Within the space of user facing web applications there are few different approaches to handling the storage and transmission of date time information. Today we will look at a couple broader themes for delivery of date times to client applications from servers and some thoughts on how to do it well.

Read more

Share

Gotchas associated with client side date handling

This is short post about a couple issues that end users might run into when using a method of displaying dates I described in a prior post. In short, Microsoft Internet Explorer 9 cannot parse certain types of ISO8601 dates correctly and Google Chrome does not track the system’s time zone correctly.

Read more

Share

On the use of AWS DynamoDB

In today’s post I’ll cover some of the potential use cases for AWS DynamoDB, why you might want to use it or not.

Read more

Share