So I've seen people asking about danger rooms, same as ever I suppose. A lot of people, both noob and those who don't really care about anything anymore, seem to find themselves wanting to use this at some time or another, and aren't sure how. Well, there's several ways, but there's one very easy way that I've grown to love.
╔═╗
║√║
╠╪╣
║^║
╚╪╝
ò
This is a 3x6 room, counting the lever, it's 3x5 with just walls. For those not familiar with ASCII, shame on you, but I'll lay it out anyways. That's a piece of wall forming 2 rooms, each 1x1 size, with the upper room housing a weapon rack, the lower room housing a trap, doors between them, and a lever on bottom. To make this work, you simply make the top-most door "internal" and "forbidden". An internal doorway means that room designations will pass through it, allowing a study room to have a parlor in the next room, or such. In this case, the room designation will pass through the door, allowing you to make a barracks that will be 3x1 (5x3 if you count the walls) BUT because the door is locked, there's only a 1x1 space that is usable, and that's the trap.
Because of this forcing of rooms, when the dwarf goes to train in the barracks, the dwarf can only stand on the trap, and will do so happily.
This is the basis of the danger room. It is made to stab a dwarf repeatedly in order to rank up skills. Of course, stabbing hurts, so armor help. A minimum of a robe or dress is required, as both of these pieces of clothing provide armor to the entire body, albeit not much. Anyone serious will agree though, that a dwarf needs a helmet, gauntlets, breastplate, mail shirt, greaves, and high/low boots. A breastplate actually does not protect the upper arms, so don't forget the mail shirt. So, now that your dwarf is armored, he steps into the stabbing pit, and gets stabbed. Probably. Chances are he's going to block it with his shield (you gave him one, right?) or parry with his weapon (axes, right?), or dodge it. And when a dwarf dodges, or parries, or blocks, he gains a little skill in those areas, training up the weapon skill, the dodge skill, and the shield-user skill. When a shot is blocked by armor, it gains the Armor User skill, which allows the dwarf to move faster while wearing heavy armor.
Now, the spikes are the important part. You want WOODEN TRAINING SPEARS. You do not want wooden menacing spikes or corkscrews. You want training spears. Some will say "you want featherwood" because it's light, but that doesn't matter. Training spears are so pathetic you can use bloodthorn and be safe (bloodthorn being the heaviest tree). So don't worry about the type of wood. The quality doesn't matter much at all, if any, don't worry about it. Just stock that trap with 10 training spears and attach it to the lever.
For those unfamiliar with traps, an upright spike trap can piston up, wait 100 ticks, piston down, wait 100 ticks, and repeat. This lets it stab once every 200 ticks. For those at 100 FPS, that's once every two seconds. Or, to compare, the average dwarf takes 10 steps in 100 ticks (actually 9.5 but aren't all your dwarves burdened by hauling stone anyways?). That means in the time it takes to walk 20 steps, a soldier has been stabbed 10 times. Walking from the bedroom to the stairway, stab, stairway to stockpile, stab, stockpile to stairway, stab, stairway to dining hall, stab, lengthy and noisy eating, stab stab stab. The stabbing is very fast and very numerous, and it trains up skills FAST. You will, literally, see legendary soldiers appearing with 3 days. A full season of danger room training will max out every stat.
And stats are important. Your danger room dwarves will be zipping around the map. Fighting (or pretending to fight) trains up all the good stats, like agility, strength, endurance, all that stuff. This means a danger room dwarf can be stripped naked and fight much better than the average dwarf, because they have insanely high attributes. Of course a naked dwarf is still a naked dwarf, so don't expect much, but do expect your super-agile dwarves to rush into battle like never before, and to mow down enemies like some type of drunken automated wheat harvester. A short, axe-wielding one.
You'll also probably notice your danger room dwarves being ecstatic. I believe that increasing a skill level causes happiness, and that piles up quickly. No one has yet tested if this can be used to avert a tantrum spiral.
So, in conclusion: if you have 3 stone, 10 wood, 6 copper, and some scrap building material, you can train a dwarf to super-legendary skill levels in a matter of moments. It is extremely exploit-heavy, but sometimes you need that boost. There's no shame in taking a little help when you're new, after all you don't have to tell anyone you did it, and sometimes the ‼Science‼ demands expendable legendary soldiers...
Now go kill some elves goblins elves.