[ANN] celsoft.com/Battery 0.1.1

M

Mark Hubbart

Even Nathaniel himself admitted the decision to order tests
alphabetically was
an arbitrary one.

I'm sorry to say, but I think Nathaniel is wrong about that :) I'd like
to think that he was just being nice and conceding a point that he felt
was perhaps *close enough* to the truth not to have to argue over it.

But it remains that you called the alphabetical ordering (and the
decision to use it) arbitrary. Arbitrariness, by definition, requires
either randomness or capriciousness. I think this is not supported by
evidence. as for the ordering itself being either random or capricious,
well, that's silly. It may not be the ordering you expect, but it
*certainly* isn't random. As for the decision: If it were my software
library, I would feel insulted were someone to call my decision
capricious, if I had put some time into working it out. And telling
someone that their decision was random, when it involves a project that
they built, and they probably care about deeply and are proud of, seems
very rude. Calling the ordering arbitrary was okay, since you didn't
know better at the time; but calling his *decision* arbitrary was
uncalled for.

Having the option to order tests is good. Having multiple output
formats is good. I suspect that both of those will end up being
absorbed by the Test::Unit framework, and your project will have done
it's job, contributing to the quality and flexibility of Ruby's
libraries. If they aren't added, I suspect you will flesh out your
framework to be as feature-rich as the official one. And that will be
good too. :)
Accuracy is 100%. Annoyance at having this discussion is somewhere
above that.

Diplomacy goes a long ways toward avoiding unwanted flame wars.

--Mark
 
T

Tom Copeland

No, the * character is often use for emphasis, and it's his prerogative.
Arbitrary is not an accurate way to describe his use of that character.

Touche!

Tom
 
S

Sean O'Dell

On Jun 14, 2004, at 9:35 AM, Sean O'Dell wrote:

But it remains that you called the alphabetical ordering (and the
decision to use it) arbitrary. Arbitrariness, by definition, requires
either randomness or capriciousness. I think this is not supported by
evidence. as for the ordering itself being either random or capricious,
well, that's silly. It may not be the ordering you expect, but it
*certainly* isn't random. As for the decision: If it were my software
library, I would feel insulted were someone to call my decision
capricious, if I had put some time into working it out. And telling
someone that their decision was random, when it involves a project that
they built, and they probably care about deeply and are proud of, seems
very rude. Calling the ordering arbitrary was okay, since you didn't
know better at the time; but calling his *decision* arbitrary was
uncalled for.

That's not the precise meaning of the word, but Nathaniel did admit to it, and
I never meant to insult Nathaniel. I removed the word from all docs the very
second someone mentioned that it appeared insulting. Also, I never directly
applied the word "arbitrary" to Test/Unit; people just made the association
themselves because, well, Test/Unit really did run tests according to how
Ruby listed them, which seemed random to me, but I'm not sure; I couldn't
find a pattern to them. I think just sort of knew I must be talking about
Test/Unit. I didn't realize there was just one main test framework for Ruby
and people would naturally come to that conclusion. When I did though, I
removed the word.
Having the option to order tests is good. Having multiple output
formats is good. I suspect that both of those will end up being
absorbed by the Test::Unit framework, and your project will have done
it's job, contributing to the quality and flexibility of Ruby's
libraries. If they aren't added, I suspect you will flesh out your
framework to be as feature-rich as the official one. And that will be
good too. :)

I'll be on it, that's for sure. I got sick, a long time ago, of asking for
things and getting a lot of heat for it so these days, when possible, I will
just implement what I need myself and if I have time, release it publicly.
Diplomacy goes a long ways toward avoiding unwanted flame wars.

It's hard to be diplomatic when you are absolutely unable to accept any less
than what you are asking for. I absolutely could not accept answers like
"you don't need that" or "I don't think that fits my API" or "that
un-Ruby-like." I absolutely need interfaces, I absolutely need control over
the run order of my tests. I absolutely need a lot of things, and mostly I
implement them myself and I'm happy with the results. I only ever mentioned
interfaces here because I felt it was something Ruby should provide, not be
something custom-implemented (although my own custom implementation works
like gangbusters). I went on with Battery because I mentioned it once in the
yaml mailing list, and someone thought it was a terrific idea to have YAML
output, so I released it publicly.

I absolutely could not accept less than what I implemented myself. Diplomacy
is tough to have when you simply don't have the room to compromise on some
things.

