I'm writing an online book right now, the advice to build your samples as you outline is really good. I've stumbled to that conclusion myself. Nothing like writing a series of samples to make you figure out what should or should not have been covered yet, and in what order you should introduce concepts (which for me is the hardest part of outlining).