0

Take this thread as an example. I want to comment about it on this board instead of hijacking the original thread.

How do all those obnoxious color codes get inserted into such posts? It looks like they were created by some other program then pasted into the post. That is not the only thread I have seen like that. As a moderator I don't have the time to edit out all that crap and insert proper, acceptable code tags.

8
Contributors
29
Replies
30
Views
10 Years
Discussion Span
Last Post by Dani
0

There's not really much we can do about it, though.

The only explanation I have is that maybe the users tried to manually color each line with the WYSIWYG editor, but didn't realize that doesn't accept colors. Perhaps it could? That would solve *some* of the problems.[code=c] doesn't accept colors. Perhaps it could? That would solve *some* of the problems.

0

I'm very confused - apparently I came to the thread too late after the weird coloring was fixed. Essentially joeprogrammer is correct in that color tags within tags are ignored because that tag automatically colors code for you, hence its purpose.[code=language] tags are ignored because that tag automatically colors code for you, hence its purpose.

0

There's not really much we can do about it, though.

Actually there is a way.

The moderators have to just replace the code tags and it should turn out to be fine.

If you will again look at the first post of the thread under consideration, it was edited by me and now it looks relatively okay.

Edited by happygeek: fixed formatting

0

The way to remove those color tags is to highlight the post (Ctrl-A) and click the weird A in the upper left corner of the edit box.

0

I'm confused. Why are moderators editing the colors of other people's code to begin with?

Because many users use color tags instead of using code tags. The original link to this thread which ~S.O.S.~ kindly corrected had both color tags and code tags, and the color tags were still visible making the code difficult to read.

I've seen some posts that contain hundreds of those color tags. I don't edit them out because it just takes too much time. I don't think I should have to spend a great deal of time deleting each one of those [ color=1234 ] and [ /color ] tags with a very high probability that I will delete something else I should not; I'm not that patient and I don't want that much torture. Which is why I started this thread -- the color tags appear as if they were machine/program generated.

0

I'm confused. Why are moderators editing the colors of other people's code to begin with?

The only need to have manual colors for code is when a user needs to highlight a specific line (for example, "this is the line where the error occurs"). Otherwise the coloring should be the same on all posts.

Most users who post here are ignorant of either code tags and/or automatic coloring. They then either try to manually color the code without code tags (that's the worst, believe me!) or sometimes they add the colors inside a tag, which was the problem here.[code=language] tag, which was the problem here.

0

I'm very confused - apparently I came to the thread too late after the weird coloring was fixed.

For those who missed it - this is basically how it looked:

#include <iostream>
 using namespace std;

 int main() {
    cout << "cool" << endl;
    return 0;
 }

The deceptive thing about this is that the WYSIWYG editor actually colors the code, so if you don't preview your post, you won't realize that the color tags don't show up inside tags. (see attachment)

Also, the thing that makes the colors look really funky is that the # symbol in C++ means the command is a preprocessor definition, which in DaniWeb's code coloring scheme turns the code all green. Ugh![code=language] tags. (see attachment)

Also, the thing that makes the colors look really funky is that the # symbol in C++ means the command is a preprocessor definition, which in DaniWeb's code coloring scheme turns the code all green. Ugh!

Attachments Picture_1.png 38.65 KB
0

Yeah I've seen this especially on the vb.net and c# forums. They must use some other program to highlight it.

Code tags will always be a problem. In fact I haven't seen any improvement since the last time I brought up this issue.

A quick javascript (client side) hack dedicated just for just the software development forum may work... although a server side solution might be more practical. The parser wouldn't be 100% fool proof, otherwise it would max out on system resourses.

But that doesn't matter in the long run.

The more I think about it, the better it sounds. It just needs some beta testing, and now that tgreer's gone there's no one here to brainwash dani. ;)

0

