RetroFed Forum
Your home away from modern life.
Was this just a production quirk, or was Sam actually writing a stargate virus in C#?
Post Reply
AuthorMessage
SatyrSack quokk.au SatyrSack@quokk.au
Joined: 2025-08-25
Quote

Stargate SG-1 S7E9 "Avenger 2.0"

https://www.gateworld.net/sg1/s7/avenger-2-0/

In this episode, Dr. Felger comes up with a virus that is able to remotely disable stargates. After it doesn't go as planned, Sam comes in to help and we see this montage that involves writing code on a whiteboard.

I thought it was sort of silly how she wasn't just brainstorming pseudocode here, which is generally the type of thing that I see coders doing with whiteboards. No, that seems to be a full verbose script, written character-for-character. But as I looked closer, it got worse. That language seems to be C#. If we take this situation as literal as possible, that must mean the SGC had come up with some .NET-like middleware framework sort of thing for interacting with the stargate. I would imagine that there were better languages that they could have used instead.

53   Original
Artwork lemmy.world artwork@lemmy.world
Joined: 2025-12-03
#2 · (edited) Quote Reply

Wonderful day!

Thank you for being so observant and cautious!

This reminded me of the when I paused the 6th episode of season 4 of Stranger Things, when I noticed C#-like and modern HTML/CSS/JS syntax on the screen, where CSS "flexbox" was implemented in 2009 only, yet the film events are in ~1980.

Previews
21
Neverclear lemmy.dbzer0.com Neverclear@lemmy.dbzer0.com
Joined: 2025-01-18
#3 · Quote Reply

C# irritates my IBS, but those semicolons are brilliant!

3
SatyrSack quokk.au SatyrSack@quokk.au
Joined: 2025-08-25
#4 · Quote Reply

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.

4
Diplomjodler lemmy.world Diplomjodler3@lemmy.world
Joined: 2024-01-08
#5 · Quote Reply

Where else would you write your code?

5
slazer2au lemmy.world slazer2au@lemmy.world
Joined: 2023-06-30
#6 · (edited) Quote Reply

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.

10
scops reddthat.com scops@reddthat.com
Joined: 2023-07-13
#7 · Quote Reply

As someone who started college comp sci courses around the time this episode aired, be glad it wasn't written in Java

17
SatyrSack quokk.au SatyrSack@quokk.au
Joined: 2025-08-25
#8 · Quote Reply

Where else would you write your code?

In a computer?! There's daemons there!

5
SatyrSack quokk.au SatyrSack@quokk.au
Joined: 2025-08-25
#9 · (edited) Quote Reply

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")  
7
slazer2au lemmy.world slazer2au@lemmy.world
Joined: 2023-06-30
#10 · Quote Reply

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 emb...

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.

4
SatyrSack quokk.au SatyrSack@quokk.au
Joined: 2025-08-25
#11 · Quote Reply

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.

I singled out python because snake.

Quick Goa'uld-ified Python logo:

K9Ap94TpMomDxWP.webp

8
Nomecks lemmy.ca Nomecks@lemmy.ca
Joined: 2023-12-27
#12 · Quote Reply

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.

10
mindbleach sh.itjust.works mindbleach@sh.itjust.works
Joined: 2023-08-27
#13 · Quote Reply

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.

And not even three-letter agencies could talk them out of mandating Apps Hungarian.

1
mindbleach sh.itjust.works mindbleach@sh.itjust.works
Joined: 2023-08-27
#14 · Quote Reply

Wonderful day! Thank you for being so observant and cautious! This reminded me of the when I paused the 6th episode of season 4 of Stranger Things, when I noticed C#-like and modern HTML/CSS/JS syntax on the screen, where CSS "flexbox" was implemented in 2009 only, yet the film events are in ~1980. ::: spoiler Previews :::

That's just embarrassing, given that even laymen should expect 30 GOTO 10. If they're using an Amiga emulator there had to be some Forth or TCL files included.

5
DonkeyStar lemmy.world DonkeyStar@lemmy.world
Joined: 2026-07-23
#15 · Quote Reply

As someone who started college comp sci courses around the time this episode aired, be glad it wasn't written in Java

I also chose C# and Java, and I told anyone who would listen that C# is beautiful and friendly and intuitive, while Java hates you, your family, and everyone that you’ve ever met. But Java gets you a job-a.

3
Post Reply
Back to top