softbootsurfer Posted January 11, 2023 Report Share Posted January 11, 2023 this is a rather large step in the progression... https://www.science.org/content/article/ai-learns-write-computer-code-stunning-advance?utm_campaign=SciMag&utm_source=Facebook&utm_medium=ownedSocial&fbclid=IwAR0_LAsIUduKuKgQSeWuiYtczMKV0nccyMsNtE2qDgnluU9UkMpXUQXwUDw Quote Link to comment Share on other sites More sharing options...
crote123 Posted January 12, 2023 Report Share Posted January 12, 2023 "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 Quote Link to comment Share on other sites More sharing options...
philw Posted January 12, 2023 Report Share Posted January 12, 2023 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. Quote Link to comment Share on other sites More sharing options...
fluxgame Posted January 12, 2023 Report Share Posted January 12, 2023 We started using GitHub Copilot at work recently. Pretty amazing how useful it is already. Quote Link to comment Share on other sites More sharing options...
crote123 Posted January 12, 2023 Report Share Posted January 12, 2023 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 Quote Link to comment Share on other sites More sharing options...
Neil Gendzwill Posted January 12, 2023 Report Share Posted January 12, 2023 10 hours ago, crote123 said: That'll be useful as the most common comment in code is something like // Do stuff Good code has hardly any comments at all. 2 Quote Link to comment Share on other sites More sharing options...
philw Posted January 12, 2023 Report Share Posted January 12, 2023 1 hour ago, Neil Gendzwill said: Good code has hardly any comments at all. As bad coders will tell you all the time. Definitely unnecessary comments are a bad thing. Quote Link to comment Share on other sites More sharing options...
Neil Gendzwill Posted January 12, 2023 Report Share Posted January 12, 2023 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. 2 Quote Link to comment Share on other sites More sharing options...
Jack M Posted January 12, 2023 Report Share Posted January 12, 2023 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. Quote Link to comment Share on other sites More sharing options...
pow4ever Posted January 12, 2023 Report Share Posted January 12, 2023 related topic: for i welcome our robotic overlord as it need a reboot once in a while lol.... 2 Quote Link to comment Share on other sites More sharing options...
Odd Job Posted January 14, 2023 Report Share Posted January 14, 2023 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. 1 Quote Link to comment Share on other sites More sharing options...
st_lupo Posted January 14, 2023 Report Share Posted January 14, 2023 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 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.