| lnk2019 (200) | |
|
I've noticed a lot of people are posting code without using code tags! Not that it bothers me too much, if I can't be bothered reading it, I'll just ignore it but having to tell someone every day to use code tags does grate a little. I looked through the "Welcome" sticky on the Beginners board: http://www.cplusplus.com/forum/beginner/1/ and although it's quite a comprehensive guide to forum etiquette there is no mention of code tags. Not that I believe all the new guys read it before posting, but I was thinking shouldn't it be amended? How many times a week do you ask new forum users to use code tags? And how many of those people actually listen to you? | |
|
|
|
| Xander314 (1383) | |
| How about a warning about code tags right on the new thread page? I guess it might be annoying, but it would be useful. | |
|
|
|
| Cheraphy (785) | |
| Actually I like the warning idea best. People can blatantly ignore stickies. Most if not all newbies don't even open the threads. But a warning in the programming forums would force them to at least see it once. | |
|
|
|
| lnk2019 (200) | |||
| |||
|
|
|||
| Duoas (6734) | |
|
No it wouldn't. Over at DaniWeb they have a very aggressive approach to encourage people to use code tags. I can't tell any difference between the percentage of posters who fail to use them and those who do between the two forums. Remember the second rule of UI design: "Users don't read anything." | |
|
|
|
| Xander314 (1383) | |
|
How about an unclosable popup? Relax, this was a joke | |
|
|
|
| Disch (8342) | |
|
How about something that scans the post looking for something that is unmistakingly C++ code, and makes sure it is in code tags? No need to make it too complicated, maybe just look for braces. Also, since people "get it" after they've been here a bit, no need to do it for everyone. Just do it if their post count is low. - user submits post - if user's post count >= 20, post as normal - otherwise, scan post. Look for "{" - if not found, post as normal - otherwise, scan post. Look for "[code]" - if found, post as normal - otherwise redirect user to a error page that gives a simplistic example of how to use code tags. Excessive? Yes. Worthwhile? Probably not. Just throwing it out there for giggles. | |
|
|
|
| Duoas (6734) | |
| That's actually how they do it on some forums... Over at the Tcler's Wiki, anything that has leading whitespace is considered code. | |
|
|
|
| darkestfright (1091) | |
| Leading spaces is an excellent idea, and would be effortless to implement. | |
|
|
|
| Duoas (6734) | |||
Except that many newbies actually do program like this:
| |||
|
|
|||
| helios (10126) | |
| Maybe a second text box marked with bold, red, blinking letters "YOUR CODE GOES HERE, MORON"? | |
|
|
|
| lnk2019 (200) | |
| I think the MSDN forums have a special pop up box for code, but it still requires you to click a button... | |
|
|
|
| Duoas (6734) | |
| Remember the second rule of UI design: "Users don't read anything." It doesn't matter how annoying or obvious you make it. | |
|
|
|
| hamsterman (4327) | |||
A thing that could be done is not removing excess whitespaces. I never understood why that could be a good idea.
is definitely less readable than
and I think that a fair amount of newbies do have their code formatted to some degree. Though of course, code detection would be awesome. | |||
|
Last edited on
|
|||
| ne555 (4041) | |
|
Just say that everything is code, and wrap the text. If people post like http://www.cplusplus.com/forum/lounge/48476/#msg263358 then the tags are useless. However if they provide automatic indentation... | |
|
|
|
| lnk2019 (200) | |
| Requirements churn... | |
|
|
|
| Albatross (3551) | |
|
The only solution I could see could be viewed as extremely intrusive, which would be to give the more "trusted" users a power to add certain tags to new users' posts (code, output, maybe quote). As I said, though. It's a little bit too intrusive for my taste. -Albatross | |
|
|
|
| Duoas (6734) | |
| I agree with hamsterman. Whitespace is useful. However, my pretty variable-width, non-serifed font doesn't have the same whitespace characteristics as a fixed-width font. | |
|
|
|
| ceruleus (210) | |||||
#include<oistreem> void mane( ) {for(;;){ printf("goodbye, cruel world!);" }
| |||||
|
|
|||||