Viewing By Entry / Main
July 20, 2006
Catching up with podcasts, I was listening to Helms and Peters Out Loud (episode 26, "Groupthink") tonight on the way home and in amongst Hal's ranting about everyone following the herd, a real nugget stood out...

I'd never thought of blogging it before because, well, I just assumed everyone did this...

Jeff Peters said he has a "test" directory in his local development environmnt that he uses to test... no, not code... hypotheses, ideas, concepts. He was talking about how everyone should do this and be able to go "Hmm, I wonder what would happen if I did X?" and actually trying it out (instead of perhaps just asking a mailing list).

Since he highlighted this, I figured that maybe not everyone actually does do this and therefore it's worth mentioning.

Seriously, create a "test" or "scratch" directory in your local development environment. Any time you find yourself wondering "what would happen if...?" or "can I do Y?" or "how does framework Z behave if I do this?", just write some code and try it out! Before you post to a mailing list, before you just simply give up because you "don't know the answer". Just. Try. It!

You'll be amazed: you'll find out the answer on your own and you'll be able to post to a mailing list and tell other people what you learned.

I'm not going to pick on anyone by name but I will say this post is actually inspired by a recent raft of posts on some mailing lists asking questions - and often sending somewhat irate follow-up posts a few hours later because no one responded - when a five minute test would have answered the question.

As a community we need to stop being so lazy. If you don't know how something works, don't just fire off a lame question to a mailing list! Those hundreds of other folks are busy with real work too - they're not there to do your job for you! Try it out for yourself. If it works, post the question and the answer. If it doesn't work, then post the question - along with all the details about what you've tried that didn't work.

I really (really!) don't like seeing follow up posts complaining that no one has answered a post when a simple bit of personal detective work could have answered the question in far less time that was spent waiting for an answer.

Comments

I've been doing that for a while, I've got a test environment set up to hit my test databases so I can't do any *real* damage if I mistype a query :-) It has worked great the few times I've needed to smack something around with a hammer.

Damien


Some people have noticed that in (almost) every Eclipse workspace I have, there's a ZZZTemp project (named such so I can just drop to the bottom of the list and get to it quickly). Everything I create in there is volatile, and can be trashed at any time.


For everyone using cfeclipse, you should check out the "scribble pad". It's an invaluable tool that accomplishes this perfectly. Just set up a project named "scribble" that contains one file (generally named scribble.cfm), make sure this is something accessible from your web root. Then when you are working in eclipse, hit F8 and the scribble file is automatically opened and a browser is directed to the file in a panel within your workspace. Couldn't get easier than this. No more excuses for not having a scratch pad.


I second this post,

I've always had a 'test' directory - and more often than not, projects I have released (Transfer being the big one) came out of vague ideas that I started playing with in there.

I don't now how I could actually physically work without a test directory, to tell you the truth.

Good post.


Where I work, we go one step further, we have an entire site called "playarea" where we can essentially do what you want... and boy, is mine a mess.


Funny you mention simple questions on mailing lists, and don't forget other place like Experts Exchange. Ussually when there is one of those questions I find/test the asnwer in my *tada* my test project in eclipse. Scribble Pad baby....awesome!


AMEN!!!

What I have done is create a folder in my {drive}:\inetpub\ appropriately named skunkworks. I then create a virtual mapping in the root for every website in my development environment pointing to that same folder and allow directory browsing in it. In Eclipse I create a project also named the same that is always open and available for writing these test scripts. This gives me a central repository for these scripts regardless which project I'm working on.

Great Post!


The test directory is one of the best learning tools I have. I always try and figure things out myself because that way I'll remember it and probably learn some other stuff along the way.

It's so helpful to isolate a problem into it's most basic form in order to understand why something isn't working in a more complex system.

I also try and file away some of the more useful test files for future reference or starting points.


I couldn't agree more. But remember to post the results of your tests to you blog, so the lazy developers can easily find it. ;-)


Jeff has another, related idea that I like a lot: he uses DevNotes for his test directory, so that he can easily make notes about his experiments without cluttering up his code. You can download my DevNotes code at Jeff's site: www.grokfusebox.com and look under "Grok's Goodies".


Along with a test folder, I have a file named test.cfm and a bookmark to it in Firefox on my toolbar. This makes it easy to quickly write something and alt-tab to Firefox to run it.


Post Your Comments
Name:
Email Address:
Comments
*** Please note that all comments require moderation so it may be some time before your comment posts to this blog! ***
Remember My Information:
 



Hosting provided by