How to make a good user interface
While browsing repl talk #share, I found a lot of bad interfaces. Not mentioning names, but I want to correct this:
Don't add all the frills unless required.
No TTYesque output.
for c in str: print(c, end='') sleep(0.05)
No rainbow text
- No pauses for interpolation
Clang, a C compiler, has some very good error messages:
t.c:1:1: warning: return type of 'main' is not 'int' [-Wmain-return-type] void main() ^ t.c:1:1: note: change return type to 'int' void main() ^~~~
It tells you what you did wrong, and how to fix it.
Some messages are bad:
Follow common practice
If you're making a shell/OSlike thing, don't:
- Present the user with a menu
- Make programs called
- Get in the user's way. (Windows XP won't let you read the root of C:)
- Have a help menu
- According to The zen of python :
There should be one-- and preferably only one --obvious way to do it.
Make it fast.
If it takes 30 seconds to install packages, the user will be mad when they look at your project.
Don't use Colorama when
\033[0m will work
If you need to install 30 packages:
You are doing it wrong
Don't do fake loading.
If your program needs to read a long file, say so.
import halo, time with halo.Halo(message="Loading OS"): time.sleep(2000000000)
The user is dumb.
Design your app as if a five year old or Gilligan had to use it.
Assume they will enter invalid input
Assume they don't RTMP (Read the man pages)
Assume they use a command wrong
Respond to user feedback
If someone says 'I don't like the color of your giant ascii logo', fix it .
If people say your
slow_print function is too slow, fix it.
Documentation is like salmon: when it is good, it is very, very good; and when it is bad, it is better than nothing
Document the *NIX out of your code. If you write a good post on how to use it, people will be more liberal with their upvotes.
If it's not good, it's better than none.
Please let me know if you have any UX feedback on this article.
the most beautiful tutorial on repl
no confusing ideas
no upvote begging
clear as crystal
a bit offensive...
suggest you remove the 85 year old man part
The more cryptic the error messages, the better, it’s way more fun for the maker that way