answer:His code was basically a human moral code. He believed it immoral to kill other sentient beings for any reason and tried to avoid doing so as much as possible. He was raised by humans to “do the right thing”. Since the Superman character is extremely moral, he would only kill if there was no possibility for the person to redeem themselves (or to change their evil ways). This is the basis for his humanity. Looking beyond the character though, and going into the history a bit, the reasons for the identity shift mostly have to do with the medium in which Superman was available to audiences. Superman was originally a rough and hardened crime fighter who killed many. Not until Superman had a radio show in the 1940’s, did his character change quite a bit. The radio medium made him available to a wider range of people, including children. In the mid 1940’s, Whitney Ellsworth (the editor of the show) created a sort of code of conduct for Superman. He was prohibited to kill other humans. It almost seems like the character of Superman changes with each new medium. So, to answer your question… it really depends on what medium, era and world Superman is in on any given event in his story.