• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

I hate smileys

 
Ranch Hand
Posts: 1067
2
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am so tired of seeing smileys in every piece of code which is posted. Can't the default be no smiles, and you have to check the box to use them?
 
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there some sort of escape characters we can use ? E.g. "\" :

[ April 06, 2005: Message edited by: Ken Loh ]
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's a checkbox on the message entry screen labelled "Disable smilies in this post" (scroll down to find it.) Check it, and no smilies.
 
Ken Loh
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think that's exactly what the original-post sender didn't want. It's easy for one to forget to check the box. He wanted it to be checked as a default.

However, checking the box would dissappoint those who want both intact codes and smileys.

Originally posted by Ernest Friedman-Hill:
There's a checkbox on the message entry screen labelled "Disable smilies in this post" (scroll down to find it.) Check it, and no smilies.

 
Ranch Hand
Posts: 1071
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While I don't think this is something possible with the current forum software it would make sense to not allow smilies within code tags and/or have a tag such as [nosmiley] that leaves text within it alone.
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure how possible it is with the current software. There may be an option in our control panel - or I might be able to hack the code. Assuming it's possible: does this sound like a good idea to everyone? Personally I think it makes sense. I use smilies all the time, but I'm willing to have to toggle a checkbox on my posts in order to do so. I think there's probably more damage done to posts containing code which is now incorrectly interpreted as smilies, than there would be damage done to posts which try to use smilies, and they just get the individual ASCII characters. (Most of which are still understood as smilies by other humans, after all.) Is there a compelling reason not to make the default "no smilies" as William suggests?
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


does this sound like a good idea to everyone?


+1 vote.

The implications of adding etc. to a post seems to pass new users by completely as the site currently behaves. And most people seem to assume the implied promise of code tags for example is that they will preserve the original formatting. So its usually a surprise to see smilies where you expected a JDBC url.
 
Ernest Friedman-Hill
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sure would be nice if they could just be blocked inside code tags, though. I'm not a huge smiley user, but this would be an extra step when I did use one.

Here's a potentially radical idea: there are only a very few smilies that cause this problem:

;) :p

What if we gave them all a nose:

:-) :-( :-D ;-) :-p

Those never come up in Java code (although they're probably meaningful in Perl!)

Looking at the control panel, though, it seems that code-hacking would be required to do this; UBB won't let you change the text for these "built-in" smilies from the control panel.
 
Jim Yingst
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Changing the smilies is an interesting idea, but I'm guessing it would be too complex. The main problem is, how to get this to work with existing posts and new ones? The existing posts still have standard smilies like : ) (without the space of course). The UBB code that renders posts as HTML would have to decide whether to interpret a post using old or new rules. Might work if we just look at a timestamp. Or we could run some huge batch job that transforms all the old post files into a new format. Possible, but it's sounding rather icky to me.

I like the idea of simply turning off smilies inside [ code ] tags. Would require a little Perl hacking, but probably a lot less than other solutions, and I think it would be straightforward for our users.

Of course, there are a couple other things I should really tackle first. Like tracking down where our bulk e-mailer is getting those old addresses from... And some bonehead user managed to screw up his profile page somehow; need to look into that.
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Disabling them inside code tags is a great idea -- just wish more people would actually use the code tags.

Obviously this is a big issue for the JSP forum where phrases like <c:out> appear with great frequency.

Adding noses to the smiley codes is also a good idea -- you would think that there's a translation table somewhere, but I don't know how it was actually implemented.
 
author & internet detective
Posts: 41967
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree that giving the smilies a nose is a good idea. What I don't see is why you have to make it backward compatible? Old format smilies could just be written as plain text smilies. My real question with the smilies is how to people know to type them with a nose? I never actually click the instant graemlins button; smilies just appear when typing : ).

Either approach (noses or disabling in code tags) would certainly be an improvement over what we have now though.
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bear Bibeault:
Disabling them inside code tags is a great idea -- just wish more people would actually use the code tags.



I feel your pain.
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wonder if it's possible to write a script or something that automatically detects code and inserts code tags where needed (along with a scalding hot message to the poster about doing his own code tags in the future)
 
Bartender
Posts: 1205
22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ernest Friedman-Hill:

What if we gave them all a nose:

:-) :-( :-D ;-) :-p

Those never come up in Java code




How about this (contrived) example:


...would end up looking like...



