Reply

Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

code tags

 
0
  #1
Apr 23rd, 2006
Ok how many ppl here get ticked off when newbies persistantly post their code without code tags. Raise your hand? Yes I thought so.

Anyhoo, I've been speaking with dani about this however, she has been unable to provide a solution for this. Everyone say 'awww'.

Ok, so I was wondering, since there are a lot of clever ppl here, myself being the cleverest :cheesy:, this could be the thread to remedy this problem.

Any ideas... ppl? Thinking of a php parser to force ppl to use code tags when code is written, but there are so many languages on this board. Hmm???

http://img476.imageshack.us/img476/5171/cut20ln.png
Piworld
[Tis simple as Pie]
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 2,044
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 139
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

Re: code tags

 
0
  #2
Apr 23rd, 2006
I say it's their loss if they don't post using code tags, so who cares?

(Of course, it's Dani's loss, too, in that case, so I guess Dani would.)

I personally care more about the large margins given when code tags are used. </attempt type="derail conversation">

((call/cc call/cc) (lambda (f)
                      (display "Worst infinite loop, ever!")
                      (newline)
                      (f f)))
This is what i'm talking about, above and below ^^.
All my posts may be redistributed under the GNU Free Documentation License.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: code tags

 
0
  #3
Apr 23rd, 2006
That's a prefect solution. There are a ton of langauges, but let's face it, there are BASICALLY 2 kinds. Basic, real. Basic is a fairly simple, and easy to figure out language, if, end if, etc. Then the real style (you know, C, C++, Perl, Java, Javascript, etc) with the cool braces and brackets. 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.

Another solution, since some people have a hard time figuring out how to stick stuff between code tags, is to have Dani modify vbullettin, and have a link or another button for "post code", which loads a new window with a textbox, where they paste the code, and it adds it to the post with the tags.....
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 2,044
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 139
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

Re: code tags

 
0
  #4
Apr 23rd, 2006
User-interface-wise, I think it'd be best to detect code, and if the message has no code tags at all (and if code is detected), then ask the user if they'd like code tags (automagically added) and then have a neat little interface where they could drag and drop code tags around to the appropriate place if the detector got the boundaries wrong.

Of course, I'm dreaming a bit here, as it'd be annoying to implement this with a language as crufty as PHP, messing with code that already works, with very little to gain.

And I guess the people sophisticated enough to use a REAL real programming language are probably sophisticated enough to use code tags already, right? :p
All my posts may be redistributed under the GNU Free Documentation License.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: code tags

 
0
  #5
Apr 23rd, 2006
well, I've seen WAY too many posts in the C/C++ and Perl forums with no code tags...... so what does that tell ya?
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,630
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 718
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: code tags

 
0
  #6
Apr 23rd, 2006
>so what does that tell ya?
Popular languages attract idiots like poo attracts flies?
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,040
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 126
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: code tags

 
0
  #7
Apr 23rd, 2006
She's baaaaaaaack

Parsing every single post that runs through the system is just way too resource intensive - and inefficient - for a forum community.

With the upgrade to vB 3.5, the default editor for new members has been set to the WYSIWYG editor (the standard and wysiwyg editor modes can be toggled via the icon in the upper right of the editor). When in the software and web development forums, the editor area displays a watermark reminding people to use code tags.
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/daniweb
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: code tags

 
0
  #8
Apr 23rd, 2006
you could add some javascript to do it...
hell, if you know where to add it, (ya know, on the post submit) I'll code the javascript for you!
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: code tags

 
0
  #9
Apr 24th, 2006
>When in the software and web development forums, the editor area displays a watermark reminding people to use code tags.

Well is it working. Clearly not.

>User-interface-wise, I think it'd be best to detect code, and if the message has no code tags at all (and if code is detected), then ask the user if they'd like code tags (automagically added) and then have a neat little interface where they could drag and drop code tags around to the appropriate place if the detector got the boundaries wrong.

This is genius. Please make something like this Dani.
Prettie please. I bet you can't do it. (Tries to use reverse psychology)

http://img476.imageshack.us/img476/5171/cut20ln.png
Piworld
[Tis simple as Pie]
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 1,655
Reputation: tgreer is an unknown quantity at this point 
Solved Threads: 35
Team Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: code tags

 
0
  #10
Apr 24th, 2006
This isn't feasible. I'm an experienced JavaScript coder, and the overhead just to include a script that could parse every post and detect code (and code fragments) would be astronomical!

The place to do it, if it all, would be server-side, in PHP. But we're a forum, not a code-parsing service. I think you're seriously underestimating what it would take to "detect code". And it would never be 100% accurate, so could potentially cause more problems than it would solve.

I would politely suggest that this thread be closed, or at the very least, to stop pestering Dani to implement a feature that isn't feasible.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the DaniWeb Community Feedback Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC