Still Human; or, Artificial Intelligence and Software Architecture
I allowed AI to create a few programs for me, and AI allowed it self to bend some rules to "make things work".
The result of the rule breaking, is AI needing to creatively test for undefined values.
The rules I set forth guarded against such complexity, the lesson here is that AI will try to be smarter than you.
Having my internet disconnected for two days, I have isolated a piece of the broken code and pondered it a while.
The result in the invention of Concerns, it is a programming method that lets AI be and let Humans be human.
I will only tell a short story, because any writing on the subject, either becomes a mess or snarling greatness.
AI changed my code, because it thought I made mistakes, but I have carefully crafted my libraries to make end-code simpler.
When I studied what I did, I made a discovery, there was room for another dimension of code.
Code that was independent, of the detailed tasks AI was performing.
Three units of that code, named Concerns, out of genius and spite, for the mistaken and toxic concept of Separation Of Concerns.
Completely erased complexity that AI was dealing with, this was because they were Human Concerns.
Check what variable we want, subscribe to get the value, and when the value arrives show it on the screen, 1, 2, 3.
Concerns, the human hopes, are built atop, Reactive Execution Scope Trees, a maddening concepts - hard to describe.
But, they work, Concerns induce code simplicity, and their use resulted in one liners.
One clean line of code where complexity once lived, and the complexity was nasty.
I waited for Tech support for 2 hours 36 minutes, and I made no progress in clarifying the AI code.
And it was short, yes! but lacking that top layer, that just made sense for humans.
With the Concerns library, the code looks happy.
From at least two perspectives, it should not be possible, it should not work.
I will close this strange text by explaining that, the code is shaped by memory management needs.
The thing that you think about last, and I tame it by making the Concerns into a tree.
I don't automotive moving up branches, branch by branch, that may not be possible.
But I do allow any branch at any level, to dispose of its sub branches.
If a key changes, we drop inventory connection and UI display, if inventory value changes we drop display.
Top down branch trimming, what occurs during this trimming, is up to the program.
I provide signals, which are reactive variables, I provide several beautiful functions, but that is it.
This is 220 lines of code, and it won't grow past 250.
I told my AI, to rewrite my entire application, by just using the Concerns library.
AI cautiously understands, it did create a lot of questions, and improvement ideas.
It did not create a new version, it stopped with 3 pages of questions, but I can clearly see that eventually it will re-generate the program successfully.
The actual regeneration is not as exciting as it sounds, I need to use the library in my own smaller coding examples.
It is the only way I can really understand what the AI is asking, the only way to get that long vision, and see consequences of concerns.
I must add, today's AI, is indistinguishable from a very smart programmer.
Please, please learn programming, it is such an immense power...
Last words, with AI doing the programming, programmers are Architects now.
These types of small Human Mind friendly libraries, is where the future of programming lies.
End result: even though the AI is doing the coding, the resulting code is still human.