by TheMakeA · 12y ago · 0 comments
print out some additional help text that explains that you shouldn’t try double-clicking it from explorer again.
Why not? If a large number of your users want to double-click it, why tell them that they are wrong? It sounds like you already support it now anyway.The thing is that ngrok does not do anything useful beyond printing out the help text when double-clicked, and without the text, I'd be worried that a user might actually try to double-click it again when it doesn't do what they want instead of typing the command with useful arguments, if that makes sense.
Telling users they are wrong seldom works in the long run, because this requires a change in the mental model. The program model most people using GUIs assume is "you open a program, then you tell it what to do". The CLI model of "you first decide what the program must do, then you run it" just requires more thinking. As Steve Krug points out, "don't make me think" :)
After reading a bit into what ngrok actually is, kulkarnic's suggestion of an interactive mode probably makes more sense. Easier than building a full GUI, but an experience close enough to a GUI that even users unfamiliar with a commandline should be able to use it without difficulty.
There are many good reasons to limit users and user interactions to the appropriate existing context. A "double-click" is a Windows metaphor and not a Web metaphor and should ignored if not actively discouraged. I have nothing against Windows but it's simply not appropriate to extend its behavior to the web.
> In the process of writing up this blog post, I wondered if I could do even better. Is there a way I could eliminate that last support email? After searching around for a bit, I stumbled on cmd.exe’s /K option which instructs cmd.exe to run the program and remain open after it terminates. The soon-to-released ngrok 2.0 contains the final iteration of this feature. When you double click it from explorer, it will relaunch itself using cmd /K so that it executes as if you had opened the prompt yourself and run the command.