Yes ... it's just a search for { } which is viable in JavaScript ... although certainly not a foolproof method or something that makes sense to do on a site that has a lot more than just C code :) It *is* a temporary last resort though.

Re-read Dani's post #29, which explains why a hack like that isn't feasible here. Also, that's a far cry from you originally asked for:

So, you just look for a list of programming syntax in their post, and either ask them to use code tags, or automagically add them. Or automatically spit out a message, please enclose code with
[kode][/kode] tags. How hard can it be?

The answer, once more, is: very, very hard to do this correctly. And very, very confusing and inelegant to do it the wrong way.

Gah ... I've had enough of this issue - I think it's been discussed to death already.

iamthewee ... I would have contacted you via PM but you have PMs disabled ... would you please be able to refrain from manually adding your graphic signature to all of your posts. Please use text-only signatures within our control panel and if you really like that image, set it as your avatar :)

Member Avatar for iamthwee

>a site that has a lot more than just C code

Doh I never noticed the other forums. Silly me.

>Re-read Dani's post #29, which explains why a hack like that isn't feasible here. Also, that's a far cry from you originally asked for:

Well actually, I was just poking for a solution for the main boards I visit, such as the c/ java boards. A hack there would work fine for me. Tee he he.

But if you're going for the all or nothing approach then I guess I conceed. I still don't like you btw tgreer. :cheesy:

>adding your graphic signature to all of your posts

A ha ha, ok. Just for you though.

A ha ha, ok. Just for you though.

Thank you :)

To wrap up this discussion ... An elaborate code parser which determines where code starts and stops is out of the question. A simple JavaScript that does a search for { and } and [code] is feasable but would be limited to just a small section of the site, which has the overhead of having to check for what forum we're posting in before doing so, and additionally could essentially add confusion if implemented in some programming forums but not others. Additionally, it really is only a very last resort temporary solution.

So far ... nothing out of [code] yesterday or today. I'll try to do a daily check :) Like I said, teaching members to be better members is always a better solution. Perhaps (and hopefully) we won't even need to consider anything else because this will solve our problem.

Member Avatar for iamthwee

>I'll try to do a daily check Like I said, teaching members to be better members is always a better solution.

You can't teach fools. Or the one post wonders, which is what daniweb mostly caters for, well in the software development forums anyway. ;)

Best lock this thread to keep tgreer happy. ;) And also to prevent him from getting a cheap dig in on me.:lol:

>You can't teach fools. Or the one post wonders, which is what daniweb mostly caters for, well in the software development forums anyway. ;)

Well I am going to try very hard to change that. Just watch me :)

This thread will be kept open to other non-parsing suggestions.

>This thread will be kept open to other non-parsing suggestions.
What I did was deal with each offense individually. If it was obvious that they were working on ignorance, I simply informed them of the existence of code tags and added them manually. If they continually failed to use code tags despite knowing about them, I gave them a vague warning with the implication that not using code tags was against the rules. I never got past that point, but the next step would be to report them as a malicious user and see about getting some real punishment going on the grounds of willfully making things difficult for other users.

Thank you for the words of advice, Narue :) Like I said, I think that this problem is better solved through moderation.

Pft, Code can solve all of our problems.

Are you going to be the one to disagree with Narue right when she's near back with us?

:eek:

In fact,
*Looks At Narue*
We are running out of people to help us add code tags ....

Member Avatar for iamthwee

>Pft, Code can solve all of our problems.

Yay, me too. I second that. Comatose, this can be done, even if it's not completely 100% fool proof in javascript right?

No offence dani but let's be honest. You guys thought that the code formatting on the cprogramming board was due to diligent moderators. I mean if tgreer really believed this how good a javascript coder can he really be? Honestly,* shakes head in disbelief?*

It seems to me you guys are just pushing this aside without even trying to code up a solution.

Couldn't you do something like:

if board = c/c++ or java boards
  then 
     enforce  C code tags scripts
  else if board = python
     then
       enforce python code tags scripts

And so on? I think we can leave out the languages in the web development section.

Alternatively, how about, as soon as someone joining up, automatically opening a window showing them how to use code tags. This would only be for the first sign up.

Much in the same way a little box appears showing me I have a new private mail when I sign in, forcing me to click ok.

This just in today btw he he http://www.daniweb.com/techtalkforums/showthread.php?p=209666#post209666
http://www.daniweb.com/techtalkforums/thread44147.html

Who's with me?

>You guys thought that the code formatting on the cprogramming board
>was due to diligent moderators.
For a long time it was both moderator effort and policing by senior members. The automated solution is relatively new, so you can't expect everyone to know that it exists unless they're regular members.

I said that it was impossible when you were talking about a parser that determines where code begins and ends in a post and automagically adds code tags. Once you explained to me what cprogramming.com actually does, I said that doing so was feasable.

BTW, I *still* haven't received my confirmation email from cprogramming.com, despite going into my User CP and making sure my email address was correct. I know a good number of you guys are cprogramming members so could one of you perhaps bring this to the attention of one of their admins? I would but ... well ... I don't really care :)

Member Avatar for iamthwee

Maybe they see Daniweb as stiff competition and as a result are preventing you from signing up. ;) :cheesy:

>Maybe they see Daniweb as stiff competition
Not when several of the relevant experts on Daniweb are also oldtimers on Cprog. ;) Once quzah starts hanging around here, the evil trio of Salem, quzah, and myself will be unleashed on the unsuspecting masses.

Member Avatar for iamthwee

Oh I wouldn't say you are evil. I'd just say you suffer from PMS 24/7, 365.25 days a year. :cheesy:

Now Dani, she's a different matter. Ask her how she handles it, she might be able to give you a few pointers! Tee he he.

:eek: wow

Oh I wouldn't say you are evil. I'd just say you suffer from PMS 24/7, 365.25 days a year. :cheesy:

There aren't that many days in a year :-)

For once I am with iamthwee ( that is a good tongue twister, try repeating "Iam with Iamthwee" ). Something should be done about the code tags. Even if it is not foolproof.

I earlier had a problem with the scroll bars too, but looks like the CProgramming forum does not have those troublesome scrollbars and all of the code can be viewed at once.

And also, even if code tages are used in Daniweb, sometimes the formatting is really horrible. Especially the indenting. It must be due to the Tab characters present in the code but something must be done to rectify it.

Member Avatar for iamthwee

>You can't teach fools. Or the one post wonders, which is what daniweb mostly caters for, well in the software development forums anyway. - [iamthwee]


Well I am going to try very hard to change that. Just watch me - [Dani]

http://www.daniweb.com/techtalkforums/thread44263.html
http://www.daniweb.com/techtalkforums/thread44147.html

[sark]Can everyone see the difference dilligent moderating has on unformatted code. [/sark]

Dani me thinks it's time for a trial javascript hack in c/java forums at the very least? Don't u?

>Can everyone see the difference dilligent moderating has on unformatted code.
You're confusing "dilligent" with "slack ass". I would recommend checking the code to see if it has suitable formatting after adding the code tags (or what's the Preview button for?) and run it through a style formatter if need be.

Even a naive formatting program (a good exercise) will mux up the indentation so that formatting bugs are easier to find. :) If the OP doesn't like people changing their code, they'll quickly learn to use code tags.

Member Avatar for iamthwee

>You're confusing "dilligent" with "slack ass"

I wouldn't say Dani was quite that bad. Ok then maybe. Tee he he. ;)

But she's seems a little mis-informed. I blame this partly on the brainwashing of tgreer. He's obviously scared her into thinking a javascript hack is the end-of-the-world type scenario.

Oh dear. :sad:

Member Avatar for iamthwee

>You're confusing "dilligent" with "slack ass"

I wouldn't say Dani was quite that bad. Ok then maybe. Tee he he. ;)

But she's seems a little mis-informed. I blame this partly on the brainwashing of tgreer. He's obviously scared her into thinking a javascript hack is the end-of-the-world type scenario.

Oh dear. :sad:

[edit] btw _jsw what was that little "Good things are happening in my life at the minute" all about? Is the pole dancing club refurbishing. ;) [/edit]

If you truly believe that, then you understand Dani, and me, about as well as you understand the programming involved in what you're asking.

You began this thread talking about one thing, then attempted to refute the objections to your naive suggestion by pointing at something else entirely.

So, just because Dani doesn't want to attempt to implement the unrealistic first suggestion, nor the ineffectual second suggestion, doesn't mean she's "brainwashed". In fact, I suggest you re-read her posts within this thread, as they obviously didn't sink in the first time.

