943,962 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Nov 2nd, 2009
0

Code tags

Expand Post »
Is it true that code tags now "know" what forum they're in? Because I was only posting one line of code so I didn't use the =Java tag in the Java forum, yet it got posted with the Java code tags instead of the regular code tags. If that is true, it's definitely cool because now new members won't be able to post with the other tags. But maybe I'm just going crazy.
Similar Threads
Reputation Points: 874
Solved Threads: 352
Posting Maven
BestJewSinceJC is offline Offline
2,758 posts
since Sep 2008
Nov 2nd, 2009
0
Re: Code tags
I noticed that recently too

Saved me typing another 4 characters each time
Reputation Points: 96
Solved Threads: 124
Master Poster
Will Gresham is offline Offline
728 posts
since May 2008
Nov 3rd, 2009
0
Re: Code tags
Yes, Dani made that change a few weeks ago.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,953 posts
since Aug 2005
Nov 3rd, 2009
0
Re: Code tags
Quote ...
because now new members won't be able to post with the other tags
Yes however I use to use code tags with no syntax a lot for non-code text and now old posts like the many I've posted are highlighted in code when they are just important text. There are ways around it but as good as this new feature is for new comers, I kinda miss the short-cut the displaying monospaced text just by using code tags. O'well, I guess some things do change and perhaps for the better.
Sponsor
Featured Poster
Reputation Points: 410
Solved Threads: 258
Occupation: Genius
cwarn23 is offline Offline
3,004 posts
since Sep 2007
Nov 3rd, 2009
1
Re: Code tags
Just use [code=text]...

It preserves your formatting and uses a terminal font:
text Syntax (Toggle Plain Text)
  1. col1 col2 col3
  2. --------------- ------------------------------ ----
  3. abc def xyz
  4.  
  5. (1 row(s) affected)
Featured Poster
Reputation Points: 1749
Solved Threads: 735
Senior Poster
sknake is offline Offline
3,948 posts
since Feb 2009
Nov 4th, 2009
3
Re: Code tags
Click to Expand / Collapse  Quote originally posted by cwarn23 ...
Yes however I use to use code tags with no syntax a lot for non-code text and now old posts like the many I've posted are highlighted in code when they are just important text. There are ways around it but as good as this new feature is for new comers, I kinda miss the short-cut the displaying monospaced text just by using code tags. O'well, I guess some things do change and perhaps for the better.

That's the main problem, I think. I'm not crazy about the syntax-defaulting the way it is now, but since I know about it, I can get around it when I want to. However, the code syntax defaulting has been retroactive, so you have all sorts of stuff like this in the C++ forum:

C++ Syntax (Toggle Plain Text)
  1. Now is the time for all good men to come to the aid of their country.

It was intended as a text input file and is now flagged as "C++ Syntax" and "time for" is highlighted as keywords. Not the end of the world, but the result is a lot of high quality posts now looking much less high quality IMO. I don't know anything about the parsing mechanism, but I would imagine that it could check for a post-date and if it were pre-change, don't use the language-assumption.
Featured Poster
Reputation Points: 2614
Solved Threads: 687
Posting Expert
VernonDozier is offline Offline
5,375 posts
since Jan 2008
Nov 8th, 2009
0
Re: Code tags
>It preserves your formatting and uses a terminal font:

...but is still not enough since the original CODE tags didn't add line numbers. This auto-line numbering feature kinda breaks posts in which code tags were used for the sole purpose of preserving formatting and using a terminal font *without* the line numbers. E.g.
text Syntax (Toggle Plain Text)
  1. 1. Wake up early
  2. 2. Brush your teeth
  3. 3. Take a bath
  4. 4. Off to work, which kinda sucks

I'd recommend the people who miss the old code tags to use [code=plain][/code].
1. Wake up early
2. Brush your teeth
3. Take a bath
4. Off to work, which kinda sucks
Super Moderator
Featured Poster
Reputation Points: 3233
Solved Threads: 720
Failure as a human
~s.o.s~ is offline Offline
8,872 posts
since Jun 2006
Nov 8th, 2009
0
Re: Code tags
As DaniWeb grows and evolves over the course of years, things are going to change which (at leat the intention is) to be for the better for the majority of our vast traffic and memberbase. This is an inevitable.

I strive to be as absolutely backwards compatible as possible, but backwards compatibility can only go so far. The new behaviour of the code tags is 100% backwards compatible as long as they were used for their intended purpose which is to display code. (i.e. *many* extra lengths were taken to preserve the ability for the system to be smart enough to not automatically syntax highlight when bbcode is used to highlight code manually).

However, using code tags for something outside of code to achieve a visual effect as a result of the current way code tags happen to be handled cannot ever be guaranteed in the future. It is almost like exploiting the current system to do something it isn't designed to do ... it cannot be guaranteed in future versions. The same goes for quote tags or any other DaniWeb feature. It is not recommended to use quote tags for non-quotes because there are many undesired side effects when using something not for its intended purpose (for example, did you know that quote tags use the html blockquote tag which tell Google that the content within them is not unique and not to spider it?)
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Nov 8th, 2009
0
Re: Code tags
Oh ... my post above is in response to this thread: http://www.daniweb.com/forums/thread235826.html
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Nov 8th, 2009
5
Re: Code tags
>However, using code tags for something outside of code to achieve
>a visual effect as a result of the current way code tags happen to be
>handled cannot ever be guaranteed in the future.

Translation: "Bite me. You didn't use tags for the narrow purpose they were designed, so you don't have a right to complain when I change their behavior".

That's all well and good if you're a cruel dictator, but it's not generally a good idea to make your members angry. Daniweb isn't the only tech forum out there, after all, and the ones most likely to be annoyed by this change are the ones who provide you with the most value.

>It is almost like exploiting the current system to do something it isn't designed to do
IIRC, code and quote tags were used to "exploit" the system because there wasn't any other way to achieve anything remotely like the presentation we wanted. Perhaps instead of giving us the proverbial finger, you could incorporate something into the system so we don't need to exploit it?
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in DaniWeb Community Feedback Forum Timeline: Waiting 15 seconds between reporting posts
Next Thread in DaniWeb Community Feedback Forum Timeline: Silverlight / WPF





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC