News for hackers. Stuff that matters.
Re:Declarative Programming with AI/LLMs by nyrikki on Sunday September 15, 2024 @01:05PM (#41548699)
The Ironic part being that the COBOL in that example is completely wrong and non-functional.

Note:

    WS-MENU-ITEM(1) OF WS-LABEL

When the syntax, which is similar to natural language is:

    elementary-var IN|OF group-var

It is a good example if you want to prove to people that they are a bad idea.

I prefer to use these tools as a form of red/green/refactor workflow, where I don't use them in the refactor step or the test case step.

Re:Declarative Programming with AI/LLMs by hmottestad on Sunday September 15, 2024 @02:22PM (#41549268)
Another thing they are generally good at is writing Javadocs and comments. GPT-4 manages to return my code, intact, complete with Javadocs for all the methods I ask it for.
Re:Declarative Programming with AI/LLMs by jiggawatts on Sunday September 15, 2024 @06:05PM (#41550837)
I’m picturing the docs it would generate for the code I see at government agencies written by $500/month outsourcers.

“This function processes logins using a complex and unclear logic. Exceptions are not thrown and instead most failures are represent using a success code that sets the current logged in user to either null or a user object with a null or empty string as the name.”

Re:Declarative Programming with AI/LLMs by hmottestad on Monday September 16, 2024 @07:20AM (#41554904)
Thankfully my code is a bit simpler than that :P

Here is an example:

  /**
  * Switches the current timeout settings to use the SPARQL-specific timeouts. 
  * This method should be called when making SPARQL SERVICE calls to apply 
  * shorter timeout values.
  *
  * <p>
  * The SPARQL-specific timeouts are shorter to ensure that unresponsive or slow 
  * SPARQL endpoints do not cause long delays in federated query processing. 
  * Quick detection of such issues improves the responsiveness and reliability
  * of SPARQL queries.
  * </p>
  */
  public void setDefaultSparqlServiceTimeouts() {...