We report in this paper the simultaneous employment of two different coding techniques called Walsh code and Golay code for modulating the pump light of Brillouin optical time domain analysis (BOTDA) fiber optic sensor. In this technique, the elements of Walsh code are nested within each element of Golay code and vice versa. The technique also modulates the pump with the non-return-to-zero (NRZ) and return-to-zero (RZ) formats for the inner and outer codes, respectively. Experimental findings have revealed that the proposed coding technique contributed to higher signal-to-noise improvement ratio (SNIR), compared to that of using only one kind of code; we obtained the maximum optical SNIR of about 6 dB. We have also successfully demonstrated 10 cm of high spatial resolution measurement with the use of 1 ns of coded pulse duration.