Monday, March 14, 2011

Data Design or Procedure First?

It's often a difficult decision whether to design the data representation or the algorithm first.

In a big team, designing the data representation first means that all team members can work on their individual functional components that operate on the same data representation.

However, the data representation may not be the right one for the algorithms, or not as simple or optimal as it could be. To determine the best data representation, you need to design the algorithm first.

When programming individually, I find it is best to figure out the simplest data representation (even if hard-coded, no IO) required to develop the algorithm, get that working, then modify the data representation to fit additional requirements (i.e. persistence, modifiability, etc). There's no point designing a lot of functionality (i.e. communication, database, etc.) if you don't have a good representation.

In a team, you can do this by prototyping critical algorithms first, then designing the data representation, then passing out functional component work.

No comments:

Post a Comment