I had an assignment for a security class where I did just this. We each had to write code to print the contents of a file with 600 permissions upon entry of the correct password. The source code, password file, and any logs were all readable by everyone; the next project was to obtain the contents of other students' secret files (using John the Ripper, exploiting race conditions, etc.). So I replaced all my identifiers with the most distracting words I could think of - superman, flashbang, lassie, sparkles, etc. If I recall correctly, only one person in the class even tried looking for vulnerabilities in my code.