Not procedural coding but spiking

Spikes aren't painful at all... in the software world!Intoxo Poxed has a post on procedural coding in AS3 in which the author states:

OOP is swell and all, but I feel procedural coding still has its place. This is particularly true when you’re not entirely sure what you’re about to make, or when you have a problem to which you haven’t yet worked out a full solution but are ready to stab at it one bite at a time.

The post goes on to give an example of a procedural bit of code that creates shapes with the Drawing API.

Although the author calls it "procedural coding", and although the example does contain procedural code, there is a better name for the process that the author is describing here. In eXtreme Programming (XP), we call it spiking.

Spiking refers to creating a throw-away experiment during development. Spiking is useful both at the very beginning of a project, where there may be technical issues that you are not sure exactly how to handle and throughout the lifetime of the project. It becomes especially useful as a project grows and where experimenting within the actual codebase becomes slow enough to be deemed impractical.

Even before I knew the term, I would always start a new FLA and do a quick test whenever there was something I wasn't sure of when developing a Flash application. Although I call them throwaways, I do keep these experiments in a separate folder and don't really throw them away. They can sometimes be useful to come back to later.

If you don't already do it, I highly recommend adding spiking to your development process. Just remember that the spikes are for you, not for the client or your boss or to impress your girlfriend with (OK, you may use them to impress your girlfriend but I wouldn't bet your whole strategy on it!)

Finally, on a related note, you should check out Keith Peters' Brevity as it is the perfect environment in which to spike out visual algorithms. If you haven't heard of it yet, Brevity is basically Processing for Flash.

Photo credit: Copyright sh0dan. Released under the Creative Commons Attribution License.

Comments