2

Just found an interesting bit of AI for developers:

https://beta.openai.com/codex-javas...

Tell it to create something...

Comments
  • 4
    /* count to nine */

    var count = 0;

    while (count < 10) {

    var countDiv = document.createElement('div');

    countDiv.innerHTML = count;

    document.body.appendChild(countDiv);

    count++;

    }

    We won't lose our jobs soon, at least.
  • 1
    I call BS for OpenAI to replace developers jobs. I put this instruction in to find if a number is prime or not and this is the solution that the AI generated.

    function isPrime(n) {

    if (n <= 1) {

    return false;

    }

    for (var i = 2; i < n; i++) {

    if (n % i == 0) {

    return false;

    }

    }

    return true;

    }

    It is correct "technically" but not a solution that devs would go for.
  • 2
    @Sid2006 it's a long way off replacing developers. But the possiblities for simple coding on-the-fly is interesting.

    /* Create an array of users called "users . Add 10 names to the "users". */

    /* Create and array of items called "items". Add 20 items to the "items". */

    /* Allow items to be linked to a user. */

    /* an item can only be linked to one user at any time */

    /* show a list of users, and their items */

    /* create a form with a dropdown of users, and a dropdown of items. Create a "link" button which assigns the selected item to the selected user. */

    /* update userList output every 2 seconds */

    ...it understood all of this:

    https://jsfiddle.net/z9so7fqa/
  • 1
    yeah exactly. But it kinda pisses me off when non-devs start saying - "Oh AI will replace devs in the future."
  • 2
    @Sid2006 Yeah. Same with artists. the AI Bros went full "We no longer need artists, you will all be replaced" when stable diffusion came out...

    AI Bros really are just normies with below average IQ and 0 experience
Add Comment