Also, notice how I'm addressing you directly. That's what grown-ups do. So while I find your clumsy, juvenile flame-baiting personal asides mildly amusing (kind of a like a Three Stooges rerun), I'm going to have to ask you to stop.

Either: come up with some realistic, on-topic suggestions, address personal issues to me (that's what PM is for), or stop posting in this thread. If you keep posting about "tgreer" in your messages, I'm going to have to start charging you a usage fee.

Also, this will be my last posting in this thread, as everything that can be said, has been said. So if you really want to slam back, I'll graciously allow you the last word: have at it. I would just ask that you put some thought into the reply. I can appreciate a really well-constructed, witty, sarcastic message, so... take your time, perhaps seek the advice of an adult, use a dictionary and a spell-checker, and make it worthwhile.

Member Avatar for iamthwee

>You began this thread talking about one thing, then attempted to refute the objections to your naive suggestion by pointing at something else entirely.

1. That was never my suggestion in the first place. It was Rashakil fol's and I'm sure he wasn't being entirely serious when he suggested it.

2. I only started this thread to attempt to find a solution to the problem which is prevalent in the software development board. Which is a problem, a serious problem.

>nor the ineffectual second suggestion, doesn't mean she's "brainwashed".

I wouldn't say a javascript hack was ineffectual. If only you could listen to yourself. In fact the javascript hack would probably prevent all unformatted crap in the first place. I've shown you a board where it works.

All you have said is that daniweb has too many languages for that to work.

All I'm saying is, well why don't you just have it effective in the c/java forums? (As a trial) Again you haven't given me an answer as to why you won't do that other than, "if we're gonna do this then we're gonna do this properly" - or whatever that means?

>come up with some realistic, on-topic suggestions,

I am, what are you doing, brushing the problem under the carpet - quoting some stoopid latin, mis-intrepreting what cprogramming actually do. Dear oh dear.


>B. they moderate their posts and educate their users.

How can u edjumacate (is that how you spell it, I guess I should've use a spellchecker) one post wonders?

>Also, this will be my last posting in this thread, as everything that can be said, has been said.

Well whoopy-doo. Let's all entertain the niave idea that good moderating can solve the problem, especially since now, all the moderators seem to be dropping like flies?

Sorry dani but that tgreer is really something else? pfft.

:cool:

Please stop acting like a retarded version of Narue.

I'm reading but have been purposely avoiding posting a lot in this thread because it does me no good to constantly come between bickering members. :)

Over the last few days, I've kept to my word and have been checking on the Software Dev forums twice daily and adding code tags to new posts when needed. We average about 70+ new posts within 30 threads in the Software Dev forums daily, and of those, I've needed to add fewer than 5 sets of code tags each day. If you ask me, that's not terrible.

Like I said, I don't want to go the way of JavaScript or any other type of parser unless it's a last resort. Currently, less than 10% of our posts in the programming forum forget code tags, and so far it hasn't been a problem at all for me to add code tags in a reasonable amount of time after a post is made. Certainly not the huge problem you're making it out to be.

You also made reference to when I said that if I am going to do something, I want to do it right. Adding a very rudiamentary JavaScript parser to look for curly brackets to some of the programming forums and not to others is very "messy" so-to-speak. Frankly, it's a little cheesy (IMO), it's a drastic hindrance to usability, it has the possibility of going off when code tags aren't necessary (it's not foolproof by any stretch of the imagination), it affects page rendering times (as all JavaScript inevitably does), and it can be a little confusing to end users why it happens in some forums but not in others. What I'm trying to say is that it's not an eloquent solution by any means! And, for that reason, I would only implement it as a temporary last resort if not using [code] tags was so out of hand and moderators were completely unable to control the situation. However, after reviewing all new posts the last couple of days, I've discovered that more people ARE using code tags than aren't, and the problem can currently be kept under control with just 5 minutes a day of moderation. This is still an issue that needs to be addressed - but I don't think it's gotten so bad that quick and immediate brute force measures need to be taken.

However, after reviewing all new posts the last couple of days, I've discovered that more people ARE using code tags than aren't, and the problem can currently be kept under control with just 5 minutes a day of moderation.

Or being quietly assisted.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.