need a code sample for bubble sort

M

Michael A. Covington

Am I "lazy" or am I rightly choosing to "avoid reinventing the wheel"?


OK, since you asked...

The crucial question is whether you are going to hide anything from your
teachers.

If you use other people's code, you must acknowledge it explicitly.

If you use other people's code without acknowledging it, it's what we call
academic dishonesty, and we expel students for doing such things. It may
also be a violation of copyright law.

So make 100% sure that your instructor knows where you got your code.
 
M

Mark Kamoski

Eric--

An, I see.

You are one of the "very important" people.

That statement reveals a lot.

You have chosen to offer nothing more than a "petty, better-than-you,
newsgroup bully flame".

That's fine and it seems to be where you wish to spend your energies.

And, as it is now clear, there's no point in continuing this conversation.

Take care.

--Mark


Just giving my opinion. Sorry if I judged you in haste, but I doubt that's
the case. You're wasting the time of some very important people who have
better things to do than your homework.

You didn't ask an academic question about C#, you specifically asked for
some measure of work to be done for you, simply because you're too lazy to
do it (or find it) yourself. The responsible people who come here with
questions have exhausted at least some amount of their own resources to
find
(or figure out) the problem for themselves.

Most of the responses in this list are in fact just a redirection to a
website, and most of the posts here have been answered a dozen times or
more. Your not trying to avoid reinventing the wheel, your asking someone
else to do it for you! Why should the people in this newsgroup rewrite the
Bubble Sort for you?

The answer to 99% of the questions posted here can be found in Google (via
the web or newsgroup posts themselves). I don't want to hear "maybe I can't
get to the Internet", because even my public library has free Internet
access (not too mention a few shelves packed full of programming books).

Imagine a world where people learned to figure out things for themselves by
leveraging the public knowledge that already exists (your only valid
point -
that this posting will serve as a beacon for the next lazy person who
enrolls in the same class you did):

bubble sort group:*csharp - I get 20 hits
http://groups.google.com/groups?as_...ie=UTF-8&oe=UTF-8&as_ugroup=*csharp&lr=&hl=en

bubble sort C# - I get 1650 hits
http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=bubble+sort+c#

This is a community site. I try to contribute to the list as much as
possible, even if it's just to help answer the brain-dead questions (from
people like you) that have been asked a million times. In return, I post
questions regarding problems that I encounter, without feeling
self-absorbed. What do you offer in return for the help given to you?
Nothing!

You got a few things right:

1. I'm angry. I have posted a few questions to real world problems in the
last couple of weeks, the answers to which are not readily available
anywhere else (I know because I took the time to look for myself). It seems
that people are too busy answering your lame questions to help me!

2. C# is the place to be.

-Eric
 
E

Eric Cadwell

No, I'm not one of the important people. The important people have "MVP" or
"Microsoft" next to their names. I'm in need of help from such important
people. In return, I offer as much help as I can. That's called being humble
and grateful for the support extended to me.

I thought I made that clear? You obviously missed the point.

I also don't think I posted a "bully flame." I just expressed my opinion on
a matter that you offered for feedback. You have made far more judgment
against me for simply being honest with you. It's not my fault that you have
trouble accepting criticism.

Maybe the truth hurts? For that I am sorry.

-Eric
 
E

Empire City

No, I'm not one of the important people. The important people have "MVP"
or
"Microsoft" next to their names. I'm in need of help from such important

Hmmm, that's going to leave you open to criticism that you've affected by
corporate brainwashing. Take my word for it, you are important. We all are.
against me for simply being honest with you. It's not my fault that you have
trouble accepting criticism.

I would not worry about what other people do. Concentrate on what you want
to do. But yes defend yourself after much thought.

At any rate, I'd like to see a bubble sort sample in C# code also.
 
E

Empire City

Typeo: I meant 'been affected' not 'affected'. I think I've been affected by
too many trips to Starbucks.
 
E

Eric Cadwell

