Artificial Intelligence is Able to Code Python

OpenAI created a language generator. They trained it on Github code. It used unsupervisored learning to learn to generate python code.

Software code generators have been around for over fifty years. It is unclear how capable and flexible the new deep learning code generators are and will become.

OpenAI previously created language generators to write new stories in the style of famous authors. Supposedly they write new chapters of the Lord of the Rings in the style of Tolkien

16 thoughts on “Artificial Intelligence is Able to Code Python”

  1. Why would it need to? It’s probably not even that hard of a problem to solve. There’s just no practical need to have a robot perform that task, so no one has put forth the resources to solve that problem.

  2. I think that this will be very hepfull to develop functions and procedures in very short time, avoiding the typing errors.

  3. I like where this is going. Though I’ll point out that there are different sorts of bugs.

    There are bugs that won’t run, or will keep crashing, and I think this approach might be good at scanning for this type.

    But the other bugs are worse. They run, but they don’t do what you actually want. Or even worse, they don’t always do what you actually want.

  4. The seasoned developer in this case would still need to have a 100% understanding of what the generated code is doing. That can take time, it would not be that much less time than if an experienced developer wrote it themselves. Add in time for tweaks and you could be back to square 1.

    This may well end up being more useful to business analysts who could enter some parameters, press a button and have code generated.
    But then they would have to spend quite a bit of time testing that the code does what they want it to do but just as importantly that it does not do something they don’t want ti to do. Exhaustive testing like this can be quite time consuming. Automated testing tools can help here though to an extent.

  5. I think the lowest hanging fruit is in test and verification. Normally, developers produce faults (bugs) at a rate of one per requirement if it’s a good project. It seems impossible to code correctly at first attempt. If the AI could assist in testing the code, there will be huge profits.
    Finding software faults also seems to be a good match for quantum computing. It’s fascinating to read the story with the Lockheed Martin F35 software bugs and D-wave. The fact this has already happened is eye-opening.

  6. This could become very effective as an AI assistant to a seasoned professional developer. If it gets you 90% there and you just have to do a few tweaks here and there to get it right then it could be a serious productivity booster.

  7. I recall seeing an AI programming system in college, in either 2000 or 2001: it was a Genetic Programming system, which wrote random abstract syntax trees and tried to evolve them into solving the target problem. It was an interesting exercise, but the code it generated was absolutely unmaintainable, since it was literally programming by coincidence.

    Full disclosure: I am a professional developer myself, so I am certainly not unbiased, but there seems to be a limited usefulness in automatically generated code that stems from it being a black box.

  8. I should imagine that logical computer programming languages would be simpler to get right that something much more subjective like creative written works of human language.

  9. AI/ML assisted decompilation/clean room reverse engineering of software would be good – plenty of old game engines could do with a spritzing up but lack any functional code release to work from.

    Perhaps ReactOS could actually produce a functional WinXP compatible release sometime this century using it…..

  10. I can verify that too, after programming for over two decades in Foxpro and dBase (I am dating myself, but the principles remain the same, regardless of the language). Clients make all kinds of exceptions without even knowing it, and until you try to CODEify the rules, it’s not even clear what they really are. Perhaps this means that making a rules-based economic system is not an entirely good idea either, though it may seem superficially more fair.

  11. From the state of some of my colleagues and the code they write, I can quite happily tell you already that artificial intelligence is writing python. Or at least randomly pressing buttons until something compiles anyway.

  12. Generating functional code is a useful skill, but the real problem is understanding what the customer wants the code to do and then producing code to match.

    And most human programmers have great trouble understanding what the customer wants, if only because the customer has trouble understanding it themselves.

  13. Generate code for what exactly? Writing in Tulkin’s style is also sweet, but has anybody ever read it to speak about how good it is?

Comments are closed.