As someone who started college comp sci courses around the time this episode aired, be glad it wasn't written in Java
post
The US airforce runs the Stargate program don't they? It would make sense for them to use some middleware to align with the rest of the bureaucracy. Microsoft probably won the "Acivate the Stargate" request for proposal.
Can be written in python and they will just cross compile it to embedded dhd code.
Would be funny if they did it in python.
Python would be totally believable. Whether they were to:
- use Python just for their whiteboard pseudocode brainstorming and then later rewrite that Python in some lower-level language when actually typing the code into the computer
- use some custom middleware framework that allows them to literally code in Python, but then, like you say, automatically cross-compiles that Python into whatever embedded ancient programming language that the gate actually uses
Either of those would make more sense than using C# anywhere like they are clearly doing here.
EDIT:
import stargate
import time
gate = stargate.gate("username", "password")
if gate.is_connected():
print("Gate connected")
gate.iris.open()
time.sleep(1)
if gate.iris.is_open():
print("Iris open")
gate.dial(1, 2, 3, 4, 5, 6)
time.sleep(1)
if gate.is_wormhole_established():
print("Wormhole established")
print("00:00:00.000000", end="\r")
time_start = time.perf_counter()
while gate.is_wormhole_established():
time.sleep(0.1)
time_now = time.perf_counter() -time_start
print(f"{time_now:%H:%M:%S.%f}", end="\r")
gate.iris.close()
time.sleep(1)
if not gate.iris.is_open():
print("Iris closed")
print("Program complete")
else:
print("ERROR: Could not close iris")
else:
print("ERROR: Could not establish wormhole")
else:
print("ERROR: Could not open iris")
else:
print("ERROR: Could not establish connection to gate")
It could also be the earth gate program is written in c# so they prototype on the digital twin in area 51 to see how it goes.
I singled out python because snake.
Where else would you write your code?
C# irritates my IBS, but those semicolons are brilliant!
That is probably the most egregious thing about this. Any time someone is brainstorming code on a whiteboard, semicolons are the first thing to go. You can add them when it comes time to type the code into the computer, but they're superfluous for brainstorming.

all 12 comments