wood burning stoves*
The moose likes Ranch Office and the fly likes Using real words (Was: Finding Nth Largest element of an array without sorting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » This Site » Ranch Office
Bookmark "Using real words (Was: Finding Nth Largest element of an array without sorting" Watch "Using real words (Was: Finding Nth Largest element of an array without sorting" New topic
Author

Using real words (Was: Finding Nth Largest element of an array without sorting

Amarbir Singh
Greenhorn

Joined: Jun 26, 2007
Posts: 20
[ Jim Yingst here - this was originally posted here, but a side discussion about using real words arose which was distracting from the main topic. I've tried to separate out the posts related to this topic, and put them here in the JavaRanch forum. - Jim ]

dear frnz...

I need help I am not able to figure out a generic code for finding nth largest element of an array without sorting it.
[ July 20, 2007: Message edited by: Jim Yingst ]
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Hi, welcome to the Ranch.

I don't know what a 'frnz' is, but this sounds like a homework assignment and you haven't specified whether the solution must be Java. Also, not being allowed to sort is a strange requirement. Care to explain?
Amarbir Singh
Greenhorn

Joined: Jun 26, 2007
Posts: 20
Dear David,
frnz means friends.... sorry for not being descriptive...!

[ Various other stuff deleted, as it relates to the original question - Jim ]
[ July 20, 2007: Message edited by: Jim Yingst ]
Ashok Mor
Ranch Hand

Joined: Jul 17, 2007
Posts: 44
Hi AmarbirGSP Khokhar,

Please run this demo.............U should give nth value for out side as a coomand line......... like "Java NthLargest 4"

[ more deleted - Jim ]
[ July 20, 2007: Message edited by: Jim Yingst ]
Anand Hariharan
Rancher

Joined: Aug 22, 2006
Posts: 257

[ more deleted - Jim ]

FWIW, the algorithm is indeed linear, but the constant factor is so large that unless you have more than say 66,000 elements in your array, you might just as well (or better) off using a sort.

HTH,
- Anand
[ July 20, 2007: Message edited by: Jim Yingst ]

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- Antoine de Saint-Exupery
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Everybody, Please UseRealWords!

I was trying to hint this with my initial 'frnz' remark, but 'R', 'FWIW', 'HTH' and all of the rest of them make posts harder to read. Please err on the side of legibility.

Dave
Anand Hariharan
Rancher

Joined: Aug 22, 2006
Posts: 257

[
Originally posted by David O'Meara:
Everybody, Please UseRealWords!

I was trying to hint this with my initial 'frnz' remark, but 'R', 'FWIW', 'HTH' and all of the rest of them make posts harder to read. Please err on the side of legibility.

Dave


Huh?

There is a sharp distinction between -



- and -


FWIW, the algorithm is indeed linear, but the constant factor is so large that unless you have more than say 66,000 elements in your array, you might just as well (or better) off using a sort.


There isn't anything in UseRealWords that prohibits what I wrote.

Further, I would write exactly what I wrote (notwithstanding the grammatical error in writing "might" where "are" would have been appropriate) in the Usenet (a richer and more diverse medium), without violating any netiquette guideline. So my conscience is clear.

I appreciate what the Bartenders, Sheriffs and "Swagmen" do, and I really wish we don't cross the line from being helpful to being sanctimonious.

respectfully,
- Anand Hariharan
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

OK.

Can we agree that while not in the same league as SMS and 'leet speak', 'FWIW' could cause problems for someone that doesn't have English as their first language?
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

OK.

Can we agree that while not in the same league as SMS and 'leet speak', 'FWIW' could cause problems for someone that doesn't have English as their first language?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Originally posted by David O'Meara:
Can we agree that while not in the same league as SMS and 'leet speak', 'FWIW' could cause problems for someone that doesn't have English as their first language?
In My Humble Opinion, I believe it could.

fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11257
    
  16

There isn't anything in UseRealWords that prohibits what I wrote.
There's very little that prohibits much of anything here. except our cardinal rule, "Be Nice". Spelling out real words and not using "FWIW" or "HTH" is nice to people who don't have English as their primary language.

Heck, it's nice to people who DO have English as their primary language.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Anand Hariharan
Rancher

Joined: Aug 22, 2006
Posts: 257

Originally posted by David O'Meara:
OK.

Can we agree that while not in the same league as SMS and 'leet speak', 'FWIW' could cause problems for someone that doesn't have English as their first language?


English is not my first language. BTW, what is SMS?

- Anand
Anand Hariharan
Rancher

Joined: Aug 22, 2006
Posts: 257

Originally posted by Fred Rosenberger:
There's very little that prohibits much of anything here. except our cardinal rule, "Be Nice". Spelling out real words and not using "FWIW" or "HTH" is nice to people who don't have English as their primary language.

Heck, it's nice to people who DO have English as their primary language.



I suppose using pseudo-profanity and restricting screaming to a single word upholds the cardinal rule?

Do you really expect me to believe that you use "id est" and "exempli gratia"?

English is not my primary language, so unless you want points for irony here, I consider it a specious argument.

Nice to see the bastion show solidarity, but I really doubt that my first post in this thread would have elicited the same response had my name been John Smith or George Bush.
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
You know, Anand, you have some potentially valid points there, but you're losing a massive amount of credibility by trying to imply some sort of racism or nationalism where none has been shown. Further, inserting another "BTW" just to demonstrate defiance is hardly a good way to have a productive conversation about this topic. And referring to the capitalized word "DO" as "screaming" is patently absurd. If you want to be taken seriously in your concerns, I suggest you reevaluate your tactics.


"I'm not back." - Bill Harding, Twister
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10069
    
163

Originally posted by Anand Hariharan:
but I really doubt that my first post in this thread would have elicited the same response had my name been John Smith or George Bush.


I bet, it definitely would have. Its the same rules for everyone here at JavaRanch.


[My Blog] [JavaRanch Journal]
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Ouch, make a post and go to bed and see what happens.

The point of my post was that abbreviations (FWIW) and contractions (r, ur, yr) are different but can both serve to make posts harder to read. Personally I prefer to err on the side of legibility (I said that in the original post too).

You can always find something to be offended about if you go looking for it. I'm upset that what was intended as an olive branch was taken or interpreted as a personal comment rather than considering that the icon ' ' may have been included deliberately

Furthermore:
* Your display name didn't factor into my post at all.
* With respect to not having English as a first language, my impression was that it was either your first language or that your level of proficiency (evident in your post) made the distinction meaningless in your case.
* I was directing my request to 'UseRealWords' specifically to the post above mine in the original thread which used 'u', 'r' and the like and generally to the threads above that. Your post was the one above that one so I was able to cut and paste 'FWIW' at the same time. That post was subsequently deleted and changed after the fact. This confusion may have been prevented by quoting the previous text, but I wanted to refer to that post, not target it.

So in conclusion I was saddened by your response, but hopefully you now understand my approach on the situation. I have a belief that the use of real words improve the access of the forum, but I am not prepared to be the flag-bearer. If you would like a final reply I welcome your opinion, but hopefully I have said enough to represent my feelings about the matter.
[ July 20, 2007: Message edited by: David O'Meara ]
Anand Hariharan
Rancher

Joined: Aug 22, 2006
Posts: 257

Sincere thanks for your post, David.

The point in my rants was that it is extremely easy to pick on someone
(just as Jim Yingst observed in his critique of my rants). As a
recognised member who enjoys certain privileges accorded of this forum,
it is important that you discriminate between justified criticism and
picking on another poster. While I didn't quite understand your
explanation of how your post came to be immediately below mine, I did
believe you targetted my post.

My post was meant to help the original poster. Your response was not a
technical correction of my post; rather it put my writing in the league
of other posts whose style I personally find as irksome.

Like I said earlier, I believe standard abbreviations such as IMHO, IIRC
et cetera are common enough to be considered Internet vernacular. They
very usually are just stock phrases. In fact, I contend that they do not
detract from the post's essence; rather they aid the reader since they
are parts of a sentence that one can skip over without losing track
of what the sentence is about.

respectfully,
- Anand
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Anand Hariharan:
Like I said earlier, I believe standard abbreviations such as IMHO, IIRC
et cetera are common enough to be considered Internet vernacular.


You are absolutely right that it would have been perfect behavior in usenet, a huge number of mailing lists and online forums, etc. pp.

I know a lot of people who feel repelled by those forums, though - and I know of at least a few for whom the arcane language plays a part in that. Personally, I would like those people to feel at home at JavaRanch - especially in the beginner's forum.

So, while personally I find those abbreviations to be quite convenient, both when reading and writing, I try to remember that not everyone feels that way. If I'm able, by just typing a few more characters, to make my posts more accessible to a significant part of our target audience - greenhorns - I'm willing to pay that price. But that's just me...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
[Dom]: Ouch, make a post and go to bed and see what happens.

Damn Aussies, always sleeping during the daytime. How do you guys get any work done?

[DOM]: I was directing my request to 'UseRealWords' specifically to the post above mine in the original thread which used 'u', 'r' and the like and generally to the threads above that. Your post was the one above that one so I was able to cut and paste 'FWIW' at the same time. That post was subsequently deleted and changed after the fact. This confusion may have been prevented by quoting the previous text, but I wanted to refer to that post, not target it.

Ah, that's illuminating. By the time I read the thread, the other post that used "r" was gone entirely (as I recall), and it looked like you were replying to Anand in particular. Which seemed like a bit of an overreaction, I thought, but somewhat understandable since you had already hinted more subtly at the idea of using real words. Yes, some abbreviations like FWIW, IMHO and others are relatively more recognizable to the particular subcommunity of native- or seems-like-native- English-speakers who have been on the internet for awhile. But to be fair, those who don't know English quite as well (and there are many of these here at JavaRanch) can't easily tell the difference. So a general plea to everyone to try to avoid nonstandard abbreviations & slang seems fairly sensible to me. It's unfortunate that, thanks to a subsequent deletion, DOM's post seems to have been perceived as primarily directed at one person who was at most a secondary or tertiary target of the original post.

Further ruminations...

I think most of use tend to notice slang and abbreviations that we're not familiar with ("what the @#$% does THAT mean?"), and overlook slang and abbreviations that we know well. Things like FWIW and IIRC are very easily recognizable to me, and to Anand, and probably to DOM and others as well. But maybe not to those for whom English is still... new and uncertain. (Some people may know English as their second, third, fourth or fifth language and speak is flawlessly. Others still struggle with it, whether it's their second language or fifth.) I think all of us should at least try to make ourselves easily understood to the widest group of people we can manage. We may sometimes fail in that regard. That's natural. If someone lets us know if we're not clear enough, we can try to correct it.

[Anand]: Like I said earlier, I believe standard abbreviations such as IMHO, IIRC et cetera are common enough to be considered Internet vernacular.

Personally, I tend to agree. However I still try to avoid them when posting in any group not known to to be 100% native English-speaking longtime internet users - or close to that. Various other groups may consider "pwned d00dz!" or "plz hlp me UGENT!!!" to be "common internet vernacular", and it's hard to write a general policy that communicates why "FWIW" is considered acceptable while "d00dz" is not. We could try "use standard English" - but we're based in America, so that issue gets murky. Instead we try "use real words" - an issue which is still somewhat murky, but (we hope) less so. Whatever else that phrase might mean to you - please try to avoid words and phrases which may well be misunderstood by people with different backgrounds. That's the intent, anyway.

Now that I've written the above, I see that Ilja has just said most of what I wanted to, in far fewer words. The b@$+@rd. Anyway, these are my thoughts; I hope they help. Cheers...
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
Interesting subject, and I shouldn't reply, ah well.... (Saturday night, couple of Chardonnays)

@Anand Hariharan
JavaRanch is heavily moderated, usenet is not.

If the bartenders/sheriffs disagree with you, then you are wrong.
The only time the bartenders/sheriffs are wrong is when 'I like pies' says so.
You may not agree with this, but it is a fact of life. If you're not happy
with this, move on, JavaRanch will survive.

To a certain degree this mirrors real life (your boss is always right, your
wife is always right etc).

I've had disagreements with bartenders/sheriffs over some of my posts,
but the fact I was totally justified (in my honest opinion) is irrelevant
to the fact that to continue participating in JavaRanch forums (somewhat freely),
I have to abide by the rules set.

I accept this situation, because, like the vast majority of JavaRanch posters,
I get far more out of JavaRanch than I could ever hope to put back in.

[EDIT]
forgot to add
and JavaRanch works very well the way it is.
[ July 21, 2007: Message edited by: Michael Dunn ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Another thing that hasn't been mentioned is that a lot of people rely on language translation software for access to the ranch.
The abbreviations mentioned above sometimes do not get interpreted correctly by these programs.

We try to keep JavaRanch as accessible as possible, especially in the technical forums and particularly in the beginners forums.
Giving up some of the minor convenience that non standard abbreviations provide can sometimes go a long way toward helping us with that goal.

Thank you for your understanding.
-Ben


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20545
    ∞

(royal trumpets sound track go here)

(cheering crowd sound track goes here)

(announcer guy says over the cheering crowd "His ever growing pulchritude ... Mr. Large and In Charge .... The Ever Iterative ... The Owner of JavaRanch ... The Trailboss himself ... shares his everlasting wisdom ...")

(cheering crowd sound track is louder)

(more cheers)

(slowly quiet the cheering crowd)

Ahem ....

I don't like that 'U' and 'R' stuff. Or stuff like "frnz". Don't do it.

(hysterical cheering crowd sound track goes here)

PIE FOR EVERYBODY!

(hysterical cheering crowd sound track goes here - louder)

.

.

.

I'm glad we got this worked out. What's next?

.


-----------------

Power corrupts. Absolute power corrupts absolutely is kinda neat.
[ July 21, 2007: Message edited by: Paul Wheaton ]

permaculture Wood Burning Stoves 2.0 - 4-DVD set
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

This is quite interesting to see the opinions and point of views of individuals with respect to maintain the decorum.

First of all, i felt sorry to have used the term 'HtH' in almost many of my posts to mean 'Hope this helps!' - which infact i learnt it in Javaranch from some of the rancher's post. Now after going through this thread, i feel to have contradicted myself when i also had pointed out some newbies for using some words like 'na', 'please' etc. (replace the characters 'ease' with 'z' here since it did not allow me to post with the actual 'z' here :eek

Hereafter, i will never do this mistake! Thanks David for pointing this out especially by quoting the term 'hth'.


Originally posted by Michael Dunn:
You may not agree with this, but it is a fact of life. If you're not happy with this, move on, JavaRanch will survive.


Michael, i very well agree with the first part of your sentence. Well said. But i feel the second part seems like you are deviating from the same JavaRanch's manners "Be Nice". Don't you feel so? Is this the way to respond to an individual? I could see David had been very patiently replying several times but still retaining the dignity.

I do understand that anand has been politely putting his views as a reply to the bartenders/moderators/sheriffs whoever tried to express their views but inturn some of them are agreeable as Jim Yingst did. Being such case, i dont think the second statement in your reply helps in resolving the conflict.

Wanted to express my point of view here.

@Anand,
Being in a common place like this where you see people from many different geographical locations, at times it may be difficult to interpret the real intention of the person who replies if the readers don't follow the terms/phrases/codewords etc.

I think you have expressed yourself enough but dont seem to agree and accept the fact. Keeping the above said points in mind, i think just to be compliant with the common discipline set and followed by the moderators will not make any harm. Is that makes some sense? Hope so.

Precisely, "Be a Roman when you are in Rome!"


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Anand Hariharan
Rancher

Joined: Aug 22, 2006
Posts: 257

Thanks for your post, Raghavan.

Just want to say that Mike's post was addressed to me, and I did not take amiss in anything that he said.

sincerely,
- Anand Hariharan
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
>> You may not agree with this, but it is a fact of life. If you're not happy
>> with this, move on, JavaRanch will survive.

> But i feel the second part seems like you are deviating from the same
> JavaRanch's manners "Be Nice". Don't you feel so? Is this the way to
> respond to an individual?

actually it was nice, in an abstract way. To encourage him to continue
arguing his point would be the 'not nice' position.

My post was intended to point out that Javaranch is a 'black and white' forum,
there are very few gray areas. Either you are right about an issue (and it
will be addressed in the first reply), or you are wrong and nothing will
ever change (again, Javaranch works well this way)
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20545
    ∞

There have been times that people have made suggestions and I have changed my general approach. Generally, these good people have taken the time to understand why things are they way they are, and have thought of a lovely enhancement.

Far more often, people that really don't know much about why we do things a particular way come to this forum and tell me that I am doing things all wrong. I must immediately stop and do everything their way. Anything less than that is unacceptable. Those folks usually end up feeling frustrated.

I think the staff does a great job here. Without pay, they come back day after day and keep doing a great job. Most folks react really well to the moderation and like it. A few get their knickers in a twist - but most of those eventually understand the flow of things and all is well. I think this is one of those cases. Knickers were twisted. Explanations were made. All is well.
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Thats fine.

Thanks Anand, Michael and Paul.
Jinny Morris
Ranch Hand

Joined: Apr 29, 2007
Posts: 101
Moderators, thank you!

I am a native English speaker (at least, if you think "American" is equivalent to "English"!). So I can usually figure out items like "u" and "frnz". On the other hand, I did not grow up on the internet - and I am still wondering what "FWIW" means - along with all the other capitalized abbreviations that have appeared in this thread. (Is there an internet glossary somewhere?) Fortunately, I can usually get the sense of what's being said without them - but it's not only non-native speakers who are left in the dark by the posts you pointed out!
Jan-Jaap van Nieuwkerk
Greenhorn

Joined: Jul 03, 2006
Posts: 11
Originally posted by Jinny Morris:
On the other hand, I did not grow up on the internet - and I am still wondering what "FWIW" means - [/QB]


In My Humble Opinion (IMHO) they mean FWIW = "For what It's Worth" and BTW = "By The Way".

You could alway study this list http://en.wikipedia.org/wiki/List_of_Internet_slang_phrases
[ August 02, 2007: Message edited by: Jan-Jaap van Nieuwkerk ]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Jan-Jaap van Nieuwkerk:

You could alway study this list http://en.wikipedia.org/wiki/List_of_Internet_slang_phrases


http://www.acronymfinder.com can also be quite helpful (and sometimes funny... )
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Using real words (Was: Finding Nth Largest element of an array without sorting