|
|
Log in / Subscribe / Register

I may be an AI

I may be an AI

Posted Jan 4, 2025 1:04 UTC (Sat) by SLi (subscriber, #53131)
Parent article: Some things to expect in 2025

> A major project will discover that it has merged a lot of AI-generated code, a fact that may become evident when it becomes clear that the alleged author does not actually understand what the code does. We depend on our developers to contribute their own work and to stand behind it; large language models cannot do that. A project that discovers such code in its repository may face the unpleasant prospect of reverting significant changes.

I'll have to remember to check if I'm an AI next time I don't understand what code I have written does.

It happens enough, and I'm not convinced my best guess after staring at it is necessarily fundamentally that different from an AI's guess at what a piece of code does (well, I think I still do a slightly better job there than the AIs, but then I like to remind people that generalist LLMs are very new technology).


to post comments

I may be an AI

Posted Jan 5, 2025 18:40 UTC (Sun) by NYKevin (subscriber, #129325) [Link]

I distinctly remember writing some code for a system, that was designed to do X, to make it do Y instead of X. It was long and ugly and involved multiple nested loops. It had incredibly poor performance, taking over a minute to do something that ought to finish in seconds.

One day, I had an epiphany, and restructured it so that the loops were nested differently and we iterated in a different overall order. This literally cut the execution time in half. Subsequently, I was entirely unable to explain how I saved that much performance with such a trivial refactor. It was in Python, with lots of indirection and hash map lookups, so no, this was not a simple case of cache locality. I think it probably involved early returns and avoiding some redundant iterations, but it was a long time ago and I do not remember the details.

The story has a happy ending: We decided to go back to doing X (instead of Y), so the code was deleted, everything went back to reasonable performance, and nobody has to try and understand it anymore. Y was a dumb idea in the first place, and we really only did it as a stopgap as part of a tech migration, so we're probably not going to try and do it again.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds