> Why polling?
I suspect Salem doesn't have the support from the admins to get it implemented and he wants to show them that the board at large thinks it's necessary.
That's just a guess, though.
> Why polling?
I suspect Salem doesn't have the support from the admins to get it implemented and he wants to show them that the board at large thinks it's necessary.
That's just a guess, though.
-Govtcheez
[email protected]
>> Maybe I don't want to tag my code for some reason. If you don't like it, don't read it and don't post any answer.
echo Salem - I don't see what reason one could have for not using them ... makes no sense to me really. And if you do post code without tags, unless the topic interests me, I won't
>> We could all just change our sigs like quzah
Nice idea, but I don't know if it would work ... unless quzah posts at the start of every thread ...
This is why we neet that script back!http://cboard.cprogramming.com/showt...185#post582185
Last edited by twomers; 08-18-2006 at 02:57 PM.
For example I don't want to quote my one line
fstream myfile;
I don't know the script's behavior as I said. But if it wants to prevent me, I am not agree with it. It is my freedom to send my post in whatever format I want (even if I never send a bad formated post in my life). If moderators want to force members, the polling is meaningless, or at least it should be titled: "Force code tags or not?". But if this polling is to ask ideas, this is my idea.
Beside the auto tagger that is very useful, a script for painting keywords would be very nice.
If its true, why admins don't come to tell us their opinion? The board can activate the script for a while and after that poll for it.I suspect Salem doesn't have the support from the admins to get it implemented and he wants to show them that the board at large thinks it's necessary.
Learn C++ (C++ Books, C Books, FAQ, Forum Search)
Code painter latest version on sourceforge DOWNLOAD NOW!
Download FSB Data Integrity Tester.
Siavosh K C
I voted yes before I even read what they were..... I don't regret it though.
>You've voted, right, joe. Voted yes, right?
Didn't you look at the extended poll results?
http://cboard.cprogramming.com/poll.php?do=showresults&pollid=959
I was unaware of this. The forced code tags was irksome when trying to quote something like:Also, if you really wanted to post braces, you could use the HTML character quoting & # thingy to get your braces into prose.
You would be forced to add code tags.Code:if (num == 2) {
The problem with the code tag script was that it was stupid, and easily thwarted. People would just stick code tags in... NOT AROUND THEIR CODE... just in any old place, and it would still let their code through. Or, you could have two segments of code, with say a commentary between them, wrap one of them in code tags, and not the other, and the script wouldn't catch it.
Also, if I recall correctly, the script was stupid in that any time you used a { or a }, it assumed you were posting code, and required you to code tag wrap that. As a matter of fact, I believe that was the only thing it checked for. For example, the following wouldn't require code tags:
if( a == b )
c( );
else
d( );
Anyway, I'm for deleting threads which don't use code tags. Delete it, PM them why, and call it good enough.
Quzah.
Hope is the first step on the road to disappointment.
I voted yes because whenever I was notified about not having tags I felt
overwhelming shame and uncleanliness and immediately modified my post.
Perhaps just a warning before continuing would suffice, and a counter of the
number of times it was ignored by a person, maybe a limited number in a
timeframe - (so many per week || another amount per month) - if either is
broken your post is blocked?
I'm personally fed up with the number of poorly formatted posts lately, and the
necessity to request that the OP cleans it up. Also, is the page with the rules
still displayed when becoming a member these days? Perhaps a big flashing
annoying box that says use tags and ask definite questions that won't close
for half an hour might do the trick for new members - be a fun challenge to get
that past pop up blockers...
No No's:
fflush (stdin); gets (); void main ();
Goodies:
Example of fgets (); The FAQ, C/C++ Reference
My Gear:
OS - Windows XP
IDE - MS Visual C++ 2008 Express Edition
ASCII stupid question, get a stupid ANSI
I don't remember that script...must have been during some hiatus or something.
Not to stroke the fur the wrong way, but I'm going to say no. Why?
1) we do a pretty good job of ignoring people who don't use code tags
2) those who don't ignore usually mock the poster in a most entertain fashion /cough quzah /cough
So intead of code tags, we should just make sure quzah sticks around. If he's ok with that idea of course. Or maybe we can have a public service anouncment with the transforms.
"Always use code tags timmy, or you're going to get reamed. Now you know, and knowing is half the battle!"
No need to delete the posts, no need to mock the user. The script is a minor annoyance to established members who know what they are doing, but it often helps new members who don't.
Not everybody who doesn't know the rules is an idiot, and the code tag script is an excellent way to help those that aren't. Those that are will expose themselves anyway.
> For example I don't want to quote my one line
> fstream myfile;
The script never detected one-liners like that.
It used the heuristic that IF (and only IF) the post had braces that is was almost certainly code (good enough to bet on anyway).
Braces imply that the code has block structure (and therefore if the programmer has any clue, indentation), and thus it becomes highly desirable that the code is surrounded by code tags to preserve that indentation.
> The board can activate the script for a while and after that poll for it.
We did that last time, long before you showed up.
All I'm after is getting the functionality prior to the board upgrade restored, nothing more.
Wanna reverse your vote yet?
> Not to stroke the fur the wrong way, but I'm going to say no. Why?
So half the posts on the board become the ticking corpses of posts which got it wrong first time round. And when the creative flames die away and posts become ignored, the board will die - nobody posts on boards which have 0 replies to too many threads.
Yeah, "That'll work - NOT"
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Here is my simple auto tagger, it finds code lines and marks them as "code" then it will add tags where appreciated :
1) Find all lines ending with ';' and mark them as "code". This line will be processed later. Now search backward to find a blank line and mark all lines below it as "code".
2) Find all lines beginning with '#' and mark them as "code".
3) Find ")*{" where * is space or nothing. Then search for "}" and mark all the lines between them as "code".
4) In case of ")*{" search backward for "(" and mark its line as "code"[EDIT] and its above line until reach a blank line.
5) Find all lines beginning with "//" and mark them as code.
6) Find all lines beginning with "/*" and find its next"*/" then mark all lines between them (including their lines) as code.
With this technique, this program will be tagged like this:
[Quote]
This is my program take a look at it.
Think we have a int array each member for each line. 0 is for no code, 1 is for code and -1 is for blank lines. My code is lines, the array will be like:Code://This program is for testing auto tagger #include<iostream> int a; int b; using namespace std; int main() { cin >> a; cout<<"On your mark, ready set lets go" <<"dance floor pro, I know you know…"; return 0; } cout << "This line is out of the braces "<<endl <<"but it will be marked as \"code\" too"<<endl;
In the next phase it will turn all -1 between 1s to 1. In the third phase it adds code tags and paint keywords for the sequences of 1s.Code:isCode[0] == 0 : isCode[10] == 1:Between{} isCode[1] == 1 :// Mark isCode[11] == 1 :Between{} isCode[2] == 1 :'#' Mark isCode[12] == 1:Between{} isCode[3] == 1 :';' Mark isCode[13] == 1:Between{} isCode[4] == 1 :';' Mark isCode[5] == -1 :Blank isCode[14] == 1 : } Mark isCode[6] == 1 : )*{ Found isCode[15] == -1 :Blank isCode[7] == 1 :)*{ Found isCode[16] == 1 :';' Mark backward search isCode[8] == 1 :Between{} isCode[17] == 1 :';' Mark isCode[9] == 1 :Between{} isCode[18] == -1 : Blank
There should be one blank line between code and no code if poster wants to begin code without brace.
For exampleThis line doesn't work:
Code:cout<<"classmates ar lazy" <<endl;
Last edited by siavoshkc; 08-19-2006 at 08:04 AM.
Learn C++ (C++ Books, C Books, FAQ, Forum Search)
Code painter latest version on sourceforge DOWNLOAD NOW!
Download FSB Data Integrity Tester.
Siavosh K C
I think (as far as I can see) the main reason some of you are pushing for the code tag script is:
* To learn newbies in the art of using code tags
And the opposition is mostly centred on:
* Experienced members know what they're doing and don't want to have bots force their poorly-coded opinions on them
So why don't we force the tags on new members, pop-up a "reminder" for existing members and assume the seniors are better off without? You could use postcounts to differentiate.
As for me, well, I'd rather the forum software just inform me ("Hey, you seem to have forgotten code tags") and not force anything, or worse, do it by itself.
Code:#include <stdio.h> void J(char*a){int f,i=0,c='1';for(;a[i]!='0';++i)if(i==81){ puts(a);return;}for(;c<='9';++c){for(f=0;f<9;++f)if(a[i-i%27+i%9 /3*3+f/3*9+f%3]==c||a[i%9+f*9]==c||a[i-i%9+f]==c)goto e;a[i]=c;J(a);a[i] ='0';e:;}}int main(int c,char**v){int t=0;if(c>1){for(;v[1][ t];++t);if(t==81){J(v[1]);return 0;}}puts("sudoku [0-9]{81}");return 1;}
>> So why don't we force the tags on new members, pop-up a "reminder" for existing members and assume the seniors are better off without? You could use postcounts to differentiate.
Let's not. Post counts should never mean anything, and it would be too simple to get rid of such a lousy barrier with a little time.
Not necessarily directed at anyone (but maybe everyone): I really do have trouble understanding the opposition in this discussion. A little JavaScript alert is pretty non-intrusive, and JavaScript can be disabled if you hate it. The experienced people here are not likely to see it that often anyway. The trouble in "Going Advanced" is also a non-issue, simply because the reply button was there if you needed to do something fancy. The auto-tagger was never a serious idea, coming from this thread, either.
But post counts imply that the poster is at least somewhat competent (forum wise, not C/C++/C#/Win/Linux programming wise)! I mean, if a new member wants to ask a question, they won't go to the GD where code isn't the main discussion, they go to whichever board seems right. Even if someone is competent at programming, that doesn't mean that they know about the tags, which in turn doesn't mean they will use them. Lets face it, who read the guidelines before posting their first thread?
The script could ignore stuff inside [noparse][/noparse] tags. That way if you wanted to post a curly brace (like "You forgot a } after the second if") outside code tags you could surround it with noparse tags.
[edit] If the script was enabled without any way to post curly braces, some people would have to change their signatures. This one comes to mind:
[/edit]Originally Posted by crepincdotcom
Last edited by dwks; 08-24-2006 at 04:21 PM.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.