The reason I get so annoyed about people pitching LLMs as a way to 'democratise programming' or as end-user programming tools is that they solve the wrong problem.

The hard part of programming is not writing code. It's unambiguously expressing your problem and desired solution. Imagine if LLMs were perfect programmers. All you have to do is write a requirements document and they turn it into a working program. Amazing, right? Well, not if you've ever seen what most people write in a requirements document or seen the output when a team of good programmers works from a requirements document.

The most popular end-user programming language in the world (and, by extension, the most popular programming language), with over a billion users, is the Calc language that is embedded in Excel. It is not popular because it's a good language. Calc is a terrible programming language by pretty much any metric. It's popular because Excel (which is also a terrible spreadsheet, but that's a different rant) is basically a visual debugger and a reactive programming environment. Every temporary value in an Excel program is inspectable and it's trivial to write additional debug expressions that are automatically updated when the values that they're observing change.

Much as I detest it as a spreadsheet, Excel is probably the best debugger that I have ever used, including Lisp and Smalltalk.

The thing that makes end-user programming easy in Excel is not that it's easy to write code, it's that it's easy to see what the code is doing and understand why it's doing the wrong thing. If you replace this with an LLM that generates Python, and the Python program is wrong, how does a normal non-Python-programming human debug it? They try asking the LLM, but it doesn't actually understand the Python so it will often send them down odd rabbit holes. In contrast, every intermediate step in an Excel / Calc program is visible. Every single intermediate value is introspectable. Adding extra sanity checks (such as 'does money leaving the account equal the money paid to suppliers?') is trivial.

If you want to democratise programming, build better debuggers, don't build tools that rapidly generate code that's hard to debug.

@david_chisnall What would a visual debugger look like for, say, Python?

Same as excel?

Some sort of infographic/flowchart generator?

@androcat Python is basically Smalltalk with ugly syntax and better FFI, so a starting point would be something like a Smalltalk debugger: everything is inspectable, you can create inspector windows for any object and directly manipulate it. Oh, and the code in Smalltalk (and Excel) is just a pile of objects (cells) and so you can dynamically modify any of it while the program runs.

Some of the more interesting work I've seen on debuggers for this kind of environment works by realising that reactive programming and watchpoints are basically the same concept: run some code when some variable changes. This lets you write arbitrary code in the language being debugged that runs when a particular variable changes (including things referenced by complex path expressions, so you can express things like 'starting from this root node of a tree, run this code any time a leaf node changes'. That lets you build live inspectors of program state and arbitrary traces for later inspection (and for turning into breaks on the next run).

@david_chisnall @androcat Did you ever see LightTable?
http://lighttable.com/
It was a visual (but not in the ordinary sense) programming environment. Take a look at the 'in action' video in the link above.
Every variable, every statement inspectable.
Light Table

Light Table is the next generation code editor. Light Table Connects you to your creation with instant feedback and showing data values flow through your code.

@sleepyfox @androcat Yes, it looked very much like an offshoot of the STEPS project from VPRI (of which I am a huge fan). I think the project is dead, which makes me sad.
@david_chisnall @androcat LightTable died years ago, the author Chris Granger went on to join (ironically) a no-code startup called Eve (which went bust four years later in 2018).
Even more ironically they went through multiple iterations of #NoCode or #LowCode products until they finally ended up with a text-based literate programming environment.
https://futureofcoding.org/essays/eve/
A Visual History of Eve

Are you looking for the real computer revolution? Join the club! Future of Coding is a podcast and community of toolmakers, researchers, and creators working together to reimagine computing.

Future of Coding