I love to tinker with the latest new development toys, so when OpenAI announced their Codex beta recently, I jumped to sign up. To understand what this is, imagine you took a twelve year old and made them read all of the code in the world. This twelve year old has a great memory and can generally remember it all and regurgitate it back to you when you ask. You train the twelve year old by giving them a cookie every time they give you the right code for your question. You do this millions of times, and eventually, the twelve year old can shoot back pretty decent code much of the time, even if they don't totally understand what's going on. This is Codex.
There is some irony to me here. When I, as a twelve year old, first learned Amiga BASIC many moons ago, one of my first attempts at a program was one to take in English phrases and translate them to code. My goal: make it so that my little sister could program the Amiga. My program and my goals for my sister failed spectacularly, but I've since come to appreciate that my whole career is translating between English and Nerd, something that Codex is able to do with surprising accuracy.
To tinker with Codex, I wrote this simple game, just by telling it things like "draw a 20 pixel ball named player on the bottom of the page, 10 pixels from the bottom and 10 pixels from the left" and "if player hits the square, increase score by 1". I did have to correct it on a few things, but was also surprised by how well it understood the context of what I was asking. For example, when I told it "if player hits the square, increase score by 1", Codex understood that in the context of the previous code and wrote a working collision algorithm to using previously created variables and functions.
Of course, there's lots of hyperbole around this tech and AI in general. To be fair, some of it is well deserved. This AI has much more appearance of intelligence than anything I've seen, and there are ethical questions about using other people's hard-written code to train the AI without their explicit permission or consideration of licensing terms. Also, there are already demos of having it talk to various APIs, so it's not a stretch to imagine armies of automated twelve year old coders romping around cyberspace. It's not hard to imagine certain bits of it going off the rails when wired up to a stock trading API or weapons system.
That said, my first impressions are that Codex and tools like it will serve as really smart autocomplete or code snippets for the foreseeable future. Or, as an analogy for my less nerdy friends and family (sister included): like grammar check and spell check, but better. A tool that improves your writing, not one that replaces you. I hope.
No comments:
Post a Comment