At any rate, I'd like to see a bubble sort sample in C# code also.

I agree, in fact, I'd like to see Mark's research after he's done, sounds
like a hell of a topic of which I now very little about. I'm sure he'll come
up with valuable results, and I'll be the first to admit that maybe I'm too
lazy to do for myself!
corporate brainwashing?

You betcha!

Unfortunately, I'm standing in line patiently waiting for my glass of
Kool-Aid, because I'm 100% sure that some of my questions can only be
answered by the writers of the gospel - the CLR team.

For that matter, I've already had my shot of Kool-Aid compliments of .NET
and I'm stading here waiting for it to hit me! The 1.0 framework appears to
have some significant issues and we were supposed to have rolled a
enterprise 1.0-based app today. It's way too late to move to 1.1 now.

-Eric
 
S

Stu Smith

Afterall, if you are trying to argue that asking for a code sample of a
particular algorithm written in C# is off-topic in a newsgroup called
"microsoft.public.dotnet.languages.csharp", then there is no point in
continuing this conversation.

It IS off-topic.

This newgroups should be for questions regarding the C# language, not
algorithms written in it, not apps written in it, not help with the
framework.

The language ONLY.

Just becuase this NG is full of people asking off-topic questions doesn't
mean it's OK.

A better place to ask would be m.p.dotnet.general.

It's annoying that these newsgroups aren't moderated, I'm fed up with
trawling through off-topic posts in the hope of coming across some real
questions.

Another address for the kill-file I suppose....
 
M

Mark Kamoski

Stu--

The question...

"How can one write X in C#?"

....IS about the language.

In fact, it cannot be MORE about the language.

Furthermore, questions about specific algorithms written in C# are even
more divorced from tertiary subject matter-- again, emphasizing the
question's focus on using C# to implement a particular, generic, abstract
process, relative to no other context than the implementation using C# in
DotNet.

For example, it is straightforward to write InsertionSort in
English-pseudocode. It is, however, quite another thing to write it in C#.
This requires a particular knowledge of the language C#. And so on.

As to your suggestion about the dotnet.general group, it too is a mistaken.

As stated, my question is NOT about DotNet "in general". In fact, it is
VERY specific. It is about C# in DotNet. Not about DotNet in general, or
about ANY language in DotNet. It is ONLY about C#. That is, it IS about C#,
(in specific), and could hardly be made to be about C# any more than it
already is.

Therefore, it is not clear what you have in mind as an "on topic" post. If
one takes what you say literally and at face value, then this newsgroup
would be some sort of analysis from the perspective of a meta-languague,
reflecting upon C# in some way. Clearly it is not, as evidenced by the
posts here.

As the name states, this is obviously a "public" newsgroup about "dotnet",
particularly about a "language" within this context, namely "csharp". This
is a simply application of the use of the English language-- academic, if
not obvious.

Therefore, a question about how to write a particular algorithm, using the
language of csharp in dotnet IS on topic by a one-to-one mapping. If not,
then the group is not named correctly, which is a useless thing to
consider.

That's about it.

Regarding you "k*** file", that decision is yours.

I state all of this in reply to your post and, while I did say directly to
another poster...
if you are trying to argue that asking for a code sample of a
particular algorithm written in C# is off-topic in a newsgroup called
"microsoft.public.dotnet.languages.csharp", then there is no point in
continuing this conversation.

...., the same applies to your remarks. Why? Well, simply because they will
then be "off topic" relative to any sort of "reasonable analysis" because
it simply does not coincide with the use of the English language.
Furthermore, while we are on the topic of being "off topic", there is
certainly no point in perpetuating dialog with those who wish to
participate in another tangent of silly newsgroup flames.

If, however, you wish to discuss this matter rationally and reasonably,
with the standard application of the English language, then I welcome such
dialog.

Take care.

--Mark


