Hi! I'm building a framework in Python for 10 - 11 year olds to learn Reninforcement Learning. What are your best tips / tricks for designing good & effective error messages?
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (3)
First, couple of general ideas for error messages and I'll talk about programming library ones in the end.
Sonya Gregory has really good points about errors in regards to user experience in her blog post Best Error Messages: 5 Tips For A User-Friendly Experience.
My takeaways from her post:
In addition to those, I think that Daniel's comment is very on point. Having error codes that match to very specific cases can help people who've built the original program to pin point the issues. You can even add "Please let us know what you were doing when this happened" flavor text (with bit more specificity) to help you get the information that you need to figure the problem out.
When it comes to libraries used to build programs, they can be very awful. As much as I love Python, its error messages are so bad I'm writing a guide to understand them. On the other hand, Elm has brilliant approach to it and I recommend reading through the linked post.
Making your error codes as good and helpful as those of Elm's is a lot of work but it can make a huge difference, especially in this case since you're building things for children.
Carlos' point is also good and I'd expand to that. With a small library, you might not get a lot of hits on Google with the error codes so make your documentation so that it's easy to search with an error code. That will save your users a lot of trouble.
Have both description text and error code, because there could be duplicated texts. Avoid making duplicated error codes.
Those which you copy/paste on google and find how to solve it.