(although they're probably meaningful in Perl!)



Ouch, I'd be insulted on behalf of all Perl users if this weren't true.

Ryan
[ April 07, 2005: Message edited by: Ryan McGuire ]
 
Bear Bibeault
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Very contrived, and unlikely to show up in real code. Point is, adding the "noses" would prevent 99% of the non-contrived cases where smilies show up unintentionally in code examples.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
but then a lot of the things posted here look quite contrived even if they're genuine attempts
 
Ryan McGuire
Bartender
Posts: 1205
22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bear Bibeault

Very contrived, and unlikely to show up in real code. Point is, adding the "noses" would prevent 99% of the non-contrived cases where smilies show up unintentionally in code examples.



Point is, why use any patterns that could possibly show up in valid code? (Or why expand smilies in a CODE block at all?)

Also, I disagree with your 99% estimate. The only difference between "colon p" and "colon negative p" in a chunk of code is the inclusion of a negative for the third term of a ?: expression. In the battle between "(p<0)?-p:p" and "(p>=0)?p:-p", I could definitely see the latter hapenning more than 1% of the time. In fact, if we use my code as a test case we're more likely to see the latter construct (including the lack of spaces), so adding minuses to smily patterns would actually make the problem worse (for that particular smily).

Ryan
[ April 08, 2005: Message edited by: Ryan McGuire ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Removing all smilies from within code blocks is going to be a lot more work (on a product that we don't maintain) whereas adding the nose is a small quick hack that can eliminate the vast majority of unintended smilies.

Sounds like a good start to me.
 
Jim Yingst
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I still prefer disabling smilies in code blocks. Many people will still omit code blocks, and their code will still look like crap. But that has little to do with smilies, and they can always add code tags later. Meanwhile there are other similar problems we could solve, like the fact that using the variable name i as an array index often gets interpreted as an italics tag. And < often creates problems. I don't want to create custom new syntaxes for these - they already exist, actually, but they're a pain to use. Disabling most forms of UBB interpretation inside code tags seems like a good approach here. Though there will probably be some problems with backwards compaptibility as alluded to earlier - but as Jeanne suggests, we can probably live with some mild goofiness in old posts.
[ April 08, 2005: Message edited by: Jim Yingst ]
 
Ernest Friedman-Hill
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ryan McGuire:
How about this (contrived) example



Wow, you've got a devious brain!

I admit that I forgot about the ternary operator in considering possible valid character sequences in Java. Hmm. Maybe a "." for a nose...

I think Jim's right, though -- there are other things that go wrong with code tags, and simply turning off UBBCode inside of them could potentially fix them all.
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I also vote for disabling smilies inside "code" tag. It would become effective to all previous posts as well. Like when we change our signatures, it changes to all our previous posts as well. Like the no of posts automatically updated in all the previous posts.

Moreover, we have to discourage the codes without code tag, indeed.
 
Jeanne Boyarsky
author & internet detective
Posts: 41967
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If we end up disabling smilies in code tags, can we do it for url tags as well. It doesn't come up as often, but just often enough to be mildly annoying.
 
Ranch Hand
Posts: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can't there be a simple javascript code,the moment I click on "CODE" button it would enable the checkbox of "Disable smilies in this post"

Or

We can check same before posting FORM if content contains any [CODE] tag then It would make checkbox value true so that smiley in same post are disabled. even this case would be better as it would handle [CODE] tag directly typed by keyboard

Shailesh
[ April 16, 2005: Message edited by: Shailesh Chandra ]
 
Jim Yingst
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[Jeanne]: If we end up disabling smilies in code tags, can we do it for url tags as well. It doesn't come up as often, but just often enough to be mildly annoying.

I'm not sure I know what you mean. Can you give an example?

[Shailesh]: Can't there be a simple javascript code,the moment I click on "CODE" button it would enable the checkbox of "Disable smilies in this post"

I suppose that sould be possible, but I'd prefer not to disable smilies outside of code tags for no reason. Moreover as discussed previously the problem is not just smilies; it includes other UBB markup as well. I wouldn't want to disable all markup outside code tags - but I think it does make sense to disable it within code tags.

The same reply applies to your second suggestion.
 
Shailesh Chandra
Ranch Hand
Posts: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

but I'd prefer not to disable smilies outside of code tags for no reason.



Point taken my thought was that If today I submit a post with code and if I want to disable smiley then I would select the checkbox to disable smile and that would also disable smiley outside of code tags for no reason

Shailesh
 
Jeanne Boyarsky
author & internet detective
Posts: 41967
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jim Yingst:
[Jeanne]: If we end up disabling smilies in code tags, can we do it for url tags as well. It doesn't come up as often, but just often enough to be mildly annoying.

I'm not sure I know what you mean. Can you give an example?



If I post this without disabling similies in the post, it displays as a bunch of text with a happy face (and not as a link)
[URL=http://www.google.com/search?q=javaranch&sourceid=mozilla-search&start=0&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US fficial]JavaRanch link from Google[/URL]
[ April 17, 2005: Message edited by: Jeanne Boyarsky ]
 
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's an idea: don't interpret a character sequence as a smiley if the sequence is immediately preceded or followed by another non-whitespace character. That's a lot easier than determining whether or not the characters are inside a certain kind of tag, and it would also work on naked URLs (naked code, too, come to think of it). And it shouldn't break the formatting of existing posts because the forum software has always padded smileys with spaces (of course, it wouldn't need to do that anymore). You might try it as an interim fix while you work on a more complete one (i.e., disabling other tags within CODE segments).
 
If you send is by car it's a shipment, but if by ship it's cargo. This tiny ad told me:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic