We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
How about adding a little filter that scans for the use of braces or nested parentheses in peoples post and very explicitly complains if matching posts does not contain the required formatting tags.
A huge majority of new posters are clearly completely unable to read a few lines of posting instructions and don't seem to look at the preview and notice something strange about their code.
Since garbled source code is so hard to read, it wastes a lot of time for all people on this board and it is hard not to be rude after reading the 10th thread with unformatted code.
Perhaps a picture would help.
www.danlhenry.com/.../keil_code.png
I have a bad habit of using parenthetical comments (which often seem to be frowned upon by English style guides (but then, those authors aren't programmers, are they?)) I guess programmers aren't quite as bothered by popping up levels as are most people.
But it seems like a good idea. It's probably hard to automatically insert the tags in the right place, but at least a Clippy-style "It looks like you inserted code in your post, but there are no "pre" tags" warning box might well help.
No, it would not be possible to automatically insert the tags. It is too hard to detect the switch between running text and code blocks. But since the Keil tools only supports assembler, C and C++ to my knowledge - and most problems are with C/C++ code - it should be quite easy for a trivial code piece to make an educated guess if the post contains C/C++ code or not. That would probably be enough.
Extending the concept to detect C51 assembly should also be quite easy. It would probably be enough to check if several lines starts with white space followed by one of a couple of common mnemonics.
But it wouldn't need to be perfect. It would be enough if the filter could catch 80% of all incorrect posts.
I have a feeling your web server is going to have to send out a lot of copies of that image :)
better complete that closing angle-bracket, then...
A pity I couldn't have gotten it right the first time.
It's corrected now.
Too bad the two who have "corrected" their posts after seeing the picture did the "correcting" by copying/pasting the already munged code, instead of copying the code from their original source file.
Even with a preview function they totally failed to notice that instructions followed after end-of-line comments...