On CBoard they used to have a code-checking script (I don't know if they still have it now) that would on C/C++ forums search for curly braces, and if they were present automatically insert code tags around the whole block of code.

This wouldn't solve the color problem, but it might fix the huge majority of posts we recieve here that lack the code tags.

0

On CBoard they used to have a code-checking script (I don't know if they still have it now) that would on C/C++ forums search for curly braces, and if they were present automatically insert code tags around the whole block of code.

Not quite. It just pops up a message.

Attachments Popup.jpg 31.83 KB
0

Not quite. It just pops up a message.

Still, wouldn't that be a great way to improve the overall quality of postings in the software development forums? There's a lot of newbies who simply forget, even if they're aware of the need to use code tags.

0

Still, wouldn't that be a great way to improve the overall quality of postings in the software development forums? There's a lot of newbies who simply forget, even if they're aware of the need to use code tags.

I think it does well elseweb, but it still always comes down to the persistence of the poster, knowingly or unknowingly. And at times it also takes as much work with the admins. After the last upgrade, it took a while -- and some coaxing -- to get it back.

0

I'm confused. Why are moderators editing the colors of other people's code to begin with?

Oh, so you mean to say that if a post is multicolored, with all kinds of colored being used by beginners to express their thoughts or with the broken code tags, we should let it be?

0

I'm confused. Why are moderators editing the colors of other people's code to begin with?

What about this post ? What do you think should be done ? Left alone, yes ?

0

Correct -- and thats what we mean when we say "Editing out the color tags out of user's post"....

There was a lot of debate whether moderators should touch anything other than code posted by moderators while some situations demand that the entire post be edited to maintain the forum dignity -- just wanted to make sure...

0

The more I think about it, the better it sounds. It just needs some beta testing, and now that tgreer's gone there's no one here to brainwash dani.

If you think your solution is viable: a massive, multi-language aware, client-side language parser/colorizer, and if you think I ever "brainwashed" Dani to do or not do anything, and if you think she doesn't still solicit my opinions and advice about certain aspects of the forum because of the mutual respect we hold for each other, despite our disagreements, then you are just as deluded and immature as you've always been.

0

If you think your solution is viable: a massive, multi-language aware, client-side language parser/colorizer

At least once I thought it was:

I asked pros to do it, but thus far no comment.
http://community.slickedit.com/index.php?topic=531.msg2249#msg2249

I think it would be a wonderful combination of advertising a product with making me see code "How I Like It"(tm). Que sera, sera.

Perhaps it needs a demand-side kick.

I'm just curious whether or not Dani ever tried a demand-side kick. Or perhaps an email.

It seems pretty much DOA at the moment. But I can easily imagine at some future point in time when XTAGS become the thing that someone discovering this thread would wonder what the hell I'm talking about. But right now I'm just dreaming...

0

Color-coding/synatx highlighting a specific language is not a huge task, and in fact the forum already supports this. However, a client-side script that would run in real time to scan every post and recognize "code" in several languages and automatically format it is a wildly impractical notion. IDEs are able to accomplish this because the user specifies the language, and by comparing each word with a syntax dictionary. That just isn't feasible for a forum, unless the user defines that part of the post containing code, and the language of the code. This is exactly what the forum already supports. If a user refuses to use that system, then the appropriate response is for a human moderator to step in - rather than to lobby for an impossibly massive solution to a relatively small problem.

0

Quite obviously I'm talking about flavored code tags, but not in the way that this or any other board currently implements them. Beautifying and custom coloring per member à la my current editor.

0

I read you loud and clear Dave. No problems. My comments are directed to "iamthwee", who seems to think the only barrier to creating a client-side, cross-browser, code-sensing, auto-formatting heuristic AI with sub-second response time is my presence and Dani's weak-minded susceptibility to influence. Strange, then, that it hasn't been created on any of the thousands of other technical forums that have neither impediment.

0

However, a client-side script that would run in real time to scan every post and recognize "code" in several languages and automatically format it is a wildly impractical notion

The reason why you are wrong is because you just don't read what I say carefully. I never asked for a code parser would magically recognise code in any language. Silly.

The script (not client side) would indentify key programming traits and then prompt the user to add code tags to the post themselves.

When you have a message like that keeps popping up

saying pease use code tags

the user will be forced to use them. I bet you 8/10 times they'll understand it and get it right.

0

Right. A program to magically separate the wheat from the chaff, recognizing code as I type it. Trust me, I've read your repeated insistence for this, and it continues to remain implausible for the reasons already set out. But by all means: brick wall, your head - continue.

0

What on earth are you going on about. When have I ever mentioned auto code tagging as you type. :?:

Read my post again dummy.

All the script would do is parse the entire post when the user clicks submit. If it sees key words such as for, do, while and other such programming syntax when the user tries to click the submit button it returns a message:

"use code tags"

And it keeps doing this until it find the matching [kode] [/kode] parts. Whether or not the user gets this right isn't guaranteed. But I bet you 8/10 times they will get it right.

No doubt you'll come back and say, but it isn't 100% going to work, blah blah blah. And thus the problem remains unchanged for another year, two years...

0

Since when is calling someone "dummy" and "silly" acceptable, mature discourse?

WHILE I have read your repeated posts, you cannot DO what you ask, FOR the reasons I've SET forth.

DO you see the problem, FINALLY?

What part of this post is code? In what language? FORTH?

What you ask cannot be done, not because Dani is being lazy or brainwashed, as you imply, but because it CANNOT BE DONE. Or, as Dave puts it with commendable understatement, "it would be a tremondous undertaking". Tantamount to NSA's Echelon.

But feel free to prove me wrong. Since it seems to be such a trivial matter that you can't understand why Dani hasn't just whipped it right up for you: code it yourself.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.