Prototyping

Prototyping is not a new concept, nor the sole domain of computer science; it’s one that’s been used outside the computing field, even before computers ever existed. It is a try and tested way of working, that concentrate on moving forward, with the premise, that the result, will be revised and even re-written if deemed necessary.

Prototyping, let’s the programmer find and solve problems, that were not factored into the implementation of the application, it is mostly done using tools that are not as time consuming, as the target tool to be used,.

In music, composers usually make a orchestra sketch with the lines that each instrument part, they do this because it is easier to work with than an orchestral score, and because it affords the composer flexibility to play around with different instrumental combination. When they are happy with the sketch, they will then start working on revision, and yet again everything might change, until he’s satisfied with the outcome.

In computing, we don’t tend to prototype as much, there are others but I leave you to add them and comment on them, but we usually take one of two roads:

  1. We do a formal design, and implement it.
  2. We hack until we get what we want.

This options are not good or bad, it all depend on what we are doing; but those two are potentially inefficient.

With the first option, you might find yourself in the middle of your implementation, and realizing there is a fundamental mistake on the design, that makes everything you’ve done until now useless trash.

With the second option you might find yourself hacking away and loosing sight of the main goals, and the outcome is no where near, what you intended to achieve.

With prototyping, we can actually find the problem in the first item, sooner, giving us time to either re-design or work around the problem, adding new features we overlooked, etc. With prototyping we avoid the problem in the second item because we are working towards a goal, with the aid of a sketch design, our goal is to make our prototype be a functional representation of what are design, or goal is, while at the same time confirming it’s viability.

Prototyping is a good proposition, given that you have enough time to do the prototype –you need to factor this in, when setting deadlines. It is also important to have a good grasp of the tools you are going to use to build the prototype, because the goal is to build it fast and as bug free as possible.

In my experience the best languages for prototyping are scripting languages. It does not matter what language you use, as long as you have a good grasp, this bear repeating, don’t do a prototype in a language you are just learning, do it with the tools you already know and comfortable with. There is nothing wrong in prototyping in a non-scripting language, as long as you can do it fast, and you know your way around it.

So to conclude, the benefits of prototyping a problem are:

  • A better outlook of the problems and their solutions.
  • You get to test the design, in a fast non-obtrusive way.
  • Helps in bringing the number of bugs down.
  • Helps making the code writing faster.
  • Gives you a demo to show the client.
  • Helps you see the big picture.

For a better more detailed explanation check out: Pragmatic Programming site.

Advertisements

About this entry