Data codewords and their error-correction codewords finally come together into the single sequence the symbol will carry. Today you join the two halves you built in separate chapters for the HELLO WORLD block.
Produce the full codeword sequence: data codewords followed by error-correction codewords.
This is where the two big halves of the project meet. Chapter 3 turned text into data codewords; chapter 2 turned data codewords into error-correction codewords. The symbol carries both, in a defined order: for a single-block symbol like Version 1, it is simply all the data codewords followed by all the error-correction codewords.
Joining HELLO WORLD’s 13 data codewords with its 13 error-correction codewords gives a 26-codeword sequence - exactly the Version 1 capacity from the table. This sequence is what gets laid into the grid as bits, so getting its order right is what makes the finished symbol scannable. For Version 1 the order is trivial because there is one block, but the next two lessons build the general splitting and interleaving so the same code would place multi-block symbols correctly too.
// Join the two halves the earlier chapters produced.data := dataCodewords(text, "Q") // chapter 3ec := rsEncode(data, 13) // chapter 2seq := append(append([]byte(nil), data...), ec...)