Email or username:

Password:

Forgot your password?
Top-level
publius

@mhoye

Without disagreeing with you, I wonder whether it's possible (without true Artificial Intelligence) to consistently provide really useful error message, given the immense flexibility and power of even the simplest of programming languages (and the immense variety of ways a programmer can screw up).

Documentation, on the other hand, suffers from having been written from the perspective of the people creating the program, not the people using it. I don't know how to fix that, either.

13 comments
Dana Fried

@publius @mhoye if you use your own thing, and you hire or work with people who are not as familiar with the thing as you are, or you just occasionally read the top Stack Overflow questions about your thing, it becomes fairly obvious where the documentation and/or error messages need to be improved.

"For experts by experts" isn't a way to make software for anyone but yourself.

mhoye

@tess @publius yeah, the big winners from this AI in everything push aren’t going to be the people getting the answers, it’s going to be the people hoarding the questions.

LisPi

@tess @publius @mhoye That certainly does seem like a decent heuristic in absence of bug reports or contributions to the documentation.

wakame

@lispi314 @tess @publius @mhoye

A little more complicated, more a thought experiment:

Every time a compiler (anywhere in the world) stumbles and falls over a line, log that somewhere centrally.

If compiling succeeds later, log also if and how the offending line has been changed.

Then, combine the most common(?) or most unsimilar looking(hello Levenshtein) lines and solutions and show some of them to the user (in case a compile fails).

For a project, it might also be helpful if e.g. a common method is invoked with false parameters a lot, since this could hint at inconsistencies or missing documentation.

@lispi314 @tess @publius @mhoye

A little more complicated, more a thought experiment:

Every time a compiler (anywhere in the world) stumbles and falls over a line, log that somewhere centrally.

If compiling succeeds later, log also if and how the offending line has been changed.

Then, combine the most common(?) or most unsimilar looking(hello Levenshtein) lines and solutions and show some of them to the user (in case a compile fails).

LisPi

@wakame @tess @publius @mhoye That sounds like a very dangerous experiment with significant privacy issues.

In highly expressive and/or dynamic languages, it could also be of very limited use.

(But then such dynamic languages usually also have dynamic checks that can tell you *why* the type of something is wrong.)

wakame

@lispi314 @tess @publius @mhoye

That's why I introduced it as a thought experiment.

From a usability (or generally practical) perspective:

Of course expressive error messages are (likely) the best solution. With common, handwritten examples perhaps.

And if your interpreter/compiler understands what you are writing, that is always a plus.

But generally it feels as if especially software development is kind of resistant to invent and introduce new tools to make our work easier.

(This post is in danger to walking into "better UI development tools" territory, so I better stop writing now. :blobcatgiggle:​)

@lispi314 @tess @publius @mhoye

That's why I introduced it as a thought experiment.

From a usability (or generally practical) perspective:

Of course expressive error messages are (likely) the best solution. With common, handwritten examples perhaps.

And if your interpreter/compiler understands what you are writing, that is always a plus.

LisPi

@wakame @tess @publius @mhoye Anything too reminiscent of Lisp (Machines) causes fear and rejection in its detractors, which is a significant part of what I blame for the resistance.

wakame replied to LisPi

@lispi314 @tess @publius @mhoye

That makes a lot of sense.
Even if I don't understand what all the resistance is about.

MSavoritias

@publius @mhoye

The thing is though that rust has fixed that problem. And it is a language pitched as an alternative to C++ so it very complex. Also python is doing a lot of work to solve and it is another complex language.

The thing is the tech community hasn't bothered to write good errors or documentation in the majority of projects. Because if we make it too easy the wrong people will get in. (Actual argument i have heard), or they are so out of touch with people actually using computers that they think the error is obvious (?!). (Usually for gatekeeping and superiority complexes).

My point is AI cant fix the reason we don't have good errors or docs. Because the reasons are social. We could have good errors or docs without it.

@publius @mhoye

The thing is though that rust has fixed that problem. And it is a language pitched as an alternative to C++ so it very complex. Also python is doing a lot of work to solve and it is another complex language.

The thing is the tech community hasn't bothered to write good errors or documentation in the majority of projects. Because if we make it too easy the wrong people will get in. (Actual argument i have heard), or they are so out of touch with people actually using computers that...

publius

@msavoritias @mhoye

"Rust has fixed that problem" ― in what way, and for whom?

As someone who very occasionally writes computer programs when needed to solve a problem (I wrote a very useful one in Motorola 68000 assembly, that time), I've seen a lot of discussion about Rust, none of which seemed to address that question.

Also I've seen suggestions that it's often necessary to call some kind of "foreign function interface", in which case, why not program in the target language instead?

mhoye

@publius @msavoritias

The Foreign Function Interface situation is best understood, I think - thank you, @Gankra ! - by reading this: gankra.github.io/blah/c-isnt-a

... but more generally Rust gives you a set of guardrails that obviate entire classes of sometimes sec-critical errors, and the error messages they give you during the development process are just generally wildy more helpful and humane than you see in most other languages.

MSavoritias

@mhoye @publius @Gankra

Yeah pretty much. Rust has managed to give better error results without AI or whatever.
Because people actually had the culture to do it.
So the question is can the culture be changed in other languages too so it favors understanding and newbies instead of esoteric knowledge?

Go Up