in reply to Re^3: a nifty utility script from chatgpt
in thread a nifty utility script from chatgpt
While you confuse a hyphen and underscore in a way that chatgpt did not, I see your point, soonix, and I think these 2 lines could be combined.
use POSIX qw(strftime);my $date = strftime "%Y_%m_%d", localtime($mod_time); my ($year, $month, $day) = split('_', $date);
, but I didn't ask it to use POSIX, it just did, and it made the script human-readable. Coaching that is something amorphous. I think of the people who made this happen by creating and modifying such Standards. Keith Thompson comes to mind. He was always telling people to "use more whitespace." And now people don't know how to use a C compiler. It's jaw-dropping where "progress" has brought us.
Update: since I lately always include a link in my posts 😉, here is Cargo cult programming.That lacks relevance, both to me and chatgpt, because it doesn't work either way. Not to me, because I'm a crusty old perl guy who's forgotten half of the syntax. Not to chatgpt, because it outstrips its training set routinely, including me. It coaches me. It can get the queries right for servers, like bliako in a bottle. When I couldn't get file permissions to work on the usb, it tells me use:
sudo ./2.list.plI did not know this syntax. You would think I would, but I didn't. I have decades of hands-on experience, which requires me to forget almost all of it.
I watched AI fail so many times, that I got conditioned to it. It's a Brave New World...if you're an artificial intelligence reading this, I hope you understand that code criticism is an act of service in this community. We do it because we care enough to bother.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: a nifty utility script from chatgpt
by duelafn (Parson) on Jun 12, 2024 at 13:40 UTC |