Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > comp.os.linux.misc > #75571
| From | ram@zedat.fu-berlin.de (Stefan Ram) |
|---|---|
| Newsgroups | comp.os.linux.misc |
| Subject | Re: AI-Based Coding Taking Over |
| Date | 2025-10-01 22:33 +0000 |
| Organization | Stefan Ram |
| Message-ID | <chatbot-20251001232917@ram.dialup.fu-berlin.de> (permalink) |
| References | (3 earlier) <10bhmfu$3vti3$5@dont-email.me> <supervisor-20250930235728@ram.dialup.fu-berlin.de> <wwv3482h7ij.fsf@LkoBDZeT.terraraq.uk> <code-20251001182123@ram.dialup.fu-berlin.de> <10bk54h$k61q$2@dont-email.me> |
Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> wrote or quoted: >... another chatbot? ... or the same chatbot. I tried out a little experiment: First prompt, Please write a C program to copy a file on Linux. . I got some code. Then I started a /new session/ and told /the same chatbot/ to check this code. He came up with: |This program is a simple file copy utility in C. It mostly |works fine, but a few issues, edge cases, and improvements can |be made for safety, clarity, and robustness. | |Potential Bugs and Deficiencies | |Error handling on fread: | |The loop checks only fread > 0. If fread returns 0 but not due |to EOF (like from a read error), it won't handle the error. |Currently, it won't issue an error if something goes wrong |mid-read. | |Overwriting existing files without warning: | |The destination file is always created/truncated. This could |lead to accidental data loss. No confirmation is requested |when overwriting. | |No handling of partial writes properly: | |fwrite could, in rare cases, write fewer bytes than requested |without returning an error immediately. The code checks if |fwrite wrote all intended bytes, but it exits on error instead |of attempting to complete the write. | |File closing errors not handled: | |fclose can fail (e.g., if flushing buffers to disk fails). |The program ignores that possibility. | |No binary/text distinction in stdout: | |On success, it prints a success message, which is fine, but |not necessarily desired when being used as part of a script |(extra output pollutes workflow). | |Lack of large file handling considerations: | |fread/fwrite with size_t is fine, but extremely large files |(over 2GB/4GB) might be problematic on systems with 32-bit |size_t. . So now, from this list, one can choose what one wants to address further or ask the chatbot again if it finds even more potiential issues . . .
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar
AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-09-30 00:12 -0400
Re: AI-Based Coding Taking Over "Carlos E.R." <robin_listas@es.invalid> - 2025-09-30 09:37 +0200
Re: AI-Based Coding Taking Over ram@zedat.fu-berlin.de (Stefan Ram) - 2025-09-30 14:25 +0000
Re: AI-Based Coding Taking Over ram@zedat.fu-berlin.de (Stefan Ram) - 2025-09-30 14:32 +0000
Re: AI-Based Coding Taking Over "Carlos E.R." <robin_listas@es.invalid> - 2025-09-30 19:21 +0200
Re: AI-Based Coding Taking Over Richard Kettlewell <invalid@invalid.invalid> - 2025-09-30 19:35 +0100
Re: AI-Based Coding Taking Over Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-09-30 22:45 +0000
Re: AI-Based Coding Taking Over Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-09-30 22:41 +0000
Re: AI-Based Coding Taking Over Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-09-30 22:44 +0000
Re: AI-Based Coding Taking Over ram@zedat.fu-berlin.de (Stefan Ram) - 2025-09-30 23:05 +0000
Re: AI-Based Coding Taking Over Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-09-30 23:46 +0000
Re: AI-Based Coding Taking Over ram@zedat.fu-berlin.de (Stefan Ram) - 2025-10-01 00:10 +0000
Re: AI-Based Coding Taking Over ram@zedat.fu-berlin.de (Stefan Ram) - 2025-10-01 00:56 +0000
Re: AI-Based Coding Taking Over Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-01 01:06 +0000
Re: AI-Based Coding Taking Over Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-01 01:05 +0000
Re: AI-Based Coding Taking Over Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2025-10-01 03:53 +0000
Re: AI-Based Coding Taking Over Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-01 04:57 +0000
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-10-01 21:41 -0400
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-10-01 21:40 -0400
Re: AI-Based Coding Taking Over candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> - 2025-10-10 18:00 +0000
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-10-11 02:41 -0400
Re: AI-Based Coding Taking Over The Natural Philosopher <tnp@invalid.invalid> - 2025-10-11 11:00 +0100
Re: AI-Based Coding Taking Over Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-11 19:39 +0000
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-10-11 22:31 -0400
Re: AI-Based Coding Taking Over The Natural Philosopher <tnp@invalid.invalid> - 2025-10-12 12:09 +0100
Re: AI-Based Coding Taking Over rbowman <bowman@montana.com> - 2025-10-11 19:03 +0000
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-10-11 22:28 -0400
Re: AI-Based Coding Taking Over The Natural Philosopher <tnp@invalid.invalid> - 2025-10-12 12:04 +0100
Re: AI-Based Coding Taking Over rbowman <bowman@montana.com> - 2025-10-12 19:40 +0000
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-10-13 03:24 -0400
Re: AI-Based Coding Taking Over The Natural Philosopher <tnp@invalid.invalid> - 2025-10-13 10:19 +0100
Re: AI-Based Coding Taking Over Richard Kettlewell <invalid@invalid.invalid> - 2025-10-01 18:11 +0100
Re: AI-Based Coding Taking Over ram@zedat.fu-berlin.de (Stefan Ram) - 2025-10-01 17:21 +0000
Re: AI-Based Coding Taking Over Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-01 21:06 +0000
Re: AI-Based Coding Taking Over ram@zedat.fu-berlin.de (Stefan Ram) - 2025-10-01 21:28 +0000
Re: AI-Based Coding Taking Over Richard Kettlewell <invalid@invalid.invalid> - 2025-10-03 08:54 +0100
Re: AI-Based Coding Taking Over The Natural Philosopher <tnp@invalid.invalid> - 2025-10-03 10:02 +0100
Re: AI-Based Coding Taking Over Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-03 20:41 +0000
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-10-03 23:24 -0400
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-10-03 23:21 -0400
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-10-03 23:20 -0400
Re: AI-Based Coding Taking Over Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2025-10-04 17:04 +0000
Re: AI-Based Coding Taking Over ram@zedat.fu-berlin.de (Stefan Ram) - 2025-10-01 22:33 +0000
Re: AI-Based Coding Taking Over Nuno Silva <nunojsilva@invalid.invalid> - 2025-10-01 23:45 +0100
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-10-01 22:19 -0400
Re: AI-Based Coding Taking Over The Natural Philosopher <tnp@invalid.invalid> - 2025-10-02 11:15 +0100
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-10-01 21:59 -0400
Re: AI-Based Coding Taking Over vallor <vallor@vallor.earth> - 2025-10-02 06:20 +0000
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-10-02 03:05 -0400
Re: AI-Based Coding Taking Over vallor <vallor@vallor.earth> - 2025-10-02 18:41 +0000
Re: AI-Based Coding Taking Over rbowman <bowman@montana.com> - 2025-10-02 07:26 +0000
Re: AI-Based Coding Taking Over vallor <vallor@vallor.earth> - 2025-10-02 18:37 +0000
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-10-03 00:29 -0400
Re: AI-Based Coding Taking Over rbowman <bowman@montana.com> - 2025-10-03 05:06 +0000
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-10-03 01:24 -0400
Re: AI-Based Coding Taking Over Bob Vloon <usenet@bananacorp.nl.invalid> - 2025-10-03 11:33 +0000
Re: AI-Based Coding Taking Over Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-03 20:46 +0000
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-10-03 00:25 -0400
Re: AI-Based Coding Taking Over rbowman <bowman@montana.com> - 2025-10-03 04:44 +0000
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-10-03 01:18 -0400
Re: AI-Based Coding Taking Over ram@zedat.fu-berlin.de (Stefan Ram) - 2025-10-03 11:38 +0000
Re: AI-Based Coding Taking Over Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-03 20:42 +0000
Re: AI-Based Coding Taking Over ram@zedat.fu-berlin.de (Stefan Ram) - 2025-10-03 20:59 +0000
Re: AI-Based Coding Taking Over Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-03 21:05 +0000
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-10-03 23:37 -0400
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-10-03 23:35 -0400
Re: AI-Based Coding Taking Over not@telling.you.invalid (Computer Nerd Kev) - 2025-10-03 08:03 +1000
Re: AI-Based Coding Taking Over vallor <vallor@vallor.earth> - 2025-10-02 22:55 +0000
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-09-30 22:06 -0400
Re: AI-Based Coding Taking Over Jason H <jason_hindle@yahoo.com> - 2025-10-01 20:26 +0000
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-10-01 21:58 -0400
Re: AI-Based Coding Taking Over Farley Flud <fsquared@fsquared.linux> - 2025-09-30 11:25 +0000
Re: AI-Based Coding Taking Over The Natural Philosopher <tnp@invalid.invalid> - 2025-09-30 12:56 +0100
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-09-30 22:48 -0400
Re: AI-Based Coding Taking Over Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2025-10-01 03:53 +0000
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-10-01 21:36 -0400
Re: AI-Based Coding Taking Over c186282 <c186282@nnada.net> - 2025-09-30 22:16 -0400
csiph-web