At Starfleet Academy, Jim Kirk cheated on the Kobayashi Maru test by hacking the test and inserting code that he wrote enabling him to win in the otherwise unwinnable scenario.

So when did Kirk learn to write code? How old was he when he learned? Where? Are there any references to names of programming languages?

  • 7
    How do we know he wrote code? Or that Starfleet doesn't use symbolic coding that is being used, already, in some situations? He may have hired someone to do this for him. There just isn't enough here to prove he actually wrote any code.
    – Tango
    Commented Aug 5, 2015 at 7:17
  • Related question here Commented Aug 5, 2015 at 7:37
  • 1
    Possible dup of Where else do we see James T. Kirk, computer hacker extraordinnaire?
    – Mr Lister
    Commented Aug 5, 2015 at 13:44
  • 2
    With the advent of the Raspberry Pi and similar approachable embedded computers, children are starting to learn code at a very young age. I would think in 200 to 300 years learning to code will be as fundamental as learning to read and write or do basic mathematics.
    – Etzeitet
    Commented Aug 5, 2015 at 18:20
  • 2
    @Etzeitet, I don't think so because once you have Star Trek-level AI, only extreme experts need to code anymore. Everyone else just asks the computer to do stuff in plain language and it knows what you want. Commented Oct 17, 2015 at 3:08

2 Answers 2


He probably learned to program at Starfleet Academy

Note, nowhere that I can find indicates that Kirk actually wrote code per-se, only that he reprogrammed the situation.

In the Alternate Reality (2009 reboot), and probably in the prime reality, Kirk was

a top-performing Academy student


In fact:

According to his dossier at the official Star Trek movie website, as a Starfleet Academy cadet, Kirk was top of his class in survival strategies and tactical analysis and the assistant instructor in advanced hand-to-hand combat.


I pay close attention to the 'tactical analysis' part - now surely in an age when computers are so important such as the 23rd century, the need to understand how a computer works, or at least know some programming, would be pretty important in tactical situations.

Out of canon, TOS - Starfleet Academy novel: The Gemini Agent

During the Academy's "dead week" in May, Kirk experienced a mysterious illness which left him with a six-hour gap in his memory. He was charged with fifteen violations of the Cadet Honor Code and became a suspect in a bizarre computerized attack on Cadet Pavel Chekov.

The excerpt I've emphasised indicates to me that, if Kirk was a suspect, it was probably well known that he knew how to program a computer.

Also, consider how computers are interacted with in TOS; it seems to be mainly based on voice-commands. We also see that programming doesn't really involve a 'language' per-se, at least that is what is indicated from The Menagerie when Spock 'reprograms' the computer:

Spock 'reprograms' the computer'

So, Kirk probably needed some more skills than just talking to the computer to reprogram it in the Kobayashi Maru, but considering his education at Starfleet where learning how to survive is a fairly important skill considering the various situations you could find yourself in, there was probably a standard course in at least computer programming, although probably not 'programming' in the way we would understand it today!


Programming is probably either much simpler or much more complex in the 23rd Century. However, I have a little experience in modding code, and once you find certain values in the program it's pretty simple to change them to higher or lower numbers. He could've found something like "klingondamage=2000" in the computer files, for example, and altered it to "klingondamage=1". If he had somehow gotten editing privileges for those files, it's that simple.

Of course, programming could use a different system altogether in the future, but based on some personal experience this is how I would alter the Kobayashi Maru scenario.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.