Use it or lose it—that's true for not only your muscles but also your brain. One fun way to exercise your brain is to work on puzzles. I find that logic puzzles and lateral thinking puzzles can help keep those areas of the brain you use for scripting sharp because to write scripts you have to think logically and occasionally think out of the box.

If you go to a bookstore, you'll find many puzzle magazines and books on the shelves. However, you can find them on the Internet as well. Below is a take of one of my favorites, which I found on the MindBreakers Web site. So, the next time you have a few spare minutes, read it and see whether you can come up with the solution. (Note that this isn't a trick puzzle.)

You're standing in front of a room that contains a lamp inside it. You can't see whether the lamp's incandescent light bulb is on or off. On the wall in front of you, there are three standard light switches—the kind that look something like those in Figure 1. You can flip the switches anyway you want to.

You stop flipping the switches, enter the room, and know which switch controls the light bulb. How did you figure it out?

Stop reading here if you don't want to see the answer yet.

Here's the solution: You turn two switches on and one switch off, then wait a few minutes. Just before entering the room, you turn one switch from on to off. After you're in the room, you put your hand near the light bulb. Here's how to tell which switch controls the light bulb:

  • If the light bulb is warm but off, it has to be the switch you just turned off before entering the room.
  • If the light bulb is cold and off, it has to be the switch that was already off.
  • If the light bulb is on, it has to be the switch that is turned on.

Besides the MindBreakers Web site, another puzzle Web site you might want to check out is Puzzles.com. This site has a downloadable .pdf file containing 12 logic problems. If you have any favorite logic or lateral thinking puzzles you'd like to share with fellow scripters, email me or post them in the General Discussion forum on the Scripting Pro VIP Forum Web site.