I have a JS/Python/Java background (side projects can be much lower level though such as C++ or x86-64 ;-) ). I'm currently learning Go from Learn Go With Tests [1]. And I sometimes make silly mistakes such as testAdder instead of TestAdder (lowercase t vs capital T). In that example I got back "testing: warning: no tests to run". I had to use a search engine to find out why. I don't find it a big deal, but I am simply wondering if there is a more efficient way to deal with this problem of understanding "cryptic" error messages when you're starting out in a new language.
So, might it be useful to have a site for programmers starting out in a new language that could give potential causes when a particular error message is displayed?
[1] https://quii.gitbook.io/learn-go-with-tests/go-fundamentals/...
1. a printer troubleshooting site where the only question is "What brand/model of printer do you have?" It suggests the most common problem, and most often it's the rignt answer.
2. Sorbet is a static type checker for Ruby that will make suggestions for typo's similar to your example. It also has an autocorrect option, but use with care because sometimes it will choose the closest but completely unrelated name.
3. Error messages that are/have clickable links, which take you to a site that has entries from people who got this error and what they found caused and if known fixed it.
(Each time Go or Replay is clicked, Inform tries to translate the source text into a working story, and updates this report.)
Problem. The sentence 'This is a book' appears to say two things are the same - I am reading 'This' and 'book' as two different things, and therefore it makes no sense to say that one is the other: it would be like saying that 'John is Paul'. It would be all right if the second thing were the name of a kind, perhaps with properties: for instance 'Abbey Road is a lighted room' says that something called Abbey Road exists and that it is a 'room', which is a kind I know about, combined with a property called 'lighted' which I also know about.
Because of this problem, the source could not be translated into a working game. (Correct the source text to remove the difficulty and click on Go once again.)
In practice, they can be very helpful and clear. But often they are too long, so I end up not reading them.
See this video for explainer and demo: https://www.youtube.com/watch?v=TmLnX7opisQ&t=678s
It's based on case-by-case analysis and recognizers for the most common mistakes: https://github.com/aroberge/friendly/blob/master/friendly/ru...
That being said if it could so easily be answered, then one might wonder why it the computer doesn't fix it for you? I would suggest that there is often sufficient ambiguity about what the programmer desired that the compiler (or other tools) cannot just correct it.
I think such lists are very useful however. Back when I used C++, Parashift C++ FAQ https://www.parashift.com/c++-faq/ was very helpful for me. It helps with trickier parts of C++, for example the "most vexing parse" which doesn't have obvious error messages.
There is a nice write up from the creator of Keras about this: https://blog.keras.io/user-experience-design-for-apis.html ...See "3 - Provide helpful feedback to your users."
That being said, gcc and clang have started to put in suggestion-like responses. Answers don’t have to be obscure, especially not for obscurity’s sake.
But all is not lost. You (or somebody) could write a utility that read the compiler output through a pipe and gave more verbose messages