What is a better word for 'code' when taking about programming code?
It depends what you want to refer to. For instance, if you were to implement an array sort in Java, you could refer to: 


the sorting algorithm, as Paul mentioned, which could be described in pseudocode, and is independent from the language you used (note that it could be more readable to include within your thesis only the pseudocode of your algorithms, and then attach the actual code at the end, or provide it in a different file). 
the program, which is the binary executable that takes an array as input and returns the sorted array. 
the implementation, which refers to the way you defined the sorting algorithm in Java. 
the data structures you manipulate, such as the array. 
the source code, as Anonymous Mathematician mentions, which is the textual representation of your implementation (note that if you include the file at the end, then you can also refer to it with "the Java file", or "the file sort.java"; in this case, you can even include line numbers, which can be helpful to point to a specific part of your source code).