I agree that you can do lots of stuff suboptimally and still have a usable tool, but I disagree with the author on what the ideal error output looks like.
Ultimately all we're doing is trying to save human time anyways.
Joel Spolsky's timeless advice applies: "Users can’t read anything, and if they could, they wouldn’t want to." https://www.joelonsoftware.com/2000/04/26/designing-for-peop...
Yes, this is a clear break with the unix tradition! But it's not intrinsically bad - it's just a context to bear in mind.
Still, conceivably the app could check the file owner before showing the message. If it was a common enough error, it might be useful to do something like this.
There is a difference between an error title and error description. The description can and should be long to help clarify what is wrong. It's ok to be verbose. It's ok to spill out on multiple lines. You're much more likely to be helpful to a confused user than someone grepping logs and looking for terse output on a single line. That user can just use `grep -C` anyways.
I agree that it's useful to include the app name though.
Yes, this is an example, but surely you'd want an example that shows the strength of doing this verbosely? A good example of a verbose error message system is Rust's compiler output (or newer clang/gcc outputs). Being verbose for no reason other than to be verbose is just wasting the users' time (or they just ignore the spam -- which is what I would do if I used a tool that spammed me with multiple lines of output whenever it hit an -EPERM).
Personally, something like:
% foo ./bar
foo: write config to "./bar": Permission denied
Is clearer to me than your example. Maybe something like % foo ./bar
foo: write config to "./bar": Permission denied
Hint: Have you tried <possible-recommendation>?
Is sometimes okay (and I have done this for my own projects as well), but it's something that should be done in moderation...> You're much more likely to be helpful to a confused user than someone grepping logs and looking for terse output on a single line.
There are two sides to this. Outputting lots of text can also cause a user to get confused (if we're talking about making things easy for not-necessarily-technical users).
When teaching (high-school) students to program, we quickly learned that even somewhat verbose output like Python's stacktraces can cause students to suddenly become anxious because there's a pile of text on their screen telling them they did something wrong. Adding more text to output does not always help, and you should keep that in mind.
[C:\]help sys0003
SYS0003: The system cannot find the path specified.
EXPLANATION: The path named in the command does not
exist for the drive specified or the path was
entered incorrectly.
[C:\]help sys0002
SYS0002: The system cannot find the file specified.
Explanation: The filename is incorrect or does not exist.
Action: Check the filename and retry the command.
> Cannot write to myfile.out, file does not have write permissions
> Fix with: chmod +w myfile.out
I actually much prefer:
"can't write myfile.out: Permission denied"
This shows the same information as the first 2 lines combined from the example, and the 3rd line is not necessarily the correct way to fix the problem anyway (e.g. you might be running it as your user when it should be root, chmod +w would not help).
If you are so convinced that chmod +w is the way to fix the problem, why not just do that and carry on without bugging the user?
And having each error confined to one line also means it's much less likely that some of the lines are missed, e.g. when grepping a log.
EDIT: And to add to this: it's sometimes useful to prefix the error messages with the name of the program that generated them, so that when you're looking at a combined log from different places, you know which of the programs actually wrote the error, e.g. "mycli: can't write myfile.out: Permission denied".