Sean O'Dell
 
Z

Zach Dennis

If you are going to have democracies and diplomacies can someone please
start a lobby group for this subject. That always seems to change minds ;)

Zach
 
S

Sean O'Dell

If you are going to have democracies and diplomacies can someone please
start a lobby group for this subject. That always seems to change minds ;)

Competition is a good motivator too. It has the side-effect of nullifying
cacophonies of nay-saying. Just implement what you need, and use it and let
the others grab your ideas and you will either have a project that grows in
popularity for being the only one that can do something, or the work is taken
off your hands by someone else who takes the idea. It's a win/win for
absolutely everyone.

Sean O'Dell
 
J

James Britt

Tom said:
James, you arbitrarily picked the * character for emphasis. I shall
provide a patch that uses the _far_ superior _ character.

Oh, man, I can't _wait_ (see? patch applied!) for the ruby-irony and
ruby-sarcasm mailing lists.

But only if we can mirror them to ... Oh, wait, that's another thread.



James
 
M

Mark Hubbart

I absolutely could not accept less than what I implemented myself.
Diplomacy
is tough to have when you simply don't have the room to compromise on
some
things.

I think I probably wasn't clear what I meant by diplomacy. I didn't
mean your software should be diplomatic; it shouldn't. It should do
exactly what you want it to, and you don't even need *me* telling you
that. I was suggesting that perhaps your replies were somewhat
incendiary, and could easily have been considered rude by some people.

You could have said that alphabetic ordering was not flexible enough
for you, instead you kept insisting that it was arbitrary, a criticism
which some people found rude. According to my dictionary[1], arbitrary
equates to either rashness, randomness, or carelessness.

By diplomacy, I meant "We all have good ideas, but I prefer mine",
rather than "I came up with my idea because John Doe's idea was
flawed". Which is how your statements might be read.

--Mark

[1] arbitrary: adj. not bound by rules: despotic, absolute: capricious:
arising from accident rather than from rule. -- Chambers 20th Century
Dictionary
 
G

Gavin Sinclair

Would you say that the ordering of the words in a dictionary is
arbitrary?

No because that ordering makes sense to Sean. Anything *else* would
be, by definition, arbitrary.

Gavin
 
S

Sean O'Dell

I absolutely could not accept less than what I implemented myself.
Diplomacy
is tough to have when you simply don't have the room to compromise on
some
things.

I think I probably wasn't clear what I meant by diplomacy. I didn't
mean your software should be diplomatic; it shouldn't. It should do
exactly what you want it to, and you don't even need *me* telling you
that. I was suggesting that perhaps your replies were somewhat
incendiary, and could easily have been considered rude by some people.

You could have said that alphabetic ordering was not flexible enough
for you, instead you kept insisting that it was arbitrary, a criticism
which some people found rude. According to my dictionary[1], arbitrary
equates to either rashness, randomness, or carelessness.

By diplomacy, I meant "We all have good ideas, but I prefer mine",
rather than "I came up with my idea because John Doe's idea was
flawed". Which is how your statements might be read.

