Sketch, Refine, Erase, Repeat

April 13, 2007
development, rails

I enjoy drawing and painting in my spare time (which seems to come up about twice a year now). I'm no Picasso in any sense, and the thought of drawing something exactly as I want the first time I set pencil to paper is out of the question for me.

Ever since I was a young boy, I have begun every drawing by sketching many light lines to outline my subject. During this process, I try to shut down the critical part of my mind and simply commit a rough interpretation of the subject I have in mind to paper as quickly as possible. If I become too critical during this phase, I'm likely to lose the original spark that I wanted to capture in the first place.

After I've committed this rough mess to paper, I can usually figure out if there's any hope at all for it. Sometimes I realize that the drawing is going nowhere, and into the recycle bin it goes. However, more often than not, I will see something, and perhaps just one thing, that I like and will set to work salvaging it. I begin to sketch over it with slightly darker lines, emphasizing what I like and leaving what I don't in the faint lines originally drawn. Inevitably, the eraser comes out when I can no longer ignore the lines I don't like. This usually works out since the light, noncommittal lines are easiest to erase.

I repeat this process of sketching, refining and erasing iteratively until I'm able to produce something halfway decent on a good day. I find that the end result of this process is always slightly different, and definitely more refined, than the spark of an idea that started the drawing in the first place. Of course, no amount of refinement can salvage an idea that was bad from the start, but hopefully I'm able to nip those bad ideas in the bud before I waste much time on them.

Code, Refine, Delete, Repeat

I've come to realize that I use a similar iterative process every time I need a creative solution to a problem. Since most software development (enjoyable software development, that is) calls for creative solutions to interesting problems, it often takes quite a few trips around this design spiral to reach a finished product. Furthermore, a successful product is never "finished", especially where web development is concerned, so it's pretty important to enjoy those trips.

I've used quite a few web development technologies in my career already. Scripting frameworks, such as ASP, PHP and JSP, have always felt too unstructured, and therefore make it difficult to build anything with a foundation of much complexity. On the other hand, Java-based frameworks, such as Struts and JavaServer Faces, provide a solid foundation for complex applications. However, this foundation is so heavy that every walk around the design spiral feels like a forced march through quicksand.

Early last year I discovered Ruby on Rails and finally found a language and web framework with enough structure to build a solid foundation for complex web applications, yet with enough agility to make refining those apps a joy instead of a chore.

The Ruby language is remarkably expressive yet concise. It's been said that it works with you instead of against you. It is because of Ruby that the initial spark of an idea can flow into an application so quickly and easily. It's also because of the flexibility of Ruby that a framework like Rails even exists.

Rails provides the cleanest separation of model, view and controller I've seen in any web framework. This clean separation of roles within an application means that there is little, if any, repetition of code. This lack of repitition means that refinements can be made to an application by working just at the level (or levels) that needs refinement.

When I'm working in Ruby on Rails, I feel like I'm sketching with well sharpened pencils on quality paper, with a good eraser by my side. I'm able to rough out my idea very quickly to see if it has merit. If not, the application can be tossed without too much grief, because a minimal amount of effort was expended initially. If things are working out, I'm able to refine what I like and delete what I don't, building up the same application from prototype to production with the tightest design spirals I've ever experienced developing software.

The only downside is that whenever I need to return to using other technologies, I feel like I'm forced to sketch using my trackball in MS Paint.