When defending a seige against ladders. I always wait until the enemy have 1 man up on the wall and then order my men to attack. It ensures they will never get enough men on the wall to mount a good attack. I've had units fight off hundreds of invaders and only take a couple of casualties using this method.