No, I actually used the word arbitrary with no malicious intent, and then
people picked up on it's use and started berated me for it. I haven't been
incendiary, quite the opposite. Many people have been incendiary towards me
over the word "arbitrary" in my docs, and in response I have tried to remain
cool and explain the reason for using the word very calmly. When it became
apparent that I wouldn't back down from the usage, people got very, very
irritated (people often get irritated when you don't bend to their will).

I stand by my usage of the word, though I removed it because my intent truly
was not to cause any hurt feelings. It was just the most appropriate word
for my viewpoint on being forced to use alphabetic order.

Sean O'Dell
 
S

Sean O'Dell

No because that ordering makes sense to Sean. Anything *else* would
be, by definition, arbitrary.

Close, but not quite right. It makes sense to most people, including me.

Sean O'Dell
 
G

Gregory Millam

Received: Tue, 15 Jun 2004 06:59:36 +0900
Close, but not quite right. It makes sense to most people, including me.

Sean O'Dell


Arbitrary does not mean 'bad,' 'random' or 'senseless.' - It literally means 'because I said so.'

It has evolved to mean 'somebody else's choice' - or simply 'out of my control' from the programmer's perspective.

As for the dictionary:
Long, long ago, somebody said, "I'll make the alphabet in this order: 'a, b, c ...". And that was arbitrary. Then Webster thought he'd kill language evolution and said, "I'll write a dictionary! And the words will be in alphabetical order" - That was arbitrary. But you can bet it'd outsell a dictionary with words placed at random, simply because everyone by then believe that "a, b, c" was the natural order of the alphabet. Good business sense, but it's still arbitrary.

Unless there are rules that state "XYZ must be ordered alphabetically," then ordering XYZ alphabetically is arbitrary. But then, unless there's something that says, "XYZ must be ordered the way Sean wants it to be," then everything's arbitrary - But your choice is still arbitrary.

At least, that's my arbitrary definition of arbitrary.

This reply written arbitrarily.

- Walker
 
S

Sean O'Dell

Received: Tue, 15 Jun 2004 06:59:36 +0900



Arbitrary does not mean 'bad,' 'random' or 'senseless.' - It literally
means 'because I said so.'

It has evolved to mean 'somebody else's choice' - or simply 'out of my
control' from the programmer's perspective.

As for the dictionary:
Long, long ago, somebody said, "I'll make the alphabet in this order: 'a,
b, c ...". And that was arbitrary. Then Webster thought he'd kill language
evolution and said, "I'll write a dictionary! And the words will be in
alphabetical order" - That was arbitrary. But you can bet it'd outsell a
dictionary with words placed at random, simply because everyone by then
believe that "a, b, c" was the natural order of the alphabet. Good business
sense, but it's still arbitrary.

Unless there are rules that state "XYZ must be ordered alphabetically,"
then ordering XYZ alphabetically is arbitrary. But then, unless there's
something that says, "XYZ must be ordered the way Sean wants it to be,"
then everything's arbitrary - But your choice is still arbitrary.

At least, that's my arbitrary definition of arbitrary.

This reply written arbitrarily.

You're taking the side of those who get spit on, I should warn you.

Sean O'Dell
 
N

Nathaniel Talbott

That's not the precise meaning of the word, but Nathaniel did admit to
it, and
I never meant to insult Nathaniel.

Thanks for not trying to insult me, Sean, but please quote me in full...
Early in test/unit's life, test order was arbitrary (well, OK, they
were actually run in the order that Module#public_instance_methods
returned them... but that was pretty arbitrary). In general, this was
not a bad thing, because unit tests that are dependent on test order
are a pretty serious code smell. However, PragDave pointed out that
adding a bit more predictability would be a good thing, so I started
sorting the methods alphabetically. This allows one to order test
methods via naming 'hacks', but they feel like hacks. Some people
don't like that, but I consider it to be a feature, because THEY ARE
hacks.

So yes, I can agree that sorting alphabetically is a fairly arbitrary
decision (although I can't think of another order I would prefer in
its place). However, the choice to not make ordering an important part
of test/unit's function is not arbitrary. The only other ordering I
have really considered adding random order, with the seed being
printed out each run so that results can be duplicated. That would be
useful for removing inter-test dependencies, while most other
orderings I can think of would encourage them.

To clarify, since apparently I wasn't clear enough originally:

1) The current ordering of tests (alphabetical) could be considered
arbitrary, as I could have arguably chosen something better. However, I
personally can't think of another, better ordering the framework could
provide.

2) As Mark put it so well above, the decision to only provide
alphabetical ordering WAS NOT arbitrary. I did it to make it feel like
a hack because every single unit testing reference I have ever read and
my own experience tell me that order-dependent tests are not a good
thing.

I removed the word from all docs the very
second someone mentioned that it appeared insulting. Also, I never
directly
applied the word "arbitrary" to Test/Unit; people just made the
association
themselves because, well, Test/Unit really did run tests according to
how
Ruby listed them, which seemed random to me, but I'm not sure; I
couldn't
find a pattern to them.

Actually, I just looked, and it turns out test/unit has never run tests
in "Ruby order" - only Lapidary did. Alphabetical sorting was added in
October of 2001, so unless you were using Lapidary in 2001, this is
simply an inaccurate statement.

I'll be on it, that's for sure. I got sick, a long time ago, of
asking for
things and getting a lot of heat for it so these days, when possible,
I will
just implement what I need myself and if I have time, release it
publicly.

As has been mentioned here several times, offering patches or add-on
components is a middle ground between simply asking for functionality,
and re-implementing a completely new library almost identical to one
that is already available. I feel somewhat like a hypocrite saying
this, as I did the latter with test/unit, replacing RubyUnit, which was
the generally used framework at the time. So simply take it as a
suggestion - that's all it is. I do think your alternative output
format could have easily been implemented as a new test/unit runner.

Diplomacy
is tough to have when you simply don't have the room to compromise on
some
things.

Also: Learning is tough to have when you simply don't have the room to
be wrong on some things.

May we all give ourselves room to learn,


Nathaniel
Terralien, Inc.

<:((><
 
N

Nathaniel Talbott

I think what we have is more than one person who is annoyed that my
ideas are
not something they can just swat down, so long as I can code them
myself.
That's honestly what I think, that people are EXTRA annoyed that I
went and
did it for myself. It took the power away from you, didn't it? You
can't
tell someone "no, we won't do that" when they can just go do it
themselves.

I personally am EXTRA glad that you took the initiative to go and code
it yourself. I am getting EXTRA annoyed at your attitude and tone,
though. I am worried that many will not look at or use your
contributions simply because of your demeanor on this list, and I think
that would be a loss.


Nathaniel
Terralien, Inc.

<:((><
 
S

Sean O'Dell

Thanks for not trying to insult me, Sean, but please quote me in full...


To clarify, since apparently I wasn't clear enough originally:

1) The current ordering of tests (alphabetical) could be considered
arbitrary, as I could have arguably chosen something better. However, I
personally can't think of another, better ordering the framework could
provide.

Then you're changing your story about the order. Which is fine, too. It
doesn't make the current order method less arbitrary.
2) As Mark put it so well above, the decision to only provide
alphabetical ordering WAS NOT arbitrary. I did it to make it feel like
a hack because every single unit testing reference I have ever read and
my own experience tell me that order-dependent tests are not a good
thing.

Let the developers decide for themselves which order is best. Imposing it
upon them is arbitrary. You may have a reason, but I don't agree with it, so
to me it makes no sense to be forced into alphabetic or random.

What if I have a bug that I find only when two tests are run one after the
other? What if I suspect this bug exists, and I can prove it exists by
running two tests one after the other? In celsoft.com/Battery, I can do that
easily. In Test/Unit, I can't do that (well, I can alias or just create
dummy methods, I assume, to get alphabetic...but that's not very Ruby-like).
Actually, I just looked, and it turns out test/unit has never run tests
in "Ruby order" - only Lapidary did. Alphabetical sorting was added in
October of 2001, so unless you were using Lapidary in 2001, this is
simply an inaccurate statement.

YOU said you ran the tests in Ruby order, not me. I only said "arbitrary."
That was the only word I used to describe your order. I didn't know it was
alphabetic, random or anything...they were just arbitrary to me. I couldn't
control the run order, so it imposed some order on me, and that's all I
remember about it. I said nothing about what specific order your tests ran
until someone said they were alphabetic, and then again when you said they
ran in the order Ruby listed them.
As has been mentioned here several times, offering patches or add-on
components is a middle ground between simply asking for functionality,
and re-implementing a completely new library almost identical to one
that is already available. I feel somewhat like a hypocrite saying
this, as I did the latter with test/unit, replacing RubyUnit, which was
the generally used framework at the time. So simply take it as a
suggestion - that's all it is. I do think your alternative output
format could have easily been implemented as a new test/unit runner.

That is hypocritical. Let's just point that out. All this fuss because
people are upset that I don't like arbitrary run orders imposed on me, so I
wrote my own test framework and gave it to everyone. It's absolutely
hypocritical. The only thing you should be saying is "thanks for the ideas
and input Sean, and let the best test framework win." To get on board with
all these other jerks, just because of one word that I used properly and
because you want patches not competition...absolutely hypocritical. I never
did anything but go through a hell of a lot of trouble to write and release a
test framework that does things Test/Unit did.
Also: Learning is tough to have when you simply don't have the room to
be wrong on some things.

May we all give ourselves room to learn,

What I've learned is that this ML is filled with pseudo-intellectual children
who don't like when capable programmers demonstrate that they're not
dependent on their juvenile meanderings about what should and should not be
in the Ruby world, and can code what they need for themselves, and can get
their web pages in order and release something others can actually use, and
do so quickly, and in their spare time. So few of these whiners release much
of their own stuff, let alone get their documentation together. I can't
believe I take any stock in the blatherings of such ineffective, useless
play-coders.

Sean O'Dell
 
S

Sean O'Dell

I personally am EXTRA glad that you took the initiative to go and code
it yourself. I am getting EXTRA annoyed at your attitude and tone,
though. I am worried that many will not look at or use your
contributions simply because of your demeanor on this list, and I think
that would be a loss.

I really couldn't care less. People can use my stuff or not, it doesn't
matter. All I care about is that I released it cleanly, it works as
advertised, and it does what I need.

Sean O'Dell
 
J

Jean-Hugues ROBERT

No, because there is a solid reason for the order of the words in the
dictionary, and that decision makes sense to me. It could appear arbitrary
to SOME people, but I think only those in the fringes of society (aka, crazy,
fanatical, etc.). Since I easily implemented test ordering, and can think of
many reasons to not be forced into running them alphabetically, yet Test/Unit
didn't give me the option, that's clearly arbitrary. It was imposed on me,
there was no good reason, etc. Lots of qualities make "arbitrary" a great
way to describe the ordering.

Sean O'Dell

Hum... I had a google search on "dictionary arbitray". One
link is http://www.freesearch.co.uk/dictionary/arbitrary
that describes two definitions, one of them includes:
"using unlimited personal power without considering other people's wishes".
See also http://dictionary.reference.com/search?q=arbitrary
and http://www.hyperdictionary.com/dictionary/arbitrary
That is the negative connotations I was referring too earlier.

The definition you are using does not appear in 1913 Webster. It is
probably a recent one related to mathematics.

I guess we can safely assume that "arbitrary" is a double edge sword.
Now it is time to find a better adjective.

Yours,

JeanHuguesRobert
 
B

Bill Kelly

What I've learned is that this ML is filled with pseudo-intellectual children
who don't like when capable programmers demonstrate that they're not
dependent on their juvenile meanderings about what should and should not be
in the Ruby world, and can code what they need for themselves, and can get
their web pages in order and release something others can actually use, and
do so quickly, and in their spare time. So few of these whiners release much
of their own stuff, let alone get their documentation together. I can't
believe I take any stock in the blatherings of such ineffective, useless
play-coders.

http://www.moviewavs.com/Movies/Waynes_World/sphinctr.wav
 
R

Relm

As has been mentioned here several times, offering patches or add-on
components is a middle ground between simply asking for functionality,
and re-implementing a completely new library almost identical to one
that is already available.

More a hack than a patch, allows arbitrary ordering of tests:

class TC_Zoo < Test::Unit::TestCase
order :rand # randomly
order :insert # insertion order
order {|a,b| b <=> a} # reverse alphabetically
order {|x| x.size} # by length of method names :)

def test_neko
puts "neko: nya"
end

def test_inu
puts "inu: wan"
end

def test_tori
puts "tori: pi"
end

def test_nezumi
puts "nezumi: chu"
end
end


--- test/unit/testcase.rb.orig Thu Nov 20 15:18:59 2003
+++ test/unit/testcase.rb Tue Jun 15 01:09:57 2004
@@ -38,14 +38,44 @@
@test_passed = true
end

+ # Define the order in which tests are executed.
+ # :insert :insertion => insertion order
+ # :rand :random => random order
+ # 2-arg block => user-defined sort
+ # 1-arg block => user-defined sort_by
+ # default => alphabetic order
+ def self.order(*a, &block)
+ @order = block || a[0]
+ end
+
+ # Capture insertion order of test methods.
+ def self.method_added(sym)
+ sym.to_s =~ /^test_/ or return
+ @insert ||= []
+ @insert << sym.to_s
+ end
+
# Rolls up all of the test* methods in the fixture into
# one suite, creating a new instance of the fixture for
# each method.
def self.suite
- method_names = public_instance_methods(true)
- tests = method_names.delete_if {|method_name| method_name !~ /^test./}
+ @insert ||= []
+ tests = case @order
+ when :insert, :insertion
+ @insert
+ when :rand, :random
+ @insert.sort_by {rand}
+ when Proc
+ if @order.arity == 2
+ @insert.sort {|a,b| @order[a,b]}
+ else
+ @insert.sort_by {|x| @order[x]}
+ end
+ else
+ @insert.sort
+ end
suite = TestSuite.new(name)
- tests.sort.each do
+ tests.each do
|test|
catch:)invalid_test) do
suite << new(test)
 

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

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,123
Latest member
Layne6498
Top