Jump to content
Note to New Members ×

AI being asked to write CODE


softbootsurfer

Recommended Posts

"David Choi, another study author at DeepMind, imagines running the model in reverse: translating code into explanations of what it’s doing, which could benefit programmers trying to understand others’ code."

 

That'll be useful as the most common comment in code is something like

// Do stuff

🤣

 

 

Link to comment
Share on other sites

Yeah but...

I was just going to say that I'd rather they built something to generate test cases... when I spotted that you have to provide the test cases so it can filter out the bad solutions. That's logically the same as throwing a [natural language] specification at multiple offshore teams and screening what they come back with using your test cases. For sure ML could generate far more candidates... but it begs the question of who writes the test case.

To some extent it moves the problem from the code to the "test specification", even if it works.

Quote

// do stuff

Never had to sack anyone for that, but I would, on the spot. Perhaps a coding standard and everyday software engineering professionalism is probably cheaper than writing garbage, and then using ML to explain it? I mean: that's a problem which doesn't exist for competent engineers and managers.  

 

A significant advance nonetheless. I'd like some ML to run government, too.

Link to comment
Share on other sites

3 hours ago, philw said:

Yeah but...

I was just going to say that I'd rather they built something to generate test cases...

Agreed. 

 

3 hours ago, philw said:

Never had to sack anyone for that, but I would, on the spot. Perhaps a coding standard and everyday software engineering professionalism is probably cheaper than writing garbage, and then using ML to explain it? I mean: that's a problem which doesn't exist for competent engineers and managers.  à

I was being a bit facetious as often comments are sparse and often not that helpful.  But given the various constraints, AI/ML could possibly be helpful here.

 

I wonder what the FSF thinks of this.  Even if it is "new code", it's based on other code which may be GPL'ed (or other restrictive licensing) and that say, a specification is implemented using a novel alogirithm in that code that the AI/ML tool used in its training set.   The AI/ML tool looked at the code (not the specification) and may "rewrite" the code but in the same/similar way as that algorithm. It did not create a new work of the algorithm only from the specification, it created a derived work (just IMHO.  Not here to argue. Just raising a point).  You can see that with AI "art".  We've been (and still going) thru this with sampling music.

Mind you, I'm not too fond of the FSF having had to deal with them a long time ago (they wanted us to put out the work as GPL, we did not, we created our own license 🙂 which was fairly permissive but we retained the IP)

IP is a big can of worms.  Some lawyers will make a killing with this 😂

 

Link to comment
Share on other sites

2 minutes ago, philw said:

As bad coders will tell you all the time. Definitely unnecessary comments are a bad thing.

If you feel the need to add a comment, you should ask yourself whether that could better be addressed by better naming practices or refactoring your code into more understandable chunks. Comments are definitely necessary from time to time but the old school requirements of commenting the hell out of everything have been replaced by clean coding practices. 

  • Like 2
Link to comment
Share on other sites

In grad school in about 2005 my professor said how object oriented programming was supposed to help fix the programmer problem but instead it made it worse.  I asked, what's the programmer problem?  He said you know, the fact that you have to pay a human being to write code.  I was dumbstruck at the time, lol.

Link to comment
Share on other sites

On 1/12/2023 at 10:33 AM, Jack M said:

In grad school in about 2005 my professor said how object oriented programming was supposed to help fix the programmer problem but instead it made it worse.  I asked, what's the programmer problem?  He said you know, the fact that you have to pay a human being to write code.  I was dumbstruck at the time, lol.

My LeatherWallet class inherits through 20 layers of inheritance to a Cow class, which satisfies the Animal interface.

```

LeatherWallet lw;

visit_the_vet(lw);

 

void visit_the_vet(const Animal& a) { ... }

```

My LeatherWallet seems to be mal-nutritioned cause I don't like to carry cash.

  • Haha 1
Link to comment
Share on other sites

15 hours ago, Odd Job said:

My LeatherWallet class inherits through 20 layers of inheritance to a Cow class, which satisfies the Animal interface.

```

LeatherWallet lw;

visit_the_vet(lw);

 

void visit_the_vet(const Animal& a) { ... }

```

My LeatherWallet seems to be mal-nutritioned cause I don't like to carry cash.

Eww, semicolons!  Statements end at column 72, like God intended😈

  • Haha 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...