wood burning stoves*
The moose likes Meaningless Drivel and the fly likes code standards for smilies? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Other » Meaningless Drivel
Bookmark "code standards for smilies?" Watch "code standards for smilies?" New topic
Author

code standards for smilies?

Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8803
    
    5
I have a nagging suspicion that this might have been discussed a while back - but what the heck, it's MD.

If you're using smilies in an environment that, unlike JavaRanch, doesn't convert them (in other words a colon followed by a right paren doesn't turn into a yellow smiley face), how do you handle the situation when you want your smily inside a parenthetical clause?

Assume that "x)" is a smiley, what do you think of these?:

1 - What's the difference (wait for it x) ), between a duck?
2 - What's the difference (wait for it x)), between a duck?
3 - What's the difference [wait for it x)], between a duck?
4 - What's the difference (wait for it x), between a duck?
5 - What's the difference {wait for it x)}, between a duck?

Others?

(BTW, a well known wag recently commented "The baby Jesus cries when parens are unbalanced" )
[ February 22, 2008: Message edited by: Bert Bates ]

Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Gabriel Claramunt
Ranch Hand

Joined: May 26, 2007
Posts: 375
I usually go for option 1, but always with a feeling that something is not quite right


Gabriel
Software Surgeon
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60785
    
  65

1


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41124
    
  45
If the smiley actually contains a closing parenthesis -like :-) but unlike :-( - then I go for #4. Otherwise #1.


Ping & DNS - my free Android networking tools app
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

You mean  ?

option 1 for me.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11161
    
  16

There is a guy in my office who writes his smiles left-handed. For example"

(-;

this would eliminate the confusion when it comes at the end of a parenthetical:

What's the difference (wait for it (x ), between a duck?

however, it always throws me for a loop when i see it wherever it is.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30124
    
150

I try to avoid that situation altogether, so I don't have a personal standard. I usually do either #1 or #3 when I need to.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Option 2.

My logic is, why do we need extra space (or where it comes from) #1? Why to switch to angle bracket or curly braces #3 and #5? Where is closing parenthesis #4?

And why to think a simile is special. Let�s consider it text.
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

I used to do option 1 but now I prefer not to repeat characters (and do option 4 ;)


A good workman is known by his tools.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9947
    
161

Option 1


[My Blog] [JavaRanch Journal]
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
I'm a frequent user of both smilies and parentheses, but I'd consider just dropping the smilie when they intersect. Otherwise I would most commonly use

6 - What's the difference (wait for it), x) between a duck?

To be fair I usually am in an environment that does convert smilies to a graphic when I do that. But I would still prefer to move the smilie away from whatever punctuation is confusing the issue.


"I'm not back." - Bill Harding, Twister
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

option 7

What's the difference -- wait for it -- between a duck?


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8803
    
    5
I gotta say, in my book Michael scores with a big sideways leap
 
wood burning stoves
 
subject: code standards for smilies?
 
Similar Threads
Repopulating data on a page?
Some Questions
Ask & Read Questions to Think More
What does it mean by this smiley.....
Inheritance is a waste