Stu Smith said:
Afterall, if you are trying to argue that asking for a code sample of a
particular algorithm written in C# is off-topic in a newsgroup called
"microsoft.public.dotnet.languages.csharp", then there is no point in
continuing this conversation.

It IS off-topic.

This newgroups should be for questions regarding the C# language, not
algorithms written in it, not apps written in it, not help with the
framework.

The language ONLY.

Just becuase this NG is full of people asking off-topic questions doesn't
mean it's OK.

A better place to ask would be m.p.dotnet.general.

It's annoying that these newsgroups aren't moderated, I'm fed up with
trawling through off-topic posts in the hope of coming across some real
questions.

Another address for the kill-file I suppose....
 
D

Daniel Billingsley

That has to be the most ridiculous thing I've read in any NG ever. Oh man,
I can't stop laughing.
 
R

Robert Wilkens

While I agree that it is a bit ridiculous, the person asking for the bubble
sort was probably a college kid looking to cheat, and I don't think any of
us should be condoning that.

-Rob
 
D

Daniel Billingsley

I wasn't commenting on the OP, only on the statement that a newsgroup about
a language should not discuss algorithms written in it.
 
S

Stu Smith

Alright I was having a bad day, but don't you ever get frustrated that this
ng just fills up with basically rubbish?
It should be for discussing the language (and yes I suppose that applies to
algorithms)... but it shouldn't be a forum for "how do I do sorting?" (fair
enough, "what's the most optimal/elegant/whatever sorting algorithm in C#"
maybe, I could have been a bit clearer).

As an example about the sort of things that annoy me, at the top of my list
I have (on this ng):

My NT Services crash at startup
Best method to parse XML
DataGrid column delete question
How to implement move next etc in datagrid

All valid questions, but not here... the low signal-to-noise ratio is
getting me.

I admit I could have phrased my rant a little better. I hope you see what I
meant (and not what I actually wrote, which on today's reading was slightly
ridiculous).

Since I can't explain in words what I thought this ng was about, I'll give
some examples of posts which seem to fit the bill (took rather more
searching this one):

Quick way to toggle a bit
Idea for furture version of C#...
C# generics: is it possible...

Just frustrating that the on-topic questions are there, but you have to wade
through a sea of rubbish.

Stu
 
E

Empire City

It should be for discussing the language (and yes I suppose that applies
to

Yes, but people who contribute regularly can be cut some slack. Here's a
different group that has some reasonable guidlines for posting:

http://www.wwwac.org/ Look at the guidlines link on the bottom left.

A bit of entertainment boosts productivity, in my opinion.
My NT Services crash at startup

Upgrade to W2K server.
Best method to parse XML
DataGrid column delete question
How to implement move next etc in datagrid
All valid questions, but not here... the low signal-to-noise ratio is
getting me.

How many people read this list regularly? Most of the above types of
questions go unanswered and RTM applies. There are a lot of beginners from
what I see. It's a community of basically smart programmer type people and
reflects real life.
Just frustrating that the on-topic questions are there, but you have to wade
through a sea of rubbish.

It is a bit noisy but beginners have to start somewhere. I hope my bubble
doesn't burst. We all like bubbles and it would be nice if whoever posted
that question could come up with some elegant code complely violating the
'no algorithm' rule. Maybe he'll avoid selective prosceution then.

Just as a side note on my /r thingy mee gig question. Thanks for the replies
as that basically helped for what I wanted. My real question was however
what is the formal name of these things and where is the documentation?

\' Single quote
\" Double quote
\\ Backslash
\0 Null
\a Alert / Bell
\b Backspace
\f Form feed
\n New line
\r Carriage return
\t Horizontal tab
\v Vertical tab
 
J

Jon Skeet [C# MVP]

Just as a side note on my /r thingy mee gig question. Thanks for the replies
as that basically helped for what I wanted. My real question was however
what is the formal name of these things and where is the documentation?

They're called escape sequences, and they're listed in section 9.4.4.4
of the C# ECMA spec, "character literals".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top