Imagine this
you’re hurtling through space. The ship’s alarm wakes you up from deep freeze. Now you’re being told that unless you resolve the trajectory calculation error, your death — and the death of those asleep onboard — is imminent. All you need to do is reset the nav computer and recalculate. One major problem… you don’t speak binary.
But your droid does!
Yes, I’m making that leap. ChatGPT is a droid. In fact, it’s a protocol droid — fluent in over ten million forms of communication. It can speak binary, hexadecimal, German, Zylorian, emoji, and more.
Typically, we interface with computers through a drag-and-drop experience or a keyboard and code terminal. And this makes sense for our visual brains. But we are also verbal creatures. Now with ChatGPT, you can speak your wishes into the droid, and it will translate them into perfect — well, almost perfect — functional code.
Want a simple webpage that prompts a user for their name and translates it into a set of emojis? Ask!
Want a terminal script to split a long piece of code into chunks? Ask!
Need to style your button to look like a piece of bubble gum? Ask!
Computer, enhance.
A few weeks ago, I was testing a Chrome extension which, yes… I was having GPT write for me (check out the Paste Buddy story here). While debugging in Chrome’s inspector, I came across a confusing JavaScript file. I couldn’t understand what the code was doing. It was purposefully unreadable. The variables were all single letters; functions droned on for hundreds of lines, and the code referred to itself in ways that made it seem like it was trying to throw off a trailing bloodhound.
This interested me.
One snippet in particular, near the bottom of the code, caught my attention.
Oh boy. What the heck was this?
Did I have something sniffing the password for my Salesforce account?
Looking further into the code, I found similar snippets seeking login credentials for Netflix, Amazon, Linkedin, etc.
…computer, what the fuck?
So, I hailed my protocol droid.
“GPT, what the heck is this code doing?”
Hmm, it seems like this code is looking for elements related to your
Salesforce password. It appears to be part of a larger body of code.
Please provide more context.
Sure, makes sense. I only gave you a snippet of code. Let me foolishly paste the full 30k line document into your chat interface.
The message you submitted was too long, please reload the
conversation and submit something shorter.
Surprise, surprise, the prompt was way too big. Back to the drawing board.
If my droid was going to learn what this code was doing, it would have to read the code in smaller chunks.
Pasting wouldn’t work because I could easily lose my place and risk giving the AI incomplete info. So, I planned to slice the file into consumable pieces, store them on my machine, and feed them to the droid one bite at a time.
Now, I don’t speak Mac terminal, so I asked my protocol droid to translate for me.
“GPT, please give me a bash script that will break this file.js into pieces of <1500 lines.”
Coming right up, Reed!
Voila! A folder containing dozens of bite-sized chunks materialized on my desktop.
And with that, I started to feed the beast.
Soon, the machine was giving me a chunk-by-chunk analysis of the code. It was naming the functions and variables and understanding how they fit together. It sensed a larger body of code at play and that each chunk of code it received was one additional brush stroke defining a bigger picture.
It wasn’t long before my protocol droid had read the entire file. Now, we could speak casually about the various features and functions in the code it had read.
Reading glasses on, tea in hand, blanket over lap, we started chatting about the code like it was our book clubs’ monthly read.
“What does x do?”
“How is y working?”
“Should I be worried about this?”
“What kind of obfuscation is used here?”
“Can you show me an example of how I could obfuscate code myself?”
At the end of the conversation, I was satisfied that I wasn’t being actively hacked. As it turned out, the scary obscure variables I saw earlier were part of the LastPass app. And during our chat, I learned a few new techniques — form phishing, humanization, obfuscation, etc. It’s nice to have a droid. I suggest you get one of your own.
This new interface lets you converse with computers like never before.
Over the last few months, I’ve personally used this tool to automate data creation and generate test components for my product demos. It has helped me build a few Chrome extensions that make me more efficient in my day-to-day. With its help, I’ve built Slack bots for some of our internal scale programs. And, over Christmas, it helped me turn my Roomba into a Nerf battle bot.
I would love to know what you will do now that the door is open.
GPT-4; Human-Cyborg Relations was originally published in Better Programming on Medium, where people are continuing the conversation by highlighting and responding to this story.