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.

Creative Commons LicenseThe Not procedural coding but spiking article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.

5 Responses to “Not procedural coding but spiking”


  1. 1 Intoxo Pox

    Thanks for upping my lexicon. I’d not previously heard of ’spiking’. Certainly fits the bill. Sadly, the girlfriend is no longer impressed by me flash doodles. Overkill. I blame myself.

    David Hamiter
    Intoxo Pox

  2. 2 keith peters

    Thanks for the mention of Brevity. Yes, I think that would be a perfect use of it.

  3. 3 Tom Lee

    I’ve also found procedural to be of some use when you have to squeeze every last drop of performance out of your script. OOP is sometimes touted as yielding better performance, but we sometimes forget that all those objects come with a little bit of overhead.

    When I started programming, the mantra was ‘test early, test often’. ‘Spiking’ sounds way cooler - I guess the more things change, the more they stay the same. :)

  4. 4 aral

    Hey David: Nice to make your acquaintance! (I searched on your site for your name but couldn’t find it — hence “the author”) :)
    Tom: Of course, spiking doesn’t in any way, shape, or form replace unit testing and test-first development. It’s just another part of the development process.

Leave a Reply






Bad Behavior has blocked 0 access attempts in the last 7 days.