I WAS 6 and having a fine time in the carnival funhouse -- until my counsin Roger, 14, and full of the devel, stuck my hand into the Shock Box. These tiny torture chambers are illegal now, I presume, but then you could pay a penny and learn what a live wire feels like.

It was a painful object lesson. (But it was not, my father made sure, the only one my cousin learned that night.) Electricity is something you accord respect. It can hurt.

It hurt again a few years ago when we collected estimates for having our house rewired. I quickly recalculated the costs and the risks. My decision saved us $4,000 -- about 5 7/8 of the lowest estimate.

Lots of homeowners are learning that they, too, can do electrical work and live to tell the story. They don't need a union card or four years apprenticeship. Nor is a dash of derring-do important. A cautious, patient nature is the modus operandi.

Not that all even-tempered folks should do their own wiring. You must own and live in the house you want to work on. It must be a single-family dwelling. You must get permission, pay a nominal permit fee, and your work must pass inspection. Remember it's the mandate of our city fathers to protect the do-it-yourself's neighbors as well as the do-it-yourselfer. A little mistake in your wiring is of much wider consequence than, say, a door hung not quite plumb.

Whether or not you're given permission depends not just on whether you know how to do what you want to do, but on where you live. If you live anywhere but in the District, permission is as broad as you are brave. You can wire your whole house if you have the time and don't mind the mess.

Other jurisdictions' officials are slightly bemused by the District's policy of discouraging homeowners. Most area officials point with pride to their local safety records and, implicitly, to their own apartment ability to weed out the accident-prone during the permit-and-inspection process.

"As long as we see a good track record -- and good safe jobs -- there's no reason to deny homeowners permission," claims Martin Harp, Alexandria's chief electrial inspector. "Most folks who get a permit perform well; they're just very slow about finishing their work."

Alexandrians who lollygag more than a year have to retake the test required for a permit. The one-year limit applies in most other jurisdictions, too, but only Montgomery County and Alexandria require tests. Montgomery County, which, just began the exam system, has three. Applicants take whichever one fits the job they have in mind.

Neither Alexandria's nor Montgomery County's tests are difficult. They are paper-and-pencil, perhaps less unnerving than the interview system used in Prince George's and Anne Arundel counties. There you must show a drawing of what you plan to do and answer any question the examiner happens to ask. You may be asked to demonstrate your ability by wiring a sample box. A few wrong answers to complicated questions do not mean automatic failure. They mean free advice. But if you don't know how to ground a wire, you should be cleaning your garage or polishing the silver. Anything but wiring.

Fairfax County has the easiest requirement of all: You simply state on your application what you plan to do and ante up your $16 permit fee. All jurisdictions' fees are roughly comparable, with a small -- but extra -- charge based on how big a job you plan to do.

And how do you know what you plan to do? Do not consult your encyclopedia, which undoubtedly will show Benjamin Franklin blithely flying his kite in a thunderstorm.

Buy yourself a few good books. One should be Time-Life's "Basic Wiring" (under $10), with simple-to-follow instructions and illustrations. (A fat bonus should go to the editor who insisted this book show wires in color.) Another should be Time-Life's "Advanced Wiring." Same price, same quality, more complicated situations. Spend another couple of dollars on the booklet "Wiring Simplified," available at Sears and a few other places. Another book that's well illustrated is "Electrical Repairs Made Easy" ($3.98 at bookstores) by the editors of Consumer Guide.

Buy -- don't borrow -- these books. You'll consult them constantly. Other books are good. These are the best. And they're your only extra expense besides $50 or so for a handful of special tools "Basic Wiring" will describe.

The Time-Life books will teach you what you need to know to do the work. The booklet will get you your permit. Neither will teach you these tricks of the trade:

Make all your purchases at the same shop. Make friends with the counter clerks.Often as not, they're also the owners and can give you a discount. Explain that you'll be wiring your own house. Ask to set up an account. Buy as much as you can at one time -- preferably on your first visit. Try to maintain that impossible equilibrium between the ignorant, inquisitive shopper and the arrogant do-it-yourselfer. Keep your eyes open for the rare rip-off or (more frequent) mistake, but remember this is not your turf. Practice consumer warfare elsewhere.

Hands-on learning is, of course, the best kind, but most of us aren't lucky enough to have either an electrician friend who'll let us tag along or a spare house we can practice on. Better than either is a course offered through Fairfax County's adult-education program (call 323-7555). The classroom is set up as a house awaiting wiring. Each weekly two-hour lecture is followed by two hours practice with all kinds of electrical paraphernalia.

Attentive students can, by the end of the 15-week course, take a set of architect's plans and make a wiring diagram for the whole house, including all outlets, appliances, ciruits and switches. They'll know what material is needed and how much. They'll know the jargon to use with the shop clerks and how to tell the wrong goods from the right ones. They'll avoid mistakes common to self-taught-do-it-yourselfers: not leaving enough cable (wire) in the box, not tightening wire nuts enough, using a too-small box for a four-way switch.

The course is worthwhile even if the students never do anything but hook up a few appliances around the house. These students won't burn down their house by pairing their 35-amp clothes drier with a 30-amp cord, nor will they burn the dryer's motor to crisp by overprotecting the house with a 50-amp cord. These are hazards frequently spotted too late -- in the work of Saturday-morning electricians who assume that anybody can do a chore that doesn't specifically require a permit. Their assumptions and mistakes are an expensive and sometimes dangerous reminder that a little knowledge can be a dangerous thing.

A homeowner's permit doesn't mean you'll have the answers for each contingency. Even electricians, who must serve four years as an apprentice and another four as a journeyman, have to have their work inspected. Most of these pros are still as leery of the do-it-yourself homeowner as the homeowner is of the pro.

District residents, unfortunately, are limited to merely "extending a circuit." This is what you do when your favorite reading chair is three-entension-cords-removed from the closest outlet for your lamp. Presumably, you won't abandon your chair at sundown or make do with a flashlight or snake the cords through the maze of table legs, piano stools and potted plants. You'll put an inconspicious outlet in the wall behind your chair.

That box, the plate that covers it, the wires you run to it, and the outlet itself will cost you roughly $10. (Paint and plaster replacement are extra.) Prices may be higher at your neighborhood hardware store. They'll be a tad lower -- for you, even with a discount -- where your electrician shops, at an electricial-supply shop. (For your electrician, they'll be drastically lower there -- by half, maybe.)

Remember this, wherever you live, when you get a $70 estimate for a single box. You're paying for that pro's visit (and his wearying years of apprenticeship). The estimate would be lower if you were getting several boxes. But so would your own costs. Not only would your per-box cost for materials drop, so would your permit fee. You pay the city $5 whether you wire one of 10 boxes for outlets, $2 whether you wire one or 10 boxes for lights. It might be worth the trouble to take the time to do it yourself if you are willing to take the time and effort to learn how to do it properly, legally and safely. If you aren't -- call the electrician.