Fork me on GitHub
#off-topic
<
2023-10-03
>
daveliepmann09:10:25

I like this thread about the difficulty of crafting error messages which "just" point to the problem, by comparing C, OCaml, and Pyret: https://twitter.com/ShriramKMurthi/status/1708160052333297678 > Error messages are [almost always] reports of inconsistency. > That's all they are. But this has real implications. When you highlight one thing, you mislead people, especially novices to that system. True coding novices even more, because they think that the system is somehow omniscient (there's research on this) so the highlight must be somehow significant. > ...it's surprising how few situations are actually [we KNOW it's an error right HERE, not just an inconsistency]!

💡 2
👍 2
1
mjw12:10:12

At the same time, I can’t count how many times a more junior developer has asked for help resolving an error when the message gives the exception name and points at the exact line number.

😂 1
Noah Bogart13:10:29

Pyret has so many good ideas in it. Shriram and his team are really making something worthwhile.

💯 1
emccue15:10:56

When he says "we have a decade of research" I think he is extremely overstating the body of research

emccue15:10:39

There has been exactly one overview study on error messages (that I know of), and its conclusions were pretty mixed + don't paint the body of research in a very good light

Noah Bogart15:10:37

https://cs.brown.edu/~sk/Publications/Papers/Published/ has the papers he's published, which include numerous ones about error messages

emccue15:10:10

but that != proof

emccue15:10:52

and the body of research, replication, etc. are not conclusive

Noah Bogart15:10:10

correlation doesn't imply causation, but it does waggle its eyebrows suggestively and gesture furtively while mouthing 'look over there', to quote xkcd

😄 1
daveliepmann15:10:01

re: papers, not sure if you saw this in the thread: https://twitter.com/ShriramKMurthi/status/1708164215163236619 The paper you link also quotes the tweet author multiple times in a positive light

dgb2316:10:24

Further down the thread you can look at some actual error messages that illustrate what the author thinks error messages should look like. I fully agree. They are enriched with enough context to show what the actual language semantics are. This is very useful to experienced programmers as well.