Sandboxes and Great Ideas

I wonder what would happen if I did this instead of what I’m doing now?

Sometimes, when you’re coding, you’ll have an idea–a good idea. But, instead of taking the risk to implement it in the middle of what you’re doing you think to yourself, "I don’t have time to try that now . . . plus . . . I might lose what I’m in the middle of."

Of course, you can backup files and take a stab at the idea. But often times, that will require ripping out a bunch of code or shoe horning things in. Or, even worse, it might take a while to stage an environment so that you can test the idea. So, instead you just toss the idea out.

But it doesn’t have to be that way.

First of all, if you have a good idea but you’re pretty sure you can’t do anything about it, then stop and at least comment about it. It doesn’t take long and at least the idea is written down for future efforts.

However, if you’re not that constrained but don’t want to jeopardize your current environment, then just crank up a new app and play a little. Give yourself permission to do that.

I can’t tell you how many times I’ve been been walking by a cube and someone asked me, "Hey! What happens if I want to do x." My response is always, "I don’t know (even if I do). Let’s open up a new app and play a second." It gives the developer asking the question permission to play. Plus, I always end up learning something or brushing off some cobwebs. Also, it helps me to make sure someone on my team isn’t about to do something crazy.

I almost always create play apps (I even have a folder for them) as console apps. They are easy to make and most of the time I’m just trying to work out something quick and small. This "sandbox" approach is really good for working things out. You don’t have to worry about harming your existing application at all. Also, you can always refer back to the play app later if you want to extend the idea in a risk free environment or shoot it off in an email to a coworker playing around with a similar idea. I like to think of them as "sketches".

If you’re working on a large application in a very complicated area, it can take a while to get to the point in your code where you’re exploring options. Having a little application on the side that just cuts to the chase can make your work go a lot faster and will definitely move you closer to the 10 in McConnell’s 10x Software Development site.

Let’s say I’m working up a new display format for dates for one specific page in a web site that takes 5 or 6 pages to get to every time I want to test it out. It’s better for me to play in my sandbox until I get the format right and then port that deep into the application rather than working through my 5 or 6 pages on each pass. This kind of thinking is what gets you closer to the 1 in 10.

Essentially, you shouldn’t worry about wasting time so much when working in a sandbox. Exploring is part of development–even if you don’t use the code. You’ve learned something. Maybe your idea works. Maybe it doesn’t. In the end, you and your company are better for it I believe.

So, get dirty and makes some mud pies in your sandbox!