Today, after being on StackOverflow for five years, I have discovered the { }
button, after reading some blog post. My life was changed.
Well, not exactly, but it did make it a lot easier to indent code in questions asked by SO beginners. Before today, I would copy/paste the code in a local editor, indent, then paste back. That, even though I was visually aware of the button since I clicked the "image" icon to its right many times to paste or insert images.
And I'm not the only one who's missed that button for a very long time.
Proposal
One way to alleviate the problem is to make said code button less easy to overlook. How can we make it more easily discoverable?
Move it towards the left (except for right-to-left sites) in the toolbar, based on its frequency of use. I'd guess that it's the most useful tool, perhaps after the link tool.
B
andI
I think are rarely used, because it's comparatively much easier to just type*
or_
before and after the text.This move could be applied only on code-related SE sites. If the
{ }
button were placed beforeB
, it would be hard to miss, whileB
andI
would be also highly visible (and familiar from the toolbars in many other editors).A slight, subtle, one-time emphasis on the code button (just like the one we have when landing on an anchor, a fading out light orange border - example), for first-time users, perhaps when unindented code is detected (we already have an implementation for this). After the button is clicked for the first time, the user's profile would store a flag indicating that the emphasis should not be repeated.
Notes
- The argument that there's a shortcut key for the code button misses the point - a user who doesn't see the button on the toolbar won't mouse over it to learn the shortcut key from the tooltip. They're also less likely to venture in the help and learn about that shortcut key.
- History - A previous related proposal has implemented an automatic check for unindented code, but only for users under 50 rep, which some moderators have pointed out is too low of a limit - "I think the reputation limit it too low. I've seen poorly formatted code from people with much higher reputation. – ChrisF♦ Jul 13 '11 at 12:35"
{ }
button, because you need to mouse over it to see the hotkey.