Superconductivity in nanostructures: Andreev billiards and Josephson junction qubits