In fault-tolerant quantum computing, we make a distinction between physical qubits and logical qubits.
The logical qubits are the ones we use in our algorithm. So if our input is a number stored in binary across $n$ qubits (as in Shor's algorithm), then these $n$ qubits are logical qubits. When we ask for a quantum Fourier transform on a collection of qubits, then these will also be logical qubits. We expect logical qubits and the operations we do on them to be completely error free, just as we do with the bits and operations in normal computers.
The physical qubits are the ones that actually exist, and they are noisy. These are what we use to make logical qubits, but it typically takes many physical qubits to make one logical qubit. This is because of the large redundancy needed to be able to detect and correct errors.
The design of the actual code run on physical qubits will happen in layers. A quantum error correction software engineer will design the logical qubits by writing the program needed to implement the quantum error correcting code. For each operation that someone might need in an algorithm, they will design an error correction compatible version, which performs the operation on the logical qubits in a way that allows its imperfections to be detected and corrected.
Then the programmer will come along and write their program. They won't need to think about physical qubits or error correction at all.
Finally, the compiler will combine everything to create the fault-tolerant version of the program to run on the physical qubits. This will look nothing like what was written by the programmer. It won't look like a constant alternation of things that the programmer wrote, followed by error correction things to clean it up. It will almost completely deal with just detecting and correcting the errors that constantly occur, with minor perturbations to implement the algorithm.
As a reference, I guess it is best to recommend something that explains how operations on logical qubits are implemented on physical qubits via an error correcting code. One of my own papers does this job, by explaining this for a variety of ways to get logical operations in the surface code. It also has references to many works by others in the same area.