Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail From: ram@zedat.fu-berlin.de (Stefan Ram) Newsgroups: comp.os.linux.misc Subject: Re: AI-Based Coding Taking Over Date: 1 Oct 2025 17:21:55 GMT Organization: Stefan Ram Lines: 29 Expires: 1 Jun 2026 11:59:58 GMT Message-ID: References: <10bhmfu$3vti3$5@dont-email.me> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de ZG4FNqeRySCNpCWYdbVkNgYoB0V+NH6WzAtd1bXWgw1kzJ Cancel-Lock: sha1:R/0tzp/S/yKoo5csOL+TqAwrG6s= sha256:2TMq3LseOs+8u/gy0f4uZ2vrB0qTmG5gcOkS+2Lhcu4= X-Copyright: (C) Copyright 2025 Stefan Ram. All rights reserved. Distribution through any means other than regular usenet channels is forbidden. It is forbidden to publish this article in the Web, to change URIs of this article into links, and to transfer the body without this notice, but quotations of parts in other Usenet posts are allowed. X-No-Archive: Yes Archive: no X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some services to mirror the article in the web. But the article may be kept on a Usenet archive server with only NNTP access. X-No-Html: yes Content-Language: en Xref: csiph.com comp.os.linux.misc:75545 Richard Kettlewell wrote or quoted: >ram@zedat.fu-berlin.de (Stefan Ram) writes: >> if (scanf("%259s", srcFile) != 1) { >> fprintf(stderr, "Failed to read source file name.\n"); >> return EXIT_FAILURE; >> } >Mishandles filesnames with spaces in, or longer than the weird and >arbitrary 259-character limit. After I brought this up with the chatbot, it gave me a new version [1]. That just shows, a coding chatbot really needs someone over its shoulder who goes through the code, points out the flaws, and keeps pressing on them until the code actually is written the way it should. And that overseer has to actually know his stuff. So yeah, human experts are still necessary . . . [1] if (fgets(srcFile, sizeof(srcFile), stdin) == NULL) { fprintf(stderr, "Failed to read source file name.\n"); return EXIT_FAILURE; } // Remove trailing newline if present size_t len = strlen(srcFile); if (len > 0 && srcFile[len - 1] == '\n') { srcFile[len - 1] = '\0'; }