How do you go about designing a games engine, coz surely you need the game to test it. But you need the games engine to be able to make the game. Is it a viscious circle or am I confussing myself?

Also are there any good books around on designing game engines(preferably c++)

Cheers
Nick