The object model contains two objects: House, and Street. Each of
these objects inherit from EntityBase which is my Domain Supertype
that adds validation rule handling and an IsValid property.
Basically, my app creates and maintains 5 lists of houses based on
house order. The program iterates through all permutations of house
configurations (including house order), and only the valid houses are
stored in the appropriate list (1st through 5th).
Then I iterate through all permutations of valid houses to build a
possible street and test its validity. This runs until a valid street
is found.
Rules are factored into two types of rules: house level, and street
level. House level rules deal with one house configuration, and
street rules deal the releationship of two houses to each other.
It takes different amounts of time to run, depending on what order I
put the enum / attributes in. Anywhere from 1 to 19 seconds tops.
The first pass just filters houses using house rules, and contains
only simple relative position rules (ones that can be determined soley
from the "order" property). The resulting number of houses determines
how many possible permutations of streets will need to be tested, so
filtering is crucial at this level. A few more houses can result in
thousands or millions of new streets to test. One breakthrough I had
here was to extrapolate from the existing rules as many new rules as
possible for the first round. This is how I got my max run time from
literally days to 19 seconds tops! But like I said, i've seen it run
in as little as a few seconds, depending on the inital order of
attributes. All extrapolated rules are followed by a lowercase letter
("Rule4a", "Rule4b", etc).
// - - - - - - the app - - - - -
namespace Whose_Fish
{
class Program
{
static void Main(string[] args)
{
Program program = new Program();
program.CreateValidHouses();
program.CreateValidStreet();
}
public Program()
{
InitHousesArray();
}
// A list of lists that holds valid houses
List<List<House>> Houses = new List<List<House>>();
void InitHousesArray()
{
Houses.Add(new List<House>()); // 1st house possibilities
Houses.Add(new List<House>()); // 2nd house possibilities
Houses.Add(new List<House>()); // 3rd house possibilities
Houses.Add(new List<House>()); // 4th house possibilities
Houses.Add(new List<House>()); // 5th house possibilities
}
void CreateValidHouses()
{
int[] slots = { 5, 5, 5, 5, 5, 5 };
PermutationGenerator gen = new
PermutationGenerator(slots);
foreach (List<int> p in gen)
{
// Create a possible house configuration
House h = new House();
h.Nationality = (Nationalities)p[0];
h.HouseColor = (HouseColors)p[1];
h.Pet = (Pets)p[2];
h.Smoke = (Smokes)p[3];
h.Drink = (Drinks)p[4];
h.Order = p[5];
if (h.IsValid)
{
// Store valid houses by order
Houses[h.Order].Add(h);
}
}
}
void CreateValidStreet()
{
Console.WindowHeight = 50;
int[] slots = { Houses[0].Count, Houses[1].Count,
Houses[2].Count, Houses[3].Count, Houses[4].Count };
PermutationGenerator gen = new
PermutationGenerator(slots);
Street street = new Street();
int count = 0;
foreach (List<int> p in gen)
{
count += 1;
// Create a possible street configuration
street.Add(Houses[0][p[0]]); // Pick a house from
list 1
street.Add(Houses[1][p[1]]); // Pick a house from
list 2
street.Add(Houses[2][p[2]]); // Pick a house from
list 3
street.Add(Houses[3][p[3]]); // Pick a house from
list 4
street.Add(Houses[4][p[4]]); // Pick a house from
list 5
// Test rules
if (street.IsValid)
{
Console.Clear();
Console.WriteLine(street.DescribeStreet());
Console.WriteLine();
Console.WriteLine(string.Concat(count.ToString(),
" of ", gen.Possibilities, " possibilities tested."));
break;
}
else
{
street.Clear();
}
Console.WriteLine(count.ToString());
}
// Wait for keystroke
Console.WriteLine("\n[Press any key to exit]");
Console.ReadKey();
}
}
}
// - - - - - - Object Model - - - - -
namespace Entities
{
public enum Nationalities
{
Norwegian, Dane, German, Brit, Swede
}
public enum Pets
{
Horses, Fish, Cats, Birds, Dogs
}
public enum Drinks
{
Water, Milk, Coffee, Tea, Beer
}
public enum Smokes
{
Dunhills, Bluemasters, PallMalls, Princes, Blends
}
public enum HouseColors
{
Yellow, Blue, Green, Red, White
}
}
namespace Entities
{
public class House : BusinessFramework.EntityBase
{
private Nationalities m_Nationality;
private HouseColors m_Color;
private Pets m_Pet;
private Drinks m_Drink;
private Smokes m_Smoke;
private int m_Order;
public Nationalities Nationality
{
get { return m_Nationality; }
set { m_Nationality = value; }
}
public Pets Pet
{
get { return m_Pet; }
set { m_Pet = value; }
}
public Drinks Drink
{
get { return m_Drink; }
set { m_Drink = value; }
}
public Smokes Smoke
{
get { return m_Smoke; }
set { m_Smoke = value; }
}
public HouseColors HouseColor
{
get { return m_Color; }
set { m_Color = value; }
}
public int Order
{
get { return m_Order; }
set { m_Order = value; }
}
public string Describe()
{
StringBuilder sb = new StringBuilder();
sb.Append("Nationality:
\t").Append(this.Nationality.ToString()).Append("\n");
sb.Append("Smokes:\t
\t").Append(this.Smoke.ToString()).Append("\n");
sb.Append("Drinks:\t
\t").Append(this.Drink.ToString()).Append("\n");
sb.Append("Pet:\t
\t").Append(this.Pet.ToString()).Append("\n");
sb.Append("Color:\t
\t").Append(this.HouseColor.ToString()).Append("\n\n");
return sb.ToString();
}
#region Rules
// House rules
protected override void CheckRules()
{
AddRule("Rule1", "The Brit lives in the red house.",
TestRule1());
AddRule("Rule2", "The Swede keeps dogs as pets.",
TestRule2());
AddRule("Rule3", "The Dane drinks tea.", TestRule3());
AddRule("Rule5", "The green house owner drinks coffee.",
TestRule5());
AddRule("Rule6", "The person who smokes Pall Malls keeps
birds.", TestRule6());
AddRule("Rule7", "The owner of the yellow house smokes
Dunhills.", TestRule7());
AddRule("Rule12", "The owner who smokes Bluemasters drinks
beer.", TestRule12());
AddRule("Rule13", "The German smokes Princes.",
TestRule13());
// Positional
AddRule("Rule4a", "The green house cannot be 5th.
(extrapolated from rule 4)", TestRule4a());
AddRule("Rule4b", "The green house is the 4th house.
(extrapolated from rule 4)", TestRule4b());
AddRule("Rule4c", "The white house is the 4th or 5th
house. (extrapolated from rule 4)", TestRule4c());
AddRule("Rule8", "Center house drinks milk.",
TestRule8());
AddRule("Rule10", "The Norwegian lives in the 1st house.",
TestRule10());
AddRule("Rule10_14a", "The blue house is 2nd.
(extrapolated from rules 10 & 14)", TestRule10_14a());
}
private bool TestRule1()
{
return !(this.HouseColor == HouseColors.Red &&
this.Nationality != Nationalities.Brit ||
this.Nationality == Nationalities.Brit &&
this.HouseColor != HouseColors.Red);
}
private bool TestRule2()
{
return !(this.Nationality == Nationalities.Swede &&
this.Pet != Pets.Dogs) ||
(Pet == Pets.Dogs && this.Nationality !=
Nationalities.Swede);
}
private bool TestRule3()
{
return !(this.Nationality == Nationalities.Dane &&
this.Drink != Drinks.Tea ||
this.Drink == Drinks.Tea && this.Nationality !=
Nationalities.Dane);
}
private bool TestRule6()
{
return !(this.Smoke == Smokes.PallMalls && this.Pet !=
Pets.Birds ||
this.Pet == Pets.Birds && this.Smoke !=
Smokes.PallMalls);
}
private bool TestRule7()
{
return !(this.HouseColor == HouseColors.Yellow &&
this.Smoke != Smokes.Dunhills ||
this.Smoke == Smokes.Dunhills && this.HouseColor !=
HouseColors.Yellow);
}
private bool TestRule12()
{
return !(this.Smoke == Smokes.Bluemasters && this.Drink !=
Drinks.Beer ||
this.Drink == Drinks.Beer && this.Smoke !=
Smokes.Bluemasters);
}
private bool TestRule13()
{
return !(this.Nationality == Nationalities.German &&
this.Smoke != Smokes.Princes ||
this.Smoke == Smokes.Princes && this.Nationality !=
Nationalities.German);
}
private bool TestRule5()
{
return !(this.HouseColor == HouseColors.Green &&
this.Drink != Drinks.Coffee ||
this.Drink == Drinks.Coffee && this.HouseColor !=
HouseColors.Green);
}
private bool TestRule4a()
{
return !(this.HouseColor == HouseColors.Green &&
this.Order == 4);
}
private bool TestRule8()
{
return !(this.Order == 2 && this.Drink != Drinks.Milk ||
this.Drink == Drinks.Milk && this.Order != 2);
}
private bool TestRule10()
{
return !(this.Nationality == Nationalities.Norwegian &&
this.Order != 0 ||
this.Order == 0 && this.Nationality !=
Nationalities.Norwegian);
}
private bool TestRule10_14a()
{
return !(this.HouseColor == HouseColors.Blue &&
this.Order != 1 ||
this.Order == 1 && this.HouseColor !=
HouseColors.Blue);
}
private bool TestRule4b()
{
return !(this.HouseColor == HouseColors.Green &&
(this.Order == 0 || this.Order == 1 || this.Order == 2 || this.Order
== 4));
}
private bool TestRule4c()
{
return !(this.HouseColor == HouseColors.White &&
(this.Order == 0 || this.Order == 1 || this.Order == 2));
}
#endregion
}
}
namespace Entities
{
/// <summary>
/// A street is a collection of houses.
/// </summary>
public class Street : BusinessFramework.EntityBase
{
private List<House> m_Houses = new List<House>();
private House m_GreenHouse, m_WhiteHouse, m_BlendsHouse,
m_DunhillsHouse, m_WaterHouse, m_HorseHouse, m_CatsHouse;
public void Add(House house)
{
// Add to inner collection of houses
m_Houses.Add(house);
// Create shortcuts references for use in validation tests
if (house.HouseColor == HouseColors.Green)
m_GreenHouse = house;
else if (house.HouseColor == HouseColors.White)
m_WhiteHouse = house;
if (house.Smoke == Smokes.Blends)
m_BlendsHouse = house;
else if (house.Smoke == Smokes.Dunhills)
m_DunhillsHouse = house;
if (house.Pet == Pets.Horses)
m_HorseHouse = house;
else if (house.Pet == Pets.Cats)
m_CatsHouse = house;
if (house.Drink == Drinks.Water)
m_WaterHouse = house;
}
public House this[int index]
{
get { return m_Houses[index]; }
set { m_Houses[index] = value; }
}
public void Clear()
{
// Clear inner list of houses
m_Houses.Clear();
// Clear shortcut references
m_GreenHouse = null;
m_WhiteHouse = null;
m_BlendsHouse = null;
m_DunhillsHouse = null;
m_HorseHouse = null;
m_CatsHouse = null;
m_WaterHouse = null;
}
public string DescribeStreet()
{
StringBuilder sb = new StringBuilder();
foreach (House h in m_Houses)
{
sb.Append(h.Describe()).Append("\n");
}
return sb.ToString();
}
#region Rules
// Street rules
protected override void CheckRules()
{
bool isUnique = TestRuleUnique();
AddRule("RuleUnique", "Houses must be unique.", isUnique);
if (!isUnique) return; // Early exit clause
AddRule("Rule4", "The green house is on the left of the
white house.", TestRule4());
AddRule("Rule9", "The man who smokes Blends lives next to
the one who keeps cats.", TestRule9());
AddRule("Rule11", "The man who keeps horses lives next to
the one who smokes Dunhills.", TestRule11());
AddRule("Rule15", "The man who smokes Blends has a
neighbor who drinks water.", TestRule15());
}
private bool TestRuleUnique()
{
/* All checksums should add up to 10.
* While it is possible to = 10 and still have non-
* unique attributes, we know that if one doesn't = 10,
* it cannot be valid, and therefore can be sacked without
* further testing.
*/
int[] checkSums = new int[5];
// Add up checksums for street
foreach (House h in m_Houses)
{
checkSums[0] += (int)h.HouseColor;
checkSums[1] += (int)h.Drink;
checkSums[2] += (int)h.Smoke;
checkSums[3] += (int)h.Nationality;
checkSums[4] += (int)h.Pet;
}
return (checkSums[0] == 10 && checkSums[1] == 10 &&
checkSums[2] == 10 && checkSums[3] == 10 &&
checkSums[4] == 10);
}
private bool TestRule4()
{
if (m_GreenHouse == null || m_WhiteHouse == null)
return false;
return !(m_GreenHouse.Order != m_WhiteHouse.Order - 1);
}
private bool TestRule9()
{
if (m_BlendsHouse == null || m_CatsHouse == null)
return false;
int difference = m_BlendsHouse.Order - m_CatsHouse.Order;
return !(Math.Abs(difference) != 1);
}
private bool TestRule11()
{
if (m_DunhillsHouse == null || m_HorseHouse == null)
return false;
int difference = m_HorseHouse.Order -
m_DunhillsHouse.Order;
return !(Math.Abs(difference) != 1);
}
private bool TestRule15()
{
if (m_BlendsHouse == null || m_WaterHouse == null)
return false;
int difference = m_BlendsHouse.Order - m_WaterHouse.Order;
return !(Math.Abs(difference) != 1);
}
#endregion
}
}
Jordan
Come on, a mad catfight is not a "stigma" :-)
[snip]
I was thinking of a way to make this problem more real-world instead
of textbook-puzzle-ish. One possible application would be crime
solving, or perhaps terrorist tracking. Data about people, places,
things, and relationships would all be in a data wearhouse and an
inference engine of some type could chew on it to find potential
trouble spots or leads. (Instead of "who has the fish", the
questions may resemble, "who may have a bomb".)
One change from your kind of solution is that specific instances would
not be hard-wired into the app code. Classification systems would also
not be hard-wired if we really don't want to make programmers
glorified data entry clerks. People, places, things, and categories
will be entered by domain experts, not programmers for the most part.
It always seemed to me that if you remove domain classification from
app code, the result will not be very OOP. There would be little or no
need for inheritence or polymorphism. If you disagree, I would like to
understand why, with perhaps some examples.
-T-
topmind wrote:
> Jordan Marr wrote:
>> I never posted my solution to Whose Fish, and since my old thread
>> probably has a stigma attached to it, I'll post it here.
>
** SNIP Jordan's original post **
>
> I was thinking of a way to make this problem more real-world instead
> of textbook-puzzle-ish. One possible application would be crime
> solving, or perhaps terrorist tracking. Data about people, places,
> things, and relationships would all be in a data wearhouse and an
> inference engine of some type could chew on it to find potential
> trouble spots or leads. (Instead of "who has the fish", the
> questions may resemble, "who may have a bomb".)
>
So, changing the nouns makes the problem more 'real world'? I don't buy
that. The problem was fine as it was IMO, and changing the nouns
around wouldn't really add anything.
However, an inference engine would certainly be an interesting way of
solving the problem, I think.
> One change from your kind of solution is that specific instances would
> not be hard-wired into the app code. Classification systems would also
> not be hard-wired if we really don't want to make programmers
> glorified data entry clerks. People, places, things, and categories
> will be entered by domain experts, not programmers for the most part.
IMO, moving the noun definition outside of the hard-coded approach in
the example neither adds nor takes away from the solution itself. The
Sql approach that someone posted in the previous thread [1] was similar
to Jordan's approach in this way, in that both of them were 'hard-wired'
into the solution, as you say.
The most interesting piece of this problem IMO is not how the houses,
people, and streets get entered, but how the program goes about finding
the correct answer given sets of these things and a set of rules.
> It always seemed to me that if you remove domain classification from
> app code, the result will not be very OOP. There would be little or no
> need for inheritence or polymorphism. If you disagree, I would like to
> understand why, with perhaps some examples.
>
Heck, Jordan's solution has very little inheritance or polymorphism.
That doesn't mean I don't think it's a perfectly valid approach.
> -T-
>
[1] http://groups.google.com/group/comp.object/msg/cec9e241f760a89a
> Jordan Marr wrote:
>>I never posted my solution to Whose Fish, and since my old thread
>>probably has a stigma attached to it, I'll post it here.
> [snip]
> I was thinking of a way to make this problem more real-world instead
> of textbook-puzzle-ish. One possible application would be crime
> solving, or perhaps terrorist tracking.
You were told by me, last month, that the problem had real world
application in anti-terrorist intelligence (posted on May 10th) .
Can you guess what your reply (posted on May 22nd) was to this fact ... ??
> (Instead of "who has the fish", the questions may resemble, "who may have a bomb".)
Feel free to change the example (and all the facts) to something else.
I would suggest going to the site from where the "Whose fish" example came.
IIRC the site had a collection of similar problems. One of those may save
you the effort of having to construct a "real world" example.
> One change from your kind of solution is that specific instances would
> not be hard-wired into the app code. Classification systems would also
> not be hard-wired if we really don't want to make programmers
> glorified data entry clerks. People, places, things, and categories
> will be entered by domain experts, not programmers for the most part.
Fair enough.
What does the SQL solution that was posted now look like without
"hard-wired" schema information ??
> It always seemed to me that if you remove domain classification from
> app code, the result will not be very OOP. There would be little or no
> need for inheritence or polymorphism. If you disagree, I would like to
> understand why, with perhaps some examples.
An OO impl of a FOPL engine, vs a "P/R" one.
It will be interesting to see your implementation of such an engine.
Regards,
Steven Perryman
You got me thinking. If you are doing a one-time or very specific
simulation, then perhaps you are right. That is pretty much what
Simula-67 was for, where OO was formally invented. They had tugboats,
freighters, and loading docks and wanted to test the productivity of
various scenarios. Simulations are certainly needed, otherwise
Simula-67 wouldn't have been made. Perhaps the type of problems Simula
was used for would be a better representation of a "real-world"
version of this kind of puzzle than my crime/terrorist finder
scenario. Being that I don't work on those kind of problems, I didn't
really think about Simula-bound-stuff until now.
However, my understanding is that simulation tools are becoming
graphical in nature such that one drag and drops widgets and puts
verious constraints on the visual "objects". There is coding, but it
is mostly for event-handlers (if-bumped, if-moved, if-within-X-units-
of-thing, etc.), not the framework itself. But I'll let a simulation
expert make an informed comment on that.
>
> However, an inference engine would certainly be an interesting way of
> solving the problem, I think.
Perhaps that would just be reinventing Prolog :-)
>
> > One change from your kind of solution is that specific instances would
> > not be hard-wired into the app code. Classification systems would also
> > not be hard-wired if we really don't want to make programmers
> > glorified data entry clerks. People, places, things, and categories
> > will be entered by domain experts, not programmers for the most part.
>
> IMO, moving the noun definition outside of the hard-coded approach in
> the example neither adds nor takes away from the solution itself. The
> Sql approach that someone posted in the previous thread [1] was similar
> to Jordan's approach in this way, in that both of them were 'hard-wired'
> into the solution, as you say.
>
> The most interesting piece of this problem IMO is not how the houses,
> people, and streets get entered, but how the program goes about finding
> the correct answer given sets of these things and a set of rules.
Again, It would be interesting to see a Prolog solution in the sense
you tell it the logic rules and then ask questions over those rules.
>
> > It always seemed to me that if you remove domain classification from
> > app code, the result will not be very OOP. There would be little or no
> > need for inheritence or polymorphism. If you disagree, I would like to
> > understand why, with perhaps some examples.
> >
>
> Heck, Jordan's solution has very little inheritance or polymorphism.
> That doesn't mean I don't think it's a perfectly valid approach.
My comment was about the matter of being OO versus not being OO, not
necessarily "valid" or not. Jordan's solution is not that OO. It
mostly only uses encapsulation, not the other two. That is, the
operations and data structures are bound together in the OO "self-
handling-noun" way. Thus, on a continious scale, it has a fairly low
amount of "OO-ness" if you will. A "direct" procedural solution would
not be much different except that the data structures would be
"naked". (Whether this is good or not will take us back to the ol'
database versus app-RAM fights.)
>
> [1] http://groups.google.com/group/comp.object/msg/cec9e241f760a89a
-T-
I don't recall that, but if that was the case, then why not *present*
an anti-terrorism problem, and give some sample scenarios? That way we
don't *have to* deal with a text-book-puzzle-like problem. Cut out
the middle-man.
>
> Can you guess what your reply (posted on May 22nd) was to this fact ... ??
>
Nope. Let's hope it won't embarass me, however :-)
>
> > (Instead of "who has the fish", the questions may resemble, "who may have a bomb".)
>
> Feel free to change the example (and all the facts) to something else.
Okay, how about a payroll example!
>
> I would suggest going to the site from where the "Whose fish" example came.
> IIRC the site had a collection of similar problems. One of those may save
> you the effort of having to construct a "real world" example.
It is not my job to cull problems to present to comp.object. I already
did a few and posted the source code on the web. Nobody has shown it
objectively worse than Martin's version(s).
>
>
> > One change from your kind of solution is that specific instances would
> > not be hard-wired into the app code. Classification systems would also
> > not be hard-wired if we really don't want to make programmers
> > glorified data entry clerks. People, places, things, and categories
> > will be entered by domain experts, not programmers for the most part.
>
> Fair enough.
> What does the SQL solution that was posted now look like without
> "hard-wired" schema information ??
I wanted to settle on a less "puzzly" version of the example so that I
could explore this issue of how "meta" it would need to be. If it is a
Simula-like problem, as described in a sister message, then perhaps a
database is not appropriate. But I am not a physical simulation expert
and thus could not really give an informed answer for that domain.
>
>
> > It always seemed to me that if you remove domain classification from
> > app code, the result will not be very OOP. There would be little or no
> > need for inheritence or polymorphism. If you disagree, I would like to
> > understand why, with perhaps some examples.
>
> An OO impl of a FOPL engine, vs a "P/R" one.
> It will be interesting to see your implementation of such an engine.
FOPL? Functional?
>
>
> Regards,
> Steven Perryman
-T-
topmind wrote:
> Kreeg wrote:
>> topmind wrote:
>>> Jordan Marr wrote:
>>>> I never posted my solution to Whose Fish, and since my old thread
>>>> probably has a stigma attached to it, I'll post it here.
>> ** SNIP Jordan's original post **
*SNIP*
>
>> However, an inference engine would certainly be an interesting way of
>> solving the problem, I think.
>
> Perhaps that would just be reinventing Prolog :-)
>
**SNIP **
>>
>> The most interesting piece of this problem IMO is not how the houses,
>> people, and streets get entered, but how the program goes about finding
>> the correct answer given sets of these things and a set of rules.
>
> Again, It would be interesting to see a Prolog solution in the sense
> you tell it the logic rules and then ask questions over those rules.
>
I agree. I personally couldn't provide a Prolog implementation because
I've never used it, but I would think that an implementation using any
Rules Engine would be similar. Or did I mis-read the Wikipedia article
on Prolog that I had to look up? :-P
>>> It always seemed to me that if you remove domain classification from
>>> app code, the result will not be very OOP. There would be little or no
>>> need for inheritence or polymorphism. If you disagree, I would like to
>>> understand why, with perhaps some examples.
>>>
>> Heck, Jordan's solution has very little inheritance or polymorphism.
>> That doesn't mean I don't think it's a perfectly valid approach.
>
> My comment was about the matter of being OO versus not being OO, not
> necessarily "valid" or not. Jordan's solution is not that OO. It
> mostly only uses encapsulation, not the other two. That is, the
> operations and data structures are bound together in the OO "self-
> handling-noun" way. Thus, on a continious scale, it has a fairly low
> amount of "OO-ness" if you will.
>
This is true. It actually gets back to Steven Perryman's comment to you
that you that you would be 'pleasantly surprised' to see that OO
probably doesn't add much to this particular problem over a straight
procedural solution.
I'd also be pretty interested in a solution that used C# 3.0's LINQ.
There are some pretty neat things that have been done with LINQ just for
the fun of it. [2]
[2]
http://blogs.msdn.com/lukeh/archive/2007/04/03/a-ray-tracer-in-c-3-0.aspx
>> [1] http://groups.google.com/group/comp.object/msg/cec9e241f760a89a
>
> -T-
>
> S Perryman wrote:
TM>I was thinking of a way to make this problem more real-world instead
TM>of textbook-puzzle-ish. One possible application would be crime
TM>solving, or perhaps terrorist tracking.
>>You were told by me, last month, that the problem had real world
>>application in anti-terrorist intelligence (posted on May 10th) .
> I don't recall that, but if that was the case, then why not *present*
> an anti-terrorism problem, and give some sample scenarios? That way we
> don't *have to* deal with a text-book-puzzle-like problem. Cut out
> the middle-man.
It is you who wants to make the problem different.
Everyone else seems quite happy with the original problem.
So feel free to redefine the problem in *any form that you wish to make* .
>>Can you guess what your reply (posted on May 22nd) was to this fact ... ??
> Nope. Let's hope it won't embarass me, however :-)
Forelorn hope (and quite embarrassing) .
TM>(Instead of "who has the fish", the questions may resemble, "who may
have a bomb".)
>>Feel free to change the example (and all the facts) to something else.
> Okay, how about a payroll example!
Fine. Provide a payroll-based version of the "Whose fish" problem.
I expect the 'question' to be something akin to :
Who is not required to pay union dues for the rest of the year because of
their contributions made to date ??
And facts akin to :
union-member(fred)
>>I would suggest going to the site from where the "Whose fish" example came.
>>IIRC the site had a collection of similar problems. One of those may save
>>you the effort of having to construct a "real world" example.
> It is not my job to cull problems to present to comp.object. I already
> did a few and posted the source code on the web. Nobody has shown it
> objectively worse than Martin's version(s).
1. Robert Martin AFAIK has not provided an implementation of the "Whose
fish" problem. If I am mistaken, feel free to tell us where his impl may be
found.
2. You want to discuss a "terrorist" variant of the problem, but you don't
want to provide the information that will enable that variant to be
defined.
(Predictably) lazy.
3. You have been directed to a site that may have examples that you can
quickly convert into a problem that you wish to make, thus saving you time/
effort. But you don't want to do even that.
(Predictably) lazy.
>>What does the SQL solution that was posted now look like without
>>"hard-wired" schema information ??
> I wanted to settle on a less "puzzly" version of the example so that I
> could explore this issue of how "meta" it would need to be.
As "meta" as one desires.
The SQL and OOP solutions solved the specific problem.
If you wish to change the problem to one where any facts can be stated,
and any question can be asked, feel free to do so.
>>An OO impl of a FOPL engine, vs a "P/R" one.
>>It will be interesting to see your implementation of such an engine.
> FOPL? Functional?
First-order predicate logic.
Actually the problem is FOPL, with CWA ( "closed world assumptions" ) .
Regards,
Steven Perryman
> My comment was about the matter of being OO versus not being OO, not
> necessarily "valid" or not. Jordan's solution is not that OO. It
> mostly only uses encapsulation, not the other two. That is, the
> operations and data structures are bound together in the OO "self-
> handling-noun" way. Thus, on a continious scale, it has a fairly low
> amount of "OO-ness" if you will. A "direct" procedural solution would
> not be much different except that the data structures would be
> "naked". (Whether this is good or not will take us back to the ol'
> database versus app-RAM fights.)
Inheritance allows my noun entities (house & street) to adopt the
validation rule functionality from EntityBase. EntityBase, while not
shown here, is composed of a few other custom classes, and delegates
some behavior to them. There is also a hierarchy of Rule object
defined that allows me to enter rules with or without "groups".
Polymorphism is used here, behind the scenes, because my BrokenRule
engine works with Rule objects, but it doesn't know or care what kind
of Rule it is using. So if I am creating an entity with 20+
validation rules, I may want the ability to display a list of broken
rules by group. If so, I add GroupRule objects instead, using the
"AddGroupRule" method on EntityBase. The fact that all that is
encapsulated away makes the final app code and entity code all the
more simple.
All you see is "AddRule(...)" or "AddGroupRule(...)" in the Entity
code. Or for that matter, I have a generic AddRule that simply takes
a Rule object (of any kind). AddRule(new GroupRule(...)).
So Polymorphism is available behind the scenes, but is encapsulated
away, out of sight. It is not used in the application portion of the
example (it wasn't required). However, I don't think there is any
rule that says an OO program must incorporate all of these features to
be considered OO. Those features are simply there if you need them
for a given problem.
Jordan
Ah, I missed the rule-handling part. I like the use of delegates there,
actually.
Is it because they feel it is a good paradigm comparison project, OR
merely because it is "fun" to them? I don't have an answer to that.
Also, OO'ers *do* seem to hard-wire domain taxonomies into production
app code or build non-trivial data structures into their app
(reinventing the DB) such that textbook puzzles and their production
OO style perhaps do not really differ that much. Martin's payroll
hardwired concepts and taxonomies into his sample, for example. Thus,
to them it seems like "home".
Also, perhaps being a glorified product taxonomy clerk dressed as a
programmer is appealing to them or is great job security. (I am not
saying I know for sure, I am just asking.)
Textbook puzzles often neglect info sharing issues (such as DB's) and
maintainence inssues. (More on this below.)
>
> So feel free to redefine the problem in *any form that you wish to make* .
>
>
> >>Can you guess what your reply (posted on May 22nd) was to this fact ... ??
>
> > Nope. Let's hope it won't embarass me, however :-)
>
> Forelorn hope (and quite embarrassing) .
Hit me with your best shot. I do make sloppy mistakes sometimes, but
I'm rarely fundimentally wrong so far.
>
>
> TM>(Instead of "who has the fish", the questions may resemble, "who may
> have a bomb".)
>
> >>Feel free to change the example (and all the facts) to something else.
>
> > Okay, how about a payroll example!
>
> Fine. Provide a payroll-based version of the "Whose fish" problem.
> I expect the 'question' to be something akin to :
It was mostly a sarcistic joke.
>
> Who is not required to pay union dues for the rest of the year because of
> their contributions made to date ??
>
> And facts akin to :
>
> union-member(fred)
>
It should be clear from my online documentation how "membership" is
done. As far as reaching a contribution limit, a Year-to-Date table
could be created and the union fee amount for that employee in the
EmpCharges be zeroed out or reduced. My app is not meant to directly
perform such a task as is[1], but custom processes could be created
for it using *any* language of choice that has ODBC access to the
tables. They don't have to do it in the app's native language. This is
one of its selling points. (I assumed a SAP-like arrangement where
customized client-specific processes can be created for each customer
instance.)
In fact, almost anybody reasonably familiar with MS-Access could whip
out such a YTD threashold add-on in a few hours (all without knowing
squat about the app's native language).
[1] YTD calcs and threasholds were not part of Martin's original
requirements that I know of. Perhaps they should be added to a real
package because they are fairly common. And I did note in my doc that
I purposely did not include the period-end processing.
(Note that being a member {of union} in general and being a "member"
for the purposes of payroll may differ. I've found that "master"
tables of anything tend to have this problem: each department has
enough differences and exceptions that it is often better for each
department to track their own mappings. I've created 3 different views
of organizational structure at some places multiple times. A one-size-
fits-all generic "master" is rarely sufficient, especially if the DBA
is often busy.)
>
> >>I would suggest going to the site from where the "Whose fish" example came.
> >>IIRC the site had a collection of similar problems. One of those may save
> >>you the effort of having to construct a "real world" example.
>
> > It is not my job to cull problems to present to comp.object. I already
> > did a few and posted the source code on the web. Nobody has shown it
> > objectively worse than Martin's version(s).
>
> 1. Robert Martin AFAIK has not provided an implementation of the "Whose
> fish" problem. If I am mistaken, feel free to tell us where his impl may be
> found.
I am saying that I already supplied code for given examples. It was
Robert's suggestion that I take a look at the examples in his book,
and I forked over money for the book. I am not obligated to supply a P/
R version for every example presented on comp.object!
>
> 2. You want to discuss a "terrorist" variant of the problem, but you don't
> want to provide the information that will enable that variant to be
> defined.
>
> (Predictably) lazy.
I have already presented applications with source code. A terrorist
hunting system makes for a interesting problem though. But I cannot
whip out requirements any time soon. The FBI spent gajillion dollars
on such and still can't get a decent one.
>
>
> 3. You have been directed to a site that may have examples that you can
> quickly convert into a problem that you wish to make, thus saving you time/
> effort. But you don't want to do even that.
>
> (Predictably) lazy.
>
>
> >>What does the SQL solution that was posted now look like without
> >>"hard-wired" schema information ??
>
> > I wanted to settle on a less "puzzly" version of the example so that I
> > could explore this issue of how "meta" it would need to be.
>
> As "meta" as one desires.
> The SQL and OOP solutions solved the specific problem.
Most of the claims made about OOP involve it being easier to change.
Without understanding something about the domain, it is hard to
explore change patterns and their impact on the code. Will they always
being dealing with fish, cigaretts, and houses, or will the nouns
change? Who will enter/create the new nouns? Who will classify them?
Will other apps share info about them? These are KEY questions for
most apps that I've analyzed. Do you disagree?
If the issue is something other than MAINTAINABILITY, then please
state so.
>
> If you wish to change the problem to one where any facts can be stated,
> and any question can be asked, feel free to do so.
>
>
> >>An OO impl of a FOPL engine, vs a "P/R" one.
> >>It will be interesting to see your implementation of such an engine.
>
> > FOPL? Functional?
>
> First-order predicate logic.
> Actually the problem is FOPL, with CWA ( "closed world assumptions" ) .
Okay, it might be interesting, but that is kind of a "systems
software" domain (basic or non-domain-specific boxed tools). I never
disputed OO in systems software. (Systems software is things like OSs,
compilers, GUI frameworks, RDBMS engines, etc.)
>
>
> Regards,
> Steven Perryman
-T-
(begin matyr syndrom)
Agreeing with me will get you flogged around here.
(end matyr syndrom)
> I personally couldn't provide a Prolog implementation because
> I've never used it, but I would think that an implementation using any
> Rules Engine would be similar. Or did I mis-read the Wikipedia article
> on Prolog that I had to look up? :-P
>
> >>> It always seemed to me that if you remove domain classification from
> >>> app code, the result will not be very OOP. There would be little or no
> >>> need for inheritence or polymorphism. If you disagree, I would like to
> >>> understand why, with perhaps some examples.
> >>>
> >> Heck, Jordan's solution has very little inheritance or polymorphism.
> >> That doesn't mean I don't think it's a perfectly valid approach.
> >
> > My comment was about the matter of being OO versus not being OO, not
> > necessarily "valid" or not. Jordan's solution is not that OO. It
> > mostly only uses encapsulation, not the other two. That is, the
> > operations and data structures are bound together in the OO "self-
> > handling-noun" way. Thus, on a continious scale, it has a fairly low
> > amount of "OO-ness" if you will.
> >
>
> This is true. It actually gets back to Steven Perryman's comment to you
> that you that you would be 'pleasantly surprised' to see that OO
> probably doesn't add much to this particular problem over a straight
> procedural solution.
Then why is he and others pressing the issue? Why not hunt for a biz
problem where OO kicks tail? Chock full of glorious polymorphism. That
would make everyone happy. Is he just yanking me around for the sake
of yankage?
> S Perryman wrote:
TM>I was thinking of a way to make this problem more real-world instead
TM>of textbook-puzzle-ish. One possible application would be crime
TM>solving, or perhaps terrorist tracking.
SP>You were told by me, last month, that the problem had real world
SP>application in anti-terrorist intelligence (posted on May 10th) .
TM>I don't recall that, but if that was the case, then why not *present*
TM>an anti-terrorism problem, and give some sample scenarios? That way we
TM> don't *have to* deal with a text-book-puzzle-like problem. Cut out
TM> the middle-man.
>>It is you who wants to make the problem different.
>>Everyone else seems quite happy with the original problem.
> Is it because they feel it is a good paradigm comparison project, OR
> merely because it is "fun" to them? I don't have an answer to that.
Both (IMHO) .
> Also, OO'ers *do* seem to hard-wire domain taxonomies into production
> app code or build non-trivial data structures into their app
> (reinventing the DB) such that textbook puzzles and their production
> OO style perhaps do not really differ that much. Martin's payroll
> hardwired concepts and taxonomies into his sample, for example. Thus,
> to them it seems like "home".
1. Completely irrelevant to this thread, which is : Whose Fish - OO solution.
2. Completely irrelevant to this thread, because the solution given by the
OP does not "hard-wire domain taxonomies into production app code or build
non-trivial data structures" .
SP>Can you guess what your reply (posted on May 22nd) was to this fact ... ??
TM>Nope. Let's hope it won't embarass me, however :-)
>>Forelorn hope (and quite embarrassing) .
> Hit me with your best shot. I do make sloppy mistakes sometimes, but
> I'm rarely fundimentally wrong so far.
Don't have to. You killed yourself with your own sword by the very fact
that you have even talked about using counter-terrorism as an example.
The fact that you cannot even keep track of your self-contradictions (and
only 3 weeks ago at that) is just more evidence of the fact that you are an
embarrassingly poor debater.
SP>Feel free to change the example (and all the facts) to something else.
TM>Okay, how about a payroll example!
>>Fine. Provide a payroll-based version of the "Whose fish" problem.
>>I expect the 'question' to be something akin to :
> It was mostly a sarcistic joke.
1. Sarcastic, not sarcistic (you cannot even blame keyboard layout) .
2. Not a good joke.
3. It backfired on you.
> [1] YTD calcs and threasholds were not part of Martin's original
> requirements that I know of. Perhaps they should be added to a real
> package because they are fairly common. And I did note in my doc that
> I purposely did not include the period-end processing.
Why are you bleating on about the requirements in Robert Martins' payroll
example !!??
The topic of this thread is : Whose Fish - OO solution.
Not Robert Martins' employee payroll processing example.
If, as I have suggested, you wish to make a version of the "Whose fish"
problem that is based in the domain of employee payrolls, feel free to do
so.
>>1. Robert Martin AFAIK has not provided an implementation of the "Whose
>>fish" problem. If I am mistaken, feel free to tell us where his impl may be
>>found.
> I am saying that I already supplied code for given examples. It was
> Robert's suggestion that I take a look at the examples in his book,
> and I forked over money for the book. I am not obligated to supply a P/
> R version for every example presented on comp.object!
I will ask you again :
Has Robert Martin engaged in providing a solution to the "Whose fish"
problem ??
The answer is either yes or no.
>>2. You want to discuss a "terrorist" variant of the problem, but you don't
>>want to provide the information that will enable that variant to be
>>defined.
>>(Predictably) lazy.
> I have already presented applications with source code.
I am not interested in these "presented applications" for other topics.
I (as do no doubt others) have interest in the topic of this thread.
which is : Whose Fish - OO solution
> A terrorist hunting system makes for a interesting problem though. But I
> cannot whip out requirements any time soon.
(Predictably) lazy.
TM>I wanted to settle on a less "puzzly" version of the example so that I
TM>could explore this issue of how "meta" it would need to be.
>>As "meta" as one desires.
>>The SQL and OOP solutions solved the specific problem.
> Most of the claims made about OOP involve it being easier to change.
The topic is : "Whose Fish - OO solution" .
> Without understanding something about the domain, it is hard to
> explore change patterns and their impact on the code.Will they always
> being dealing with fish, cigaretts, and houses, or will the nouns
> change? Who will enter/create the new nouns? Who will classify them?
> Will other apps share info about them? These are KEY questions for
> most apps that I've analyzed. Do you disagree?
Then provide a "real world" domain for an example.
The premise is very simple :
For some "real world" domain, devise a set of facts for that domain for
which some question can be asked. Then solicit solutions in s/w that will
answer the question with a given set of facts.
If you cannot do even expend effort on that front, don't expect anyone
to even bother with your suggestions for a "real world" example.
> If the issue is something other than MAINTAINABILITY, then please
> state so.
Your usual cowardly attempt to evade something when the limits of your
intelligence/ability swoop into view.
The issue is about providing solutions to the "Whose fish" problem.
Not about MAINTAINABILITY.
TM>FOPL? Functional?
>>First-order predicate logic.
>>Actually the problem is FOPL, with CWA ( "closed world assumptions" ) .
> Okay, it might be interesting, but that is kind of a "systems
> software" domain (basic or non-domain-specific boxed tools). I never
> disputed OO in systems software. (Systems software is things like OSs,
> compilers, GUI frameworks, RDBMS engines, etc.)
Another usual cowardly attempt to evade.
The "Whose fish" problem is not "systems software" .
Regards,
Steven Perryman
> Kreeg wrote:
TM>My comment was about the matter of being OO versus not being OO, not
TM>necessarily "valid" or not. Jordan's solution is not that OO. It
TM>mostly only uses encapsulation, not the other two. That is, the
TM>operations and data structures are bound together in the OO "self-
TM>handling-noun" way. Thus, on a continious scale, it has a fairly low
TM>amount of "OO-ness" if you will.
>>This is true. It actually gets back to Steven Perryman's comment to you
>>that you that you would be 'pleasantly surprised' to see that OO
>>probably doesn't add much to this particular problem over a straight
>>procedural solution.
> Then why is he and others pressing the issue? Why not hunt for a biz
> problem where OO kicks tail? Chock full of glorious polymorphism. That
> would make everyone happy. Is he just yanking me around for the sake
> of yankage?
Feel free to tell us what "issue" you believe I am "pressing" .
Regards,
Steven Perryman
topmind wrote:
*** MASS SNIPPAGE ***
>
> Then why is he and others pressing the issue? Why not hunt for a biz
> problem where OO kicks tail? Chock full of glorious polymorphism. That
> would make everyone happy. Is he just yanking me around for the sake
> of yankage?
>
Please go back to the original post of the original 'Whose Fish' thread,
by Jordan Marr. Here it is for you, in fact.
http://groups.google.com/group/comp.object/msg/9a0ff58ddddb8329
Mr. Marr actually states that he thinks that the 'Whose Fish' problem
would be a *great* problem to throw at a relational database, and wanted
to honestly see an implementation of it. However, you dismissed the
problem out of hand, and things degenerated from there.
As to why the 'Whose Fish' threads aren't about 'hunting for a biz
problem where OO kicks tail', 1.) Not every thread is about you, and 2.)
Not everyone here is on a crusade like you are. Maybe he just thought
it was an interesting problem, regardless of whether it furthered some
imaginary 'pro-OO' cause?
Do you agree that if there are many such nouns and many groups and
many rules, that tracking and organizing them in a database would be
more efficient? That way you could use off-the-shelf tools to add,
change, delete, search, sort, and report on what has what feature,
what has what relationship, and what belongs to which set. (And if
there is *not* very many, then which paradigm is used doesn't matter
much anyhow.)
I tend to use a "subtractive" approach to designing or at least
studying assocations between things. One starts off with the
assumption that *every* noun can have *every* feature (of app) and
every relationship. If some combinations are not allowed, then one
uses validation rules to prevent them. This makes the system more
flexible because one does not have to add or change code to get new
associations, but merely remove/disable the validation that prevents
it. New assocations then are virtually "free": little or no coding
changes.
Of course in practice going all the way down this route makes the
system run really slow such that compromises are made and somewhat
arbitrary boundaries are drawn. But as computers get more and more
powerful, a meta-centric approach gets more and more realistic. It can
become a giant Set Theory engine with coded hooks.
OOP, on the other hand, seems to use the additive approach: you
manually add relationships as encountered. I find it easier to remove/
disable a "not permitted" rule than to code for new relationships,
because the framework is already there. Removing a road-block is
easier than building a new road.
Further, the subtractive approach allows one to *delay association
decisions*. You code the features and test them, and *then* add the
associations and validation as mostly meta data, perhaps with the help
of a domain expert clerk.
Inheritence is not powerful enough to do subtractive modeling well
because it is mostly tree-bound instead of set-bound, and polymorphism
puts all the references betwen things in app spehgetti app code
instead of the DB where it is easier to add, change, delete, search,
sort, report, etc. App code makes for a sh8tty database of attributes
and relationships, especially as you scale.
(One should also include lots of "hooks" such that declarative stuff
can be tweaked at given key events with app code. Not everything can
be done declaratively, but with hooks one can make say 80 to 90% of it
declarative, yet allow custom coded tweaks where needed. It takes on
the characteristics of an event-driven design.)
>
> Jordan
-T-
I have nothing further to add, your honor.
It *is* relevant if their coding style for toy examples matches that
of production code.
>
>
> SP>Can you guess what your reply (posted on May 22nd) was to this fact ... ??
>
> TM>Nope. Let's hope it won't embarass me, however :-)
>
> >>Forelorn hope (and quite embarrassing) .
>
> > Hit me with your best shot. I do make sloppy mistakes sometimes, but
> > I'm rarely fundimentally wrong so far.
>
> Don't have to. You killed yourself with your own sword by the very fact
> that you have even talked about using counter-terrorism as an example.
>
> The fact that you cannot even keep track of your self-contradictions (and
> only 3 weeks ago at that) is just more evidence of the fact that you are an
> embarrassingly poor debater.
If you can keep track of everything you've said 3 weeks ago, I applaud
your memory. It is a good thing I forget stuff 3 weeks old, otherwise
I would broil over all the personal insults an accusations of lies and
fraud your hurl my way. (None objectively proven, by the way.)
>
>
> SP>Feel free to change the example (and all the facts) to something else.
>
> TM>Okay, how about a payroll example!
>
> >>Fine. Provide a payroll-based version of the "Whose fish" problem.
> >>I expect the 'question' to be something akin to :
>
> > It was mostly a sarcistic joke.
>
> 1. Sarcastic, not sarcistic (you cannot even blame keyboard layout) .
> 2. Not a good joke.
> 3. It backfired on you.
If YOU liked it, I would really be shocked. I expect you to dispise
everything I say and do by now. It is thus unnecessary to report that
you hate my jokes. Itsa given.
>
> > [1] YTD calcs and threasholds were not part of Martin's original
> > requirements that I know of. Perhaps they should be added to a real
> > package because they are fairly common. And I did note in my doc that
> > I purposely did not include the period-end processing.
>
> Why are you bleating on about the requirements in Robert Martins' payroll
> example !!??
>
> The topic of this thread is : Whose Fish - OO solution.
> Not Robert Martins' employee payroll processing example.
Somebody ASKED how I would add a YTD union fee limit. You clipped it
out. (BTW, I've found a simpler way to add it since the above, if
anybody's interested.)
> TM>I wanted to settle on a less "puzzly" version of the example so that I
> TM>could explore this issue of how "meta" it would need to be.
>
> >>As "meta" as one desires.
> >>The SQL and OOP solutions solved the specific problem.
>
> > Most of the claims made about OOP involve it being easier to change.
>
> The topic is : "Whose Fish - OO solution" .
Okay then, how is the problem going to change over time? Let's explore
change scenarios for Fish. What? Can't for a toy example because
nothing is real? Ohhh, that's sooo sad. Me weeps. Strawberry fields
forever.
>
>
> > Without understanding something about the domain, it is hard to
> > explore change patterns and their impact on the code.Will they always
> > being dealing with fish, cigaretts, and houses, or will the nouns
> > change? Who will enter/create the new nouns? Who will classify them?
> > Will other apps share info about them? These are KEY questions for
> > most apps that I've analyzed. Do you disagree?
>
> Then provide a "real world" domain for an example.
> The premise is very simple :
>
> For some "real world" domain, devise a set of facts for that domain for
> which some question can be asked. Then solicit solutions in s/w that will
> answer the question with a given set of facts.
We already did that with the payroll example.
>
> If you cannot do even expend effort on that front, don't expect anyone
> to even bother with your suggestions for a "real world" example.
You keep trying different examples until you find one that can bust P/
R? That technique will certainly eventually work because P/R is not
always the best solution for biz apps, only usually the best (or at
least not objly. worse). If you run enough horses, your horse will
eventually win out of shear numbers.
>
>
> > If the issue is something other than MAINTAINABILITY, then please
> > state so.
>
> Your usual cowardly attempt to evade something when the limits of your
> intelligence/ability swoop into view.
>
> The issue is about providing solutions to the "Whose fish" problem.
> Not about MAINTAINABILITY.
If maintenence be damned then it TRUELY is not a realistic example for
the vast majority of apps. I rest my case. How about a cryptic Perl
one-liner solution?
>
>
> Regards,
> Steven Perryman
-T-
Potmind,
Not all apps require metadata and user configurability. While it may
be possible to turn this app into a "one size fits all", "solve any
problem" app, that does not seem like an effecient use of time to do
so, IMO. It's finished and it perfectly solved the problem. If the
problem shifts, I can easily modify my logic and it would be adapted
and ready. Done deal!
Right now the attributes are hard coded into enums. So then lets put
them all into tables. That could be done -- very easily -- but what
would we gain? We'd still have the business logic (rules) in the
code. So let's say we take the rules out of the code and put them
into the database as well. How would we be able to express the rules
in a way that was completely user configurable (not hard coded)? We
would have to write a rule logic-building interface for the user to
enter rules and attributes. That's great, and I have seen systems
like this that allow users to enter in code-like logic. But the
systems are usually clunky, and basically a bad way to reproduce what
code was intended to do. Coding is the more eloquent way to provide
this kind of business logic. And this is a widely accepted practice
in businesses all over the world. Even if the user's could enter in
rules, I still don't know how it would work as a one size fits all
app.
I think you are just trying to add requirements to an otherwise cut-
and-dried problem in an attempt to find a way to steer it into your
idiotic argument blender.
Jordan
Insult detection notice.
>
> Not all apps require metadata and user configurability.
We don't know what the typical changes and future needs are, period.
> While it may
> be possible to turn this app into a "one size fits all", "solve any
> problem" app, that does not seem like an effecient use of time to do
> so, IMO. It's finished and it perfectly solved the problem. If the
> problem shifts, I can easily modify my logic and it would be adapted
> and ready. Done deal!
Showing mere executability does not tell us much. Most of the
braggings about OO revolve around making maintenence easier. If you
are demonstrating something else, such as less lines of code or the
pretty flower shape it makes when printed out, please clarify what you
are betterfying. What exactly is broke and what exactly is OO fixing?
>
> Right now the attributes are hard coded into enums. So then lets put
> them all into tables. That could be done -- very easily -- but what
> would we gain? We'd still have the business logic (rules) in the
> code. So let's say we take the rules out of the code and put them
> into the database as well. How would we be able to express the rules
> in a way that was completely user configurable (not hard coded)? We
> would have to write a rule logic-building interface for the user to
> enter rules and attributes. That's great, and I have seen systems
> like this that allow users to enter in code-like logic. But the
> systems are usually clunky, and basically a bad way to reproduce what
> code was intended to do.
Maybe they did it wrong. I cannot see without inspecting the code. Nor
do I propose it for all apps. But IF the main criteria is adding/
changing features with the fewest code changes, then meta-tizing stuff
is often the best way to go. I don't always think that is the utmost
important criteria myself, but OO'ers seem to emphasize it and to
compete with those rules, metatizing works well. Sometimes is hurts
KISS, but they are not consider that. P/R can bend either way. In
practice I tend to use a different balance of criteria for "good code"
than merely changing the fewest lines of code per change request. Its
just that if OO'ers frame the battle in terms of changed code
quantity, meta-tizing is nice weapon to play under that weighting of
the "game". If you say P/R cannot do X, I may show it doing X to prove
you wrong even if doing X is not the most important in practice.
> Coding is the more eloquent way to provide
> this kind of business logic.
I have to disagree. Some parts are and some are not. (Note that there
is a middle ground between programmer-configured and user-configured.)
> And this is a widely accepted practice
> in businesses all over the world. Even if the user's could enter in
> rules, I still don't know how it would work as a one size fits all
> app.
>
> I think you are just trying to add requirements to an otherwise cut-
> and-dried problem in an attempt to find a way to steer it into your
> idiotic argument blender.
>
No, I am trying to describe why it is a poor representive of real
work. Perhaps I failed, but I did try.
>
>
> Jordan
-t-
You'll forget all about it in three weeks. ;^)
You accused me of dodging the example (among other things), as if I am
afraid of to compete with the OO versions of it. However, you also
seem to be saying that OO does not help it much. In other words, you
are accusing me of being afraid to battle a monster that you know does
not exist. This would imply that you don't really want to see me
battle the moster to see who will win because there is no monster; but
merely want to watch me fret over the challenge. In other words, a
"troll".
>
> Regards,
> Steven Perryman
-T-
> On Jun 12, 3:20 pm, S Perryman <q...@q.net> wrote:
>>>Kreeg wrote:
>>TM>My comment was about the matter of being OO versus not being OO, not
>>TM>necessarily "valid" or not. Jordan's solution is not that OO. It
>>TM>mostly only uses encapsulation, not the other two. That is, the
>>TM>operations and data structures are bound together in the OO "self-
>>TM>handling-noun" way. Thus, on a continious scale, it has a fairly low
>>TM>amount of "OO-ness" if you will.
K>This is true. It actually gets back to Steven Perryman's comment to you
K>that you that you would be 'pleasantly surprised' to see that OO
K>probably doesn't add much to this particular problem over a straight
K>procedural solution.
TM>Then why is he and others pressing the issue? Why not hunt for a biz
TM>problem where OO kicks tail? Chock full of glorious polymorphism. That
TM>would make everyone happy. Is he just yanking me around for the sake
TM>of yankage?
>>Feel free to tell us what "issue" you believe I am "pressing" .
> You accused me of dodging the example (among other things), as if I am
> afraid of to compete with the OO versions of it.
Correct. You are afraid.
But the irony is the things that you appear to be afraid of exposing about
yourself are already known in the large to comp.object. A poor solution to
the "Whose fish" problem will hardly make these things any worse.
> However, you also seem to be saying that OO does not help it much. In other words, you
> are accusing me of being afraid to battle a monster that you know does
> not exist.
Wrong.
The difference between you and me is that I have much greater
understanding/experience of OO and procedural development, together with
more intelligence than you, to know that this problem was not biased
towards either OOP or "P/R" .
> This would imply that you don't really want to see me battle the moster
Wrong. We awaited your solution with interest. But it didn't come did it.
Such is the strength of your delusions about OOP, together with your
cowardly disingenuous nature, that you could not even try if your life
depended on it.
So the *fact* (not implication) is that I knew you wouldn't attempt the
problem. Low-intelligence organisms have very limited and predictable
behavioural modes. Twas easy to predict your behaviour (as I will be able
to do on comp.object for every bit of rubbish that you post from here-on) .
Yet you will have your chance. Because you have complained about the
"Whose fish" example, you are going to define a "real world" variant of the
"Whose fish" problem with the aspects of the solutions that you wish to
discuss. No complaints from you then is there [ OoD : WSIHTPTE ?? ]
> to see who will win because there is no monster; but
> merely want to watch me fret over the challenge.
What happened is that comp.object watched you thrash from pillar to post to
try and avoid providing a solution. Epitomised by embarrassing yourself
with pathetic excuses as to why you shouldn't provide a solution, showing a
lack of intelligence to be able to discern what IMHO was quite obvious, to
providing a spectacular side-show of ignorance on a range of topics from
game theory to graph theory to NP-completeness.
> In other words, a "troll".
1. You need to read the Usenet definition of a troll.
2. Paging Mr Pot, message from Mr Kettle : seven year continual postings of
the same thing in a self-confessed (deluded) attempt to agitate the
comp.object newsgroup.
Regards,
Steven Perryman
I have a right to criticize it. If you disagree with my criticism, you
can respond or ignore it. Don't turn it into personal attacks. Either
attack ideas or keep quiet. You don't have to leak out of attacking
ideas and into attacking individuals. You just plain don't. Resist the
urge.
TM>Also, OO'ers *do* seem to hard-wire domain taxonomies into production
TM>app code or build non-trivial data structures into their app
TM>(reinventing the DB) such that textbook puzzles and their production
TM>OO style perhaps do not really differ that much. Martin's payroll
TM>hardwired concepts and taxonomies into his sample, for example. Thus,
TM>to them it seems like "home".
>>1. Completely irrelevant to this thread, which is : Whose Fish - OO solution.
>>2. Completely irrelevant to this thread, because the solution given by the
>>OP does not "hard-wire domain taxonomies into production app code or build
>>non-trivial data structures" .
> It *is* relevant if their coding style for toy examples matches that
> of production code.
Anyone with a semblance of intelligence will forego matters of coding style
for a solution that is correct and understandable.
A fact that applies to both the OOP and SQL solutions posted.
TM>Hit me with your best shot. I do make sloppy mistakes sometimes, but
TM>I'm rarely fundimentally wrong so far.
>>Don't have to. You killed yourself with your own sword by the very fact
>>that you have even talked about using counter-terrorism as an example.
>>The fact that you cannot even keep track of your self-contradictions (and
>>only 3 weeks ago at that) is just more evidence of the fact that you are an
>>embarrassingly poor debater.
> If you can keep track of everything you've said 3 weeks ago, I applaud
> your memory.
Well no, you write so much rubbish on comp.object, who can expect you to
remember what you wrote. But because it is the same old rubbish, you should
at least maintain a stock collection of said rubbish (perhaps even titled/
enumerated so you don't have to repost it) .
> It is a good thing I forget stuff 3 weeks old, otherwise
> I would broil over all the personal insults an accusations of lies and
> fraud your hurl my way.
So you claim I have made statements that you a fraud (one who engages in
acts of deceit for material advantage/gain - financial traditionally) ??
IMHO claiming someone is a fraud is a far more serious matter than
claiming that they are a liar.
Checking Usenet archives on comp.object for "perryman" "topmind" "fraud"
(and spelling variations on the latter ) ...
Oh guess what, the *only* message that matches the search terms ??
The posting to *which I am replying* .
So you have deliberately made a statement known to be untrue.
Therefore you are a liar.
So you see:
1. comp.object doesn't have to have 3 weeks memory when it comes to
being reminded about your ways.
2. Liars need much better long-term memory, because they never know when
their lies are going to be challenged. and how (as I was taught from
knee-high : get your story straight) .
> (None objectively proven, by the way.)
QED.
TM>It was mostly a sarcistic joke.
>>1. Sarcastic, not sarcistic (you cannot even blame keyboard layout) .
>>2. Not a good joke.
>>3. It backfired on you.
> If YOU liked it, I would really be shocked. I expect you to dispise
> everything I say and do by now. It is thus unnecessary to report that
> you hate my jokes. Itsa given.
Reporting the facts != hatred.
TM>[1] YTD calcs and threasholds were not part of Martin's original
TM>requirements that I know of. Perhaps they should be added to a real
TM>package because they are fairly common. And I did note in my doc that
TM>I purposely did not include the period-end processing.
>>Why are you bleating on about the requirements in Robert Martins' payroll
>>example !!??
>>The topic of this thread is : Whose Fish - OO solution.
>>Not Robert Martins' employee payroll processing example.
> Somebody ASKED how I would add a YTD union fee limit. You clipped it
> out. (BTW, I've found a simpler way to add it since the above, if
> anybody's interested.)
No they didn't.
It was *I* who gave you a *suggestion* as to what kind of questions a
payroll variant of the "Whose fish" problem might be expected to answer.
So are you going to define a set of facts (in the format of the "Whose
fish" problem) for the payroll domain, and then set us the questions that
you want people to provide solution implementations for ??
TM>I wanted to settle on a less "puzzly" version of the example so that I
TM>could explore this issue of how "meta" it would need to be.
SP>As "meta" as one desires.
SP>The SQL and OOP solutions solved the specific problem.
TM>Most of the claims made about OOP involve it being easier to change.
>>The topic is : "Whose Fish - OO solution" .
> Okay then, how is the problem going to change over time? Let's explore
> change scenarios for Fish.
Fair enough. Give us the change scenarios that you wish to discuss.
TM>Without understanding something about the domain, it is hard to
TM>explore change patterns and their impact on the code.Will they always
TM>being dealing with fish, cigaretts, and houses, or will the nouns
TM>change? Who will enter/create the new nouns? Who will classify them?
TM>Will other apps share info about them? These are KEY questions for
TM>most apps that I've analyzed. Do you disagree?
>>Then provide a "real world" domain for an example.
>>The premise is very simple :
>>For some "real world" domain, devise a set of facts for that domain for
>>which some question can be asked. Then solicit solutions in s/w that will
>>answer the question with a given set of facts.
> We already did that with the payroll example.
Robert Martins' payroll example is nothing of the kind.
>>If you cannot do even expend effort on that front, don't expect anyone
>>to even bother with your suggestions for a "real world" example.
> You keep trying different examples until you find one that can bust P/R?
ROTFLMAO.
1. For the topic of this thread, OOP and SQL solutions have been given.
People on comp.object appear to be quite happy to discuss them.
2. It is *YOU* who wants to try "different examples" , not us.
The "Whose fish" problem is sufficiently representative of a type of
problem in the real world for which systems are built to solve. Fortunately
there are enough people here with sufficient intelligence to realise this
fact.
3. Because of your embarrassingly poor ability to remember what you have
written, or bother to check before you post here, your suggested choice of
"real world" example has made you look even more stupid.
TM>If the issue is something other than MAINTAINABILITY, then please
TM>state so.
>>Your usual cowardly attempt to evade something when the limits of your
>>intelligence/ability swoop into view.
>>The issue is about providing solutions to the "Whose fish" problem.
>>Not about MAINTAINABILITY.
> If maintenence be damned then it TRUELY is not a realistic example for
> the vast majority of apps. I rest my case. How about a cryptic Perl
> one-liner solution?
Reached rock-bottom again, and still digging (sigh) .
Any "cryptic" solution can be cosmetically changed into a more readable/
understandable form. A solution is *invariant* under cosmetic change.
Regards,
Steven Perryman
> You are such an arrogant delusional prick.
1. Thank you (very nice) .
2. If someone is delusional, it is useful to know what the claims of
delusion specifically relate to.
As we got nothing specific on 2, and from 1, in fact it appears that I got
very close to the truth.
But as always, please feel free to address 2 in more detail.
> And, you still have no objective evidence that OO is better after waving
> your ego in the airlike that
1. Still asking for the same "objective evidence" that you have
been told you can never get, the same "objective evidence" that
you cannot provide the converse for (SIGH) .
2. Still the same deluded person posting that same deluded rubbish for over
7 years (SIGH) .
Oh, can you clarify whether I recently saw a posting from you claiming
someone was delusional ... ??
Regards,
Steven Perryman
topmind wrote:
> Kreeg wrote:
>> topmind wrote:
>> *** MASS SNIPPAGE ***
>>> Then why is he and others pressing the issue? Why not hunt for a biz
>>> problem where OO kicks tail? Chock full of glorious polymorphism. That
>>> would make everyone happy. Is he just yanking me around for the sake
>>> of yankage?
>>>
>> Please go back to the original post of the original 'Whose Fish' thread,
>> by Jordan Marr. Here it is for you, in fact.
>>
>> http://groups.google.com/group/comp.object/msg/9a0ff58ddddb8329
>>
>> Mr. Marr actually states that he thinks that the 'Whose Fish' problem
>> would be a *great* problem to throw at a relational database, and wanted
>> to honestly see an implementation of it. However, you dismissed the
>> problem out of hand, and things degenerated from there.
>
> I have a right to criticize it. If you disagree with my criticism, you
> can respond or ignore it. Don't turn it into personal attacks. Either
> attack ideas or keep quiet. You don't have to leak out of attacking
> ideas and into attacking individuals. You just plain don't. Resist the
> urge.
>
I can only assume that you're using the collective 'you', here, and not
talking directly to me.
Whether Mr. Perryman wants to flame you or not, I don't care. However,
I will say that your criticism was totally off base. Someone posted an
OO solution to the 'Whose Fish' problem, explicitly saying that they'd
be interested in a relational solution, and you didn't so much as
criticize it as you just dismissed that entire domain of problems all
together *without even thinking about it*.
I don't even think you really read his post, because you totally ignored
the fact that Mr. Marr said that he thought that a relational database
may be able to do it better!
Your crazy embellished dramatic speculations on my allegedly sinister
internal motivations for why I do what I do. You act like you have a
certain window to my mind and that you are an excellent armchair
neuron debugger. Rational people know speculations about why others do
what they do is merely speculation, but you *act* like you have God's
blueprints in front of you.
If there is a single personality trait that trends through most OOP
supporters, it is mistaking their personal subjectivity for universe
truth.
>
> 1. Still asking for the same "objective evidence" that you have
> been told you can never get, the same "objective evidence" that
> you cannot provide the converse for (SIGH) .
What use is the Fish example if we have no objective comparison?
Everyone will like their *own* version in their fav language. No news
there. That's always the same outcome. I am just the messenger. You
can kick me for bearing the bad news all you want, but the outcome is
still the same with or without me. You are too busy slugging me to
notice the real problem. Typical of you.
> Regards,
> Steven Perryman
-T-
> On Jun 14, 1:12 am, S Perryman <q...@q.net> wrote:
>>topmind wrote:
>>>You are such an arrogant delusional prick.
>>1. Thank you (very nice) .
>>2. If someone is delusional, it is useful to know what the claims of
>>delusion specifically relate to.
> Your crazy embellished dramatic speculations on my allegedly sinister
> internal motivations for why I do what I do.
1. Who has alleged your "internal motivations" are sinister ??
2. Far from it. You are merely deluded. deluded != sinister.
> You act like you have a
> certain window to my mind and that you are an excellent armchair
> neuron debugger.
I do have a window to your mind.
We have had 7 years of your continual postings to comp.object to know
exactly how you act.
> Rational people know speculations about why others do
> what they do is merely speculation, but you *act* like you have God's
> blueprints in front of you.
No, but we have *your* "blueprints" here on comp.object .
An animal that spends 7 years continually dumping its bowels in the
same place cannot complain when the humans actually have a look at the
nasty mess and actually deduce much about it.
> If there is a single personality trait that trends through most OOP
> supporters, it is mistaking their personal subjectivity for universe
> truth.
Really ??
Please feel free to show us the objective evidence that supports this
claim ...
>>1. Still asking for the same "objective evidence" that you have
>>been told you can never get, the same "objective evidence" that
>>you cannot provide the converse for (SIGH) .
> What use is the Fish example if we have no objective comparison?
It is of academic interest.
That is why the OP presented the problem.
That is why someone provided an SQL solution.
That is why the OP provided an OOP solution.
> I am just the messenger. You
> can kick me for bearing the bad news all you want, but the outcome is
> still the same with or without me.
More delusions (continually proclaiming yourself as a "messenger"
delivering some great truth) ... ??
Regards,
Steven Perryman
It is fun and informative.
> Everyone will like their *own* version in their fav language.
That is simply untrue. I like my version, and I like the SQL version
that was posted. And I might add that I feel certain I would like the
Topmind version too. I am pleased that anyone else was amused enough
by it to enlighten themselves and the rest of us with their
solution.
>No news there.
Only that you are projecting your modus operandi onto everyone else.
Well, that's not new either.
>That's always the same outcome. I am just the messenger. You
> can kick me for bearing the bad news all you want, but the outcome is
> still the same with or without me.
Bad news? You have the unique ability to look at this thread and see
"bad news".
> You are too busy slugging me to
> notice the real problem. Typical of you.
Must be typical of me too, because I don't see any problem. Let me
correct that, I see a problem, but it is paired with two solutions
already. That's a pretty good ratio if you ask me. ;^)
jordan
Being understandable for a one-time homework problem and being
maintainable are not necessarily related. I don't know about your
code, but my one-time solutions look a lot different than my
"standing" app solutions.
>
> A fact that applies to both the OOP and SQL solutions posted.
>
>
> TM>Hit me with your best shot. I do make sloppy mistakes sometimes, but
> TM>I'm rarely fundimentally wrong so far.
>
> >>Don't have to. You killed yourself with your own sword by the very fact
> >>that you have even talked about using counter-terrorism as an example.
>
> >>The fact that you cannot even keep track of your self-contradictions (and
> >>only 3 weeks ago at that) is just more evidence of the fact that you are an
> >>embarrassingly poor debater.
>
> > If you can keep track of everything you've said 3 weeks ago, I applaud
> > your memory.
>
> Well no, you write so much rubbish on comp.object, who can expect you to
> remember what you wrote.
So I am prolific and forgetful. I have dandruf also, by the way.
> But because it is the same old rubbish, you should
> at least maintain a stock collection of said rubbish (perhaps even titled/
> enumerated so you don't have to repost it) .
You should perhaps do the same with your OOP proof. Oh you did, and
its Zero bytes. How about that.
>
>
> > It is a good thing I forget stuff 3 weeks old, otherwise
> > I would broil over all the personal insults an accusations of lies and
> > fraud your hurl my way.
>
> So you claim I have made statements that you a fraud (one who engages in
> acts of deceit for material advantage/gain - financial traditionally) ??
>
> IMHO claiming someone is a fraud is a far more serious matter than
> claiming that they are a liar.
That probably depends on the person. Its like asking if you would
rather be kicked in the nuts or punched in the stomach.
>
> Checking Usenet archives on comp.object for "perryman" "topmind" "fraud"
> (and spelling variations on the latter ) ...
>
> Oh guess what, the *only* message that matches the search terms ??
> The posting to *which I am replying* .
>
> So you have deliberately made a statement known to be untrue.
> Therefore you are a liar.
For pete's sake, we've been over this already. One is not lying if THE
TELLER does NOT know it to be false. You could argue that I was
careless for not checking, but that is a different sin. To give
evidence of "lying", you would have to present evidence that I *knew*
during the writing of that statment that you never uttered that word.
Since you accused me of having a bad memory, you couldn't have
expected that I track every word ever written in my mind.
And, I meant "fraud-like behavior", not necessarily a the word
verbatim. You are conveniently switching back and forth from informal
conversation mode to lawyer mode to suit your own slander needs. IOW,
a fair-weather lawyer.
>
> So you see:
>
> 1. comp.object doesn't have to have 3 weeks memory when it comes to
> being reminded about your ways.
>
> 2. Liars need much better long-term memory, because they never know when
> their lies are going to be challenged. and how (as I was taught from
> knee-high : get your story straight) .
>
>
> > (None objectively proven, by the way.)
>
> QED.
You are using the wrong definition of "liar". Otherwise "Dorry" on
Finding Nemo would be a massive "liar" by your def. Even the cartoons
prove are full of animated sh8t.
>
>
> TM>It was mostly a sarcistic joke.
>
> >>1. Sarcastic, not sarcistic (you cannot even blame keyboard layout) .
> >>2. Not a good joke.
> >>3. It backfired on you.
>
> > If YOU liked it, I would really be shocked. I expect you to dispise
> > everything I say and do by now. It is thus unnecessary to report that
> > you hate my jokes. Itsa given.
>
> Reporting the facts != hatred.
Calling people names similar to stupid or dummy is not "fact", unless
you can reverse engineer their neurons and show where the faulty
circuits are.
> >>Why are you bleating on about the requirements in Robert Martins' payroll
> >>example !!??
>
> >>The topic of this thread is : Whose Fish - OO solution.
> >>Not Robert Martins' employee payroll processing example.
>
> > Somebody ASKED how I would add a YTD union fee limit. You clipped it
> > out. (BTW, I've found a simpler way to add it since the above, if
> > anybody's interested.)
>
> No they didn't.
> It was *I* who gave you a *suggestion* as to what kind of questions a
> payroll variant of the "Whose fish" problem might be expected to answer.
If that was the case, I misinterpreted your question and I apologize.
>
> So are you going to define a set of facts (in the format of the "Whose
> fish" problem) for the payroll domain, and then set us the questions that
> you want people to provide solution implementations for ??
Didn't YTD qualify as one? You appear to be contradicting yourself.
You seem to be rejecting your own example.
> > Okay then, how is the problem going to change over time? Let's explore
> > change scenarios for Fish.
>
> Fair enough. Give us the change scenarios that you wish to discuss.
I cannot do it for a toy example. I don't live in Toyland. I don't
know the rules of that universe. Giant magnets pull the Road Runner? I
am only familiar with reality.
>
>
> TM>Without understanding something about the domain, it is hard to
> TM>explore change patterns and their impact on the code.Will they always
> TM>being dealing with fish, cigaretts, and houses, or will the nouns
> TM>change? Who will enter/create the new nouns? Who will classify them?
> TM>Will other apps share info about them? These are KEY questions for
> TM>most apps that I've analyzed. Do you disagree?
>
> >>Then provide a "real world" domain for an example.
> >>The premise is very simple :
>
> >>For some "real world" domain, devise a set of facts for that domain for
> >>which some question can be asked. Then solicit solutions in s/w that will
> >>answer the question with a given set of facts.
>
> > We already did that with the payroll example.
>
> Robert Martins' payroll example is nothing of the kind.
Please clarify. Do you mean Prolog-like logic questions?
>
>
> >>If you cannot do even expend effort on that front, don't expect anyone
> >>to even bother with your suggestions for a "real world" example.
>
> > You keep trying different examples until you find one that can bust P/R?
>
> ROTFLMAO.
>
> 1. For the topic of this thread, OOP and SQL solutions have been given.
> People on comp.object appear to be quite happy to discuss them.
I'm not stopping them. Im just complaining that it is not known how to
provide realistic change scenarios to toy problems. If you wish to use
some other criteria other than change scenarios, be my guest. Nobody
wants to suggest such. That is not my problem. If you don't like my
metrics, then GIVE AN ALTERNATIVE. Complaining is easy when you don't
have to give an alternative.
>
> 2. It is *YOU* who wants to try "different examples" , not us.
>
> The "Whose fish" problem is sufficiently representative of a type of
> problem in the real world for which systems are built to solve. Fortunately
> there are enough people here with sufficient intelligence to realise this
> fact.
I guess I am just dumb and you see stuff in that problem that I don't.
However, you are really bad at articulating what "it" is.
>
>
> 3. Because of your embarrassingly poor ability to remember what you have
> written, or bother to check before you post here, your suggested choice of
> "real world" example has made you look even more stupid.
Everything I do will end up looking "stupid" in your eye. I am
perfectly satisfied that my version of Payroll makes Martin's version
look like a bloated, hardwired mess. Your insults will not change that
feeling.
>
>
> TM>If the issue is something other than MAINTAINABILITY, then please
> TM>state so.
Still wating...
>
> >>Your usual cowardly attempt to evade something when the limits of your
> >>intelligence/ability swoop into view.
>
> >>The issue is about providing solutions to the "Whose fish" problem.
> >>Not about MAINTAINABILITY.
>
> > If maintenence be damned then it TRUELY is not a realistic example for
> > the vast majority of apps. I rest my case. How about a cryptic Perl
> > one-liner solution?
>
> Reached rock-bottom again, and still digging (sigh) .
> Any "cryptic" solution can be cosmetically changed into a more readable/
> understandable form. A solution is *invariant* under cosmetic change.
Ah, "readable". Okay, there's a potential metric other than
maintainability. So, how does one measure that to avoid subjectivity
fights?
>
>
> Regards,
> Steven Perryman
-T-
Depends on which psych theory is being used.
If I am truly deluded, then why complain? Would reminding Don Quixote
that he is crackers over and over and over actually *fix* him? I
ignore the shouting nutballs on the corner of the street. If you
equate me with them, then do the same: ignore them.
>
>
> > You act like you have a
> > certain window to my mind and that you are an excellent armchair
> > neuron debugger.
>
> I do have a window to your mind.
> We have had 7 years of your continual postings to comp.object to know
> exactly how you act.
How != Why
>
>
> > Rational people know speculations about why others do
> > what they do is merely speculation, but you *act* like you have God's
> > blueprints in front of you.
>
> No, but we have *your* "blueprints" here on comp.object .
You wrote my brian in OOP? Cool! Let me guess:
while (! self.dead) {
self.troll();
}
>
> An animal that spends 7 years continually dumping its bowels in the
> same place cannot complain when the humans actually have a look at the
> nasty mess and actually deduce much about it.
Then why do you continue to insult me, Mr. Bowel Mouth?
> >>1. Still asking for the same "objective evidence" that you have
> >>been told you can never get, the same "objective evidence" that
> >>you cannot provide the converse for (SIGH) .
>
> > What use is the Fish example if we have no objective comparison?
>
> It is of academic interest.
> That is why the OP presented the problem.
> That is why someone provided an SQL solution.
> That is why the OP provided an OOP solution.
The original never said, "Please don't evaluate this from a real-world
perspective, for it is *only* meant as an acedemic excercise". You
should thank me for taking the effort to try to clarify the scope and
purpose. It was goodwill on my part, but you see it as sinister.
>
> > I am just the messenger. You
> > can kick me for bearing the bad news all you want, but the outcome is
> > still the same with or without me.
>
> More delusions (continually proclaiming yourself as a "messenger"
> delivering some great truth) ... ??
In my head, yes. If I am nuts, I am not aware of it. From my point of
view you are just riding my arse on every point as revenge for
challenging OOP.
I would rather talk about real-world OO evidence, not me.
>
>
> Regards,
> Steven Perryman
-T-
Maybe way back in college when one thought that the real world did
resemble textbook puzzles.
>
> > Everyone will like their *own* version in their fav language.
>
> That is simply untrue. I like my version, and I like the SQL version
> that was posted. And I might add that I feel certain I would like the
> Topmind version too. I am pleased that anyone else was amused enough
> by it to enlighten themselves and the rest of us with their
> solution.
I mean as far as which one you would *pick* as your favorite, not the
issue of having lots to study. If you saw features of other's that
you liked, you would incorporate them into your version (assuming you
make a followup) when you make it the way you really want it.
>
> >No news there.
>
> Only that you are projecting your modus operandi onto everyone else.
> Well, that's not new either.
I am tired of all these personal insults and sinister motivation
speculations. Go f8ck yourself, Jordi! You are the "bad" one because
you guess other's motivations out loud without solid proof first. THAT
IS RUDE and bad habit around here.
>
>
> >That's always the same outcome. I am just the messenger. You
> > can kick me for bearing the bad news all you want, but the outcome is
> > still the same with or without me.
>
> Bad news? You have the unique ability to look at this thread and see
> "bad news".
I don't see any objective metrics. I consider that bad news. If you
merely want to see gajillion implementations in different languages
and have a rainbow diversity party withOUT critical comparisons, then
you are welcome to be pleased by such. To each their own.
> jordan
-T-
Ok, then why are you here (in this thread)? It seems to me there is
nothing left to discuss, and your feelin's is already hurt.
> > > Everyone will like their *own* version in their fav language.
>
> > That is simply untrue. I like my version, and I like the SQL version
> > that was posted. And I might add that I feel certain I would like the
> > Topmind version too. I am pleased that anyone else was amused enough
> > by it to enlighten themselves and the rest of us with their
> > solution.
>
> I mean as far as which one you would *pick* as your favorite, not the
> issue of having lots to study. If you saw features of other's that
> you liked, you would incorporate them into your version (assuming you
> make a followup) when you make it the way you really want it.
Exactly.. I wanted to see the way others would attack the problem
using different technologies. Then, I can possibly glean that
approach in the future, on a similar problem. The point is to learn.
Btw, I am happy with my solution so far, and don't see any changes to
make at this point. I am open to changes, but nothing has really been
suggested yet that I feel it needs.
> > >No news there.
>
> > Only that you are projecting your modus operandi onto everyone else.
> > Well, that's not new either.
>
> I am tired of all these personal insults and sinister motivation
> speculations. Go f8ck yourself, Jordi! You are the "bad" one because
> you guess other's motivations out loud without solid proof first. THAT
> IS RUDE and bad habit around here.
I always picture Jar-Jar Binks from Star Wars when you say point out
things that are "rude". You scare me a little bit when you start
throwing out words like, "bad", and "sin". It makes me think that I
better be nice to you. (and the winner of the "Most Likely to Bring
an Uzi into McDonalds" award is......)
You'll forget all about it in three weeks anyway. ;^)
It is just my opinion that you are projecting your M.O. onto everyone
else. You are the one who seems to be viewing this as a dog eat dog
competition. You seem a little paranoid.
I could have sworn that you weren't here to win a popularity contest
anyway. Your last message speaks to the contrary, which seems a
little bipolar to me. Did you also forget the myriad of insinuations
you've hurled at OO'ers over the last x years that OO is a crock? And
all the generalizations you've made about OOers.. "OO'ers always...."
> > >That's always the same outcome. I am just the messenger. You
> > > can kick me for bearing the bad news all you want, but the outcome is
> > > still the same with or without me.
>
> > Bad news? You have the unique ability to look at this thread and see
> > "bad news".
>
> I don't see any objective metrics. I consider that bad news. If you
> merely want to see gajillion implementations in different languages
> and have a rainbow diversity party withOUT critical comparisons, then
> you are welcome to be pleased by such. To each their own.
Well.. what is left for you to say in this thread? You basically
disaprove of the entire idea of writing a solution to Whose Fish,
which is the point of this thread. You're like a little black rain
cloud that comes and storms negativity on threads.
Jordan
topmind wrote:
> Jordan Marr wrote:
>>> What use is the Fish example if we have no objective comparison?
>> It is fun and informative.
>
> Maybe way back in college when one thought that the real world did
> resemble textbook puzzles.
>
Man. You really just aren't any fun at all, are you?
>
> I don't see any objective metrics. I consider that bad news. If you
> merely want to see gajillion implementations in different languages
> and have a rainbow diversity party withOUT critical comparisons, then
> you are welcome to be pleased by such. To each their own.
>
This is what he's talking about when he says you're projecting your
modus operandi on everyone else, IMO. You're crapping on the thread
because people are encouraging different approaches rather than trying
to pick apart every one and determine a 'best' one? IMO, applying that
kind of criteria to everything -- especially in software development --
is going to be an exercise in frustration. There are almost always
going to be different ways of skinning the proverbial cat, each with
their own pros and cons, and looking at new approaches with an open mind
is never a bad thing, if you ask me.
>> jordan
>
> -T-
>
> > > >No news there.
> >
> > > Only that you are projecting your modus operandi onto everyone else.
> > > Well, that's not new either.
> >
> > I am tired of all these personal insults and sinister motivation
> > speculations. Go f8ck yourself, Jordi! You are the "bad" one because
> > you guess other's motivations out loud without solid proof first. THAT
> > IS RUDE and bad habit around here.
>
> I always picture Jar-Jar Binks from Star Wars when you say point out
> things that are "rude". You scare me a little bit when you start
> throwing out words like, "bad", and "sin". It makes me think that I
> better be nice to you. (and the winner of the "Most Likely to Bring
> an Uzi into McDonalds" award is......)
It is a shortcut way to describe what you are implying. No matter what
I say or type, it is evidence to the vocal OO fans that I am either
evil or derranged or some combination in between. (Mr. Perry's quick-
trigger "liar liar!" acassations would make me put him on the Mc-uzi
list, btw. That strikes me as extremely immature.)
>
> You'll forget all about it in three weeks anyway. ;^)
>
> It is just my opinion that you are projecting your M.O. onto everyone
> else. You are the one who seems to be viewing this as a dog eat dog
> competition. You seem a little paranoid.
If I am the paranoid one, then why do you guys have to resort to so
many personal insults? I generally don't insult people and generally
don't speculate on their motivations except as retaliation. People who
have to put others down often are generally not comfortable with
themselves. There are far more polite ways communicate dissatisfaction
with an IDEA than insulting people personally. The primary is to
criticize the idea, NOT the person. That simple rule alone would make
comp.object a much nicer place.
It is simply rude and insulting to guess other people's internal
motivations out loud. I suspect a lot of people I deal with have less
than angelic motivations, but I don't normally go around telling them
what I really think.
It is a bad habit on comp.object and I am growing sick and tired of
it. It gets old and repetitative after a while, like a car alarm that
won't shut the hell up.
>
> I could have sworn that you weren't here to win a popularity contest
> anyway. Your last message speaks to the contrary, which seems a
> little bipolar to me.
Because you keep doing it so often that at times it gets on my nerve.
I can ignore a fly flittering around here and there, but a dozen of
them on a hot afternoon can get under one's skin. That is normal human
reaction, not bipolar dissorder. You are embellishing your personal
insults, which is icing on the insult cake.
> Did you also forget the myriad of insinuations
> you've hurled at OO'ers over the last x years that OO is a crock? And
> all the generalizations you've made about OOers.. "OO'ers always...."
I rarely do that in isolation. It is usually only after being
personally insulted.
>
> > > >That's always the same outcome. I am just the messenger. You
> > > > can kick me for bearing the bad news all you want, but the outcome is
> > > > still the same with or without me.
> >
> > > Bad news? You have the unique ability to look at this thread and see
> > > "bad news".
> >
> > I don't see any objective metrics. I consider that bad news. If you
> > merely want to see gajillion implementations in different languages
> > and have a rainbow diversity party withOUT critical comparisons, then
> > you are welcome to be pleased by such. To each their own.
>
> Well.. what is left for you to say in this thread? You basically
> disaprove of the entire idea of writing a solution to Whose Fish,
> which is the point of this thread. You're like a little black rain
> cloud that comes and storms negativity on threads.
So? Do you want everyone to always agree??? Part of the problem is
youses *reaction* to my criticism of fish, as if I shot a puppy or
something. If you don't like my criticism of it, then either comment
on the criticism itself, or ignore it. You don't have to call me names
or imply I am a defective human being for criticising it.
Just remember the simple principle:
Attack ideas, not people. It's that simple.
>
> Jordan
-T-
See! There you go again, a sweeping general insult. If you don't like
my criticism, then simply ignore it, not imply I am a less-than-
perfect being.
>
> >
> > I don't see any objective metrics. I consider that bad news. If you
> > merely want to see gajillion implementations in different languages
> > and have a rainbow diversity party withOUT critical comparisons, then
> > you are welcome to be pleased by such. To each their own.
> >
>
> This is what he's talking about when he says you're projecting your
> modus operandi on everyone else, IMO. You're crapping on the thread
> because people are encouraging different approaches rather than trying
> to pick apart every one and determine a 'best' one?
So? Perhaps we all want different things out of "Fish". That is not
necessarily a bad thing, but you paint what I want out of it in a bad
light that is personally insulting.
> IMO, applying that
> kind of criteria to everything -- especially in software development --
> is going to be an exercise in frustration.
That's life. I was frustrated when vendors tossed out good ideas for
OO and ruined some of my favorite tools and ideas, all without a
formal scientific "trial". Yes, maybe I have a chip on my shoulder,
but I use it to attack ideas, not people.
In short, raining on a parade by attacking ideas is less of a "sin"
than raining on people by attacking people. Retaliation for insulting
an idea by attacking people personally is thus socially improper. I
think most would agree with this.
> There are almost always
> going to be different ways of skinning the proverbial cat, each with
> their own pros and cons, and looking at new approaches with an open mind
> is never a bad thing, if you ask me.
Perhaps you guys should have said that up front. "We would like to
explore the different ways it could be solved out of curiousity of the
variety of ways it can be done. Things like long-term maintence are
not really an issue here."
Everybody will come in to such a problem with different expections and
desires, not all of them with happy faces. That's normal for any
project or task. If you want harmony, if you have to work at it or
pass out free Extacy. Otherwise, tolerate dissent without insulting
people personally.
I have a right to not like Fish. Grumpy people are allowed into the
bar as long as they don't personally insult others.
>
>
> >> jordan
> >
-T-
topmind wrote:
> Kreeg wrote:
>> topmind wrote:
>>> Jordan Marr wrote:
>>>>> What use is the Fish example if we have no objective comparison?
>>>> It is fun and informative.
>>> Maybe way back in college when one thought that the real world did
>>> resemble textbook puzzles.
>>>
>> Man. You really just aren't any fun at all, are you?
>
> See! There you go again, a sweeping general insult. If you don't like
> my criticism, then simply ignore it, not imply I am a less-than-
> perfect being.
>
Okay, my apologies. The sentence above was meant lightheartedly, and
not as an actual insult. I left out the winky face, my bad.
The thing is, everybody seemed to understand that except you. Not
necessarily because I think you're less intelligent or anything like
that, but because it seems you come into every thread with a certain
agenda, and that agenda clouds your perception. Just my observation,
take it for what it's worth.
No, it's a way for you to infer (incorrectly) what I mean. I never
meant to imply that you are evil. You're the one who inferred that,
and I happen find that inferrence a little unsettling. The fact that
you think I am passing moral judgement on you in a technical thread
seems odd and out of context.
I've seen you do plenty that is immature on this NG, so watch yourself
with those accusations.
And speaking of implications, you're the one implied that I am naive
for thinking this problem represents real world problems. That's the
kind of trash talk to turns into you "getting your feelings hurt" (I'm
not sure I really buy that either). You're all agenda, that hurt
feelings thing smacks of ulterior motives to me as well.
> > You'll forget all about it in three weeks anyway. ;^)
>
> > It is just my opinion that you are projecting your M.O. onto everyone
> > else. You are the one who seems to be viewing this as a dog eat dog
> > competition. You seem a little paranoid.
>
> If I am the paranoid one, then why do you guys have to resort to so
> many personal insults?
Because we are bad people?
> I generally don't insult people and generally
> don't speculate on their motivations except as retaliation.
Oh so it's OK to do it as retaliation?
> People who
> have to put others down often are generally not comfortable with
> themselves.
They're onto me!!
> There are far more polite ways communicate dissatisfaction
> with an IDEA than insulting people personally. The primary is to
> criticize the idea, NOT the person. That simple rule alone would make
> comp.object a much nicer place.
I can think of something else that would also work...
> It is simply rude and insulting to guess other people's internal
> motivations out loud. I suspect a lot of people I deal with have less
> than angelic motivations, but I don't normally go around telling them
> what I really think.
You just implied that I am not comfortable in my own skin. That was
rude. You hurt my feelings.
Therefore, you are a bad person too. Wait a minute! That means we
are all bad people! So I guess we are back to square one of this
useless tirade.
> It is a bad habit on comp.object and I am growing sick and tired of
> it. It gets old and repetitative after a while, like a car alarm that
> won't shut the hell up.
Then why don't you start a moderated version of comp.object. Oh wait,
because half your posts probably wouldn't make it through! lol That
would be what they call, "self defeating."
> > I could have sworn that you weren't here to win a popularity contest
> > anyway. Your last message speaks to the contrary, which seems a
> > little bipolar to me.
>
> Because you keep doing it so often that at times it gets on my nerve.
> I can ignore a fly flittering around here and there, but a dozen of
> them on a hot afternoon can get under one's skin. That is normal human
> reaction, not bipolar dissorder. You are embellishing your personal
> insults, which is icing on the insult cake.
True. But if you can't stand the heat...
> > Did you also forget the myriad of insinuations
> > you've hurled at OO'ers over the last x years that OO is a crock? And
> > all the generalizations you've made about OOers.. "OO'ers always...."
>
> I rarely do that in isolation. It is usually only after being
> personally insulted.
Yeah right.
> > > > >That's always the same outcome. I am just the messenger. You
> > > > > can kick me for bearing the bad news all you want, but the outcome is
> > > > > still the same with or without me.
>
> > > > Bad news? You have the unique ability to look at this thread and see
> > > > "bad news".
>
> > > I don't see any objective metrics. I consider that bad news. If you
> > > merely want to see gajillion implementations in different languages
> > > and have a rainbow diversity party withOUT critical comparisons, then
> > > you are welcome to be pleased by such. To each their own.
>
> > Well.. what is left for you to say in this thread? You basically
> > disaprove of the entire idea of writing a solution to Whose Fish,
> > which is the point of this thread. You're like a little black rain
> > cloud that comes and storms negativity on threads.
>
> So? Do you want everyone to always agree??? Part of the problem is
> youses *reaction* to my criticism of fish, as if I shot a puppy or
> something. If you don't like my criticism of it, then either comment
> on the criticism itself, or ignore it. You don't have to call me names
> or imply I am a defective human being for criticising it.
Ten points for using the word "youses". That was funny.
Don't try to change the subject by guilt tripping me. I've seen you
do this repeatedly; it is the part of your argument cycle where you
act all hurt feelings, and then try to rain BS guilt and moral
judgement on everyone who is playing with you in the sandbox. I'm not
having that, so you might as well block me, because it's not going to
work.
This kind of stuff follows you around for a reason. It's because you
stir it up constantly. Nobody made you hit the reply button over and
over again.
Jordan
It appears to me that you *were* passing a moral judgement with regard
to my complaining about the utility of the example.
> I've seen you do plenty that is immature on this NG, so watch yourself
> with those accusations.
And thats a personality judgement. I don't tell every individual who I
think is immature that they are immature. It does not need to be said,
and is too vague to be constructive criticism anyhow. If you don't
want to describe the specific nature of the "sin" in detail, then
don't mention it. Hit-and-run personality complaints are have no
practical use. Either do it full ass or no ass.
>
> And speaking of implications, you're the one implied that I am naive
> for thinking this problem represents real world problems. That's the
> kind of trash talk to turns into you "getting your feelings hurt" (I'm
> not sure I really buy that either). You're all agenda, that hurt
> feelings thing smacks of ulterior motives to me as well.
I didn't mean to imply that you yourself were naive, but merely
describing why I didn't feel the example would tell us anything
useful. If I indirectly *implied* such, I apologize. I'll try to word
it more carefully in the future if a similar issue comes up. If you
can show how I could have expressed my displeasure with such an
example *without* making it sound personal or insultive, I would be
happy to study such WORDING and learn. But I do have a right to
criticize the example.
>
> > > You'll forget all about it in three weeks anyway. ;^)
> >
> > > It is just my opinion that you are projecting your M.O. onto everyone
> > > else. You are the one who seems to be viewing this as a dog eat dog
> > > competition. You seem a little paranoid.
> >
> > If I am the paranoid one, then why do you guys have to resort to so
> > many personal insults?
>
> Because we are bad people?
I just asked, I didn't tell.
>
> > I generally don't insult people and generally
> > don't speculate on their motivations except as retaliation.
>
> Oh so it's OK to do it as retaliation?
No, ideally I should turn the other cheek (ignore it). But I am
human.
> > There are far more polite ways communicate dissatisfaction
> > with an IDEA than insulting people personally. The primary is to
> > criticize the idea, NOT the person. That simple rule alone would make
> > comp.object a much nicer place.
>
> I can think of something else that would also work...
Other than not criticizing it, I am open to suggestions. Technical
criticism should be expected and welcomed.
>
> > It is simply rude and insulting to guess other people's internal
> > motivations out loud. I suspect a lot of people I deal with have less
> > than angelic motivations, but I don't normally go around telling them
> > what I really think.
>
> You just implied that I am not comfortable in my own skin. That was
> rude. You hurt my feelings.
It was retaliation.
> Therefore, you are a bad person too. Wait a minute! That means we
> are all bad people! So I guess we are back to square one of this
> useless tirade.
There was certainly an escalation of hostilities. I realize that even
criticizing an idea can be taken personally even if there was no overt
personal insult. But I feel one has the right to criticize ideas
(hopefully in a fairly polite way).
> > > I could have sworn that you weren't here to win a popularity contest
> > > anyway. Your last message speaks to the contrary, which seems a
> > > little bipolar to me.
> >
> > Because you keep doing it so often that at times it gets on my nerve.
> > I can ignore a fly flittering around here and there, but a dozen of
> > them on a hot afternoon can get under one's skin. That is normal human
> > reaction, not bipolar dissorder. You are embellishing your personal
> > insults, which is icing on the insult cake.
>
> True. But if you can't stand the heat...
I end up generating heat of my own as retaliation, which results in
nasty flamewars. But I don't think everybody here wants to continue
doing that. I would rather attack code, not people.
>
> > > Did you also forget the myriad of insinuations
> > > you've hurled at OO'ers over the last x years that OO is a crock? And
> > > all the generalizations you've made about OOers.. "OO'ers always...."
> >
> > I rarely do that in isolation. It is usually only after being
> > personally insulted.
>
> Yeah right.
It is my personal code of conduct. If I'm slipping, I am not aware of
the slippage. If I slip, you are welcome to point it out.
> > > Well.. what is left for you to say in this thread? You basically
> > > disaprove of the entire idea of writing a solution to Whose Fish,
> > > which is the point of this thread. You're like a little black rain
> > > cloud that comes and storms negativity on threads.
> >
> > So? Do you want everyone to always agree??? Part of the problem is
> > youses *reaction* to my criticism of fish, as if I shot a puppy or
> > something. If you don't like my criticism of it, then either comment
> > on the criticism itself, or ignore it. You don't have to call me names
> > or imply I am a defective human being for criticising it.
>
> Ten points for using the word "youses". That was funny.
>
> Don't try to change the subject by guilt tripping me. I've seen you
> do this repeatedly; it is the part of your argument cycle where you
> act all hurt feelings,
It is not an act. I see *excessive* personal insults directed toward
me. Others have noticed it also. I don't see anything I've done to
deserve it (other than in-kind retaliation). I honestly don't. I have
not seen the "sin calculations" that you guys are using to conclude I
deserve such insults. You are not articulating clear enough what I do
that bothers you and why it is "bad". Being "prolific" is not
sufficient reason.
> and then try to rain BS guilt and moral
> judgement on everyone who is playing with you in the sandbox. I'm not
> having that, so you might as well block me, because it's not going to
> work.
>
> This kind of stuff follows you around for a reason. It's because you
> stir it up constantly. Nobody made you hit the reply button over and
> over again.
And nobody made you insult me over and over. It is my opinion that
people attack me personally because they don't like their favorite
paradigms/tools being scrutinized. Perhaps they take it personally.
However, I have a right to criticize on-topic technology and shouldn't
expect personal insults as retaliation. In the western world,
scrutiny of product/output is a way of life (for good or bad).
Saying a program has a flaw should NOT result in countering by saying
the criticizer's personality has a flaw. To me, that is a no-no, and I
think most people would agree (if not involved in middle of it at the
time of survey).
> Jordan
-T-
> >> There are almost always
> >> going to be different ways of skinning the proverbial cat, each with
> >> their own pros and cons, and looking at new approaches with an open mind
> >> is never a bad thing, if you ask me.
> >
> > Perhaps you guys should have said that up front. "We would like to
> > explore the different ways it could be solved out of curiousity of the
> > variety of ways it can be done. Things like long-term maintence are
> > not really an issue here."
> >
> > Everybody will come in to such a problem with different expections and
> > desires, not all of them with happy faces. That's normal for any
> > project or task. If you want harmony, [you] have to work at it or
> > pass out free Extacy. Otherwise, tolerate dissent without insulting
> > people personally.
> >
> The thing is, everybody seemed to understand that except you. Not
> necessarily because I think you're less intelligent or anything like
> that, but because it seems you come into every thread with a certain
> agenda, and that agenda clouds your perception. Just my observation,
> take it for what it's worth.
Criticism motivated by an "agenda" is still a criticism. Having an
agenda is not the same as being wrong. Somebody obsessed with Perl may
write a Perl version of Fish and brag about how it is shorter. That
is expected and the Perl fanatic should not be personally insulted
because of it. The Perler has a right to state their view. We all
have agendas, some concious some not. If you don't want to hear
criticism from perspective X, then simply ignore it. Why not just let
me vent about maintenence comparisons without pulling an eFreud on me?
Let it be said, and then move on.
Lisp fans have a reputation for being especially obnoxious, btw.
It is not clear to me at all why this is the case. If one wanted to
limit the KINDS of criticisms allowed on sample X, then please state
so up front.
> Someone posted an
> OO solution to the 'Whose Fish' problem, explicitly saying that they'd
> be interested in a relational solution, and you didn't so much as
> criticize it as you just dismissed that entire domain of problems all
> together *without even thinking about it*.
>
> I don't even think you really read his post, because you totally ignored
> the fact that Mr. Marr said that he thought that a relational database
> may be able to do it better!
I then replied why I didn't want to bother to present a relational
version, namely it is not real-world enough to test things like
maintenence and additions. I was then royally chewed out for that.
I don't get it.
-T-
topmind wrote:
> Kreeg wrote:
>> topmind wrote:
>
>
>>>> There are almost always
>>>> going to be different ways of skinning the proverbial cat, each with
>>>> their own pros and cons, and looking at new approaches with an open mind
>>>> is never a bad thing, if you ask me.
>>> Perhaps you guys should have said that up front. "We would like to
>>> explore the different ways it could be solved out of curiousity of the
>>> variety of ways it can be done. Things like long-term maintence are
>>> not really an issue here."
>>>
>>> Everybody will come in to such a problem with different expections and
>>> desires, not all of them with happy faces. That's normal for any
>>> project or task. If you want harmony, [you] have to work at it or
>>> pass out free Extacy. Otherwise, tolerate dissent without insulting
>>> people personally.
>>>
>> The thing is, everybody seemed to understand that except you. Not
>> necessarily because I think you're less intelligent or anything like
>> that, but because it seems you come into every thread with a certain
>> agenda, and that agenda clouds your perception. Just my observation,
>> take it for what it's worth.
>
> Criticism motivated by an "agenda" is still a criticism. Having an
> agenda is not the same as being wrong.
Wait a minute. Two paragraphs above this sentence you were quoted as
saying :
>>> Perhaps you guys should have said that up front. "We would like to
>>> explore the different ways it could be solved out of curiousity of
>>> the
>>> variety of ways it can be done. Things like long-term maintence are
>>> not really an issue here."
You seem to be telling me that if you had *known* the general intent of
the thread, you may have responded differently. But then the statement
above about 'agenda' seems to contradict that.
> Somebody obsessed with Perl may
> write a Perl version of Fish and brag about how it is shorter. That
> is expected and the Perl fanatic should not be personally insulted
> because of it. The Perler has a right to state their view. We all
> have agendas, some concious some not. If you don't want to hear
> criticism from perspective X, then simply ignore it. Why not just let
> me vent about maintenence comparisons without pulling an eFreud on me?
> Let it be said, and then move on.
>
> Lisp fans have a reputation for being especially obnoxious, btw.
>
\me looks around. Huh? That statement totally went over my head.
Should've clarified, sorry. The Lisp part was what went over my head.
Totally out of left field.
If you would have said, "I don't want to talk about maintanence and
change issues", perhaps I would have respected that wish. Not knowing
about such expectations, I offered my opinion WRT to maintanence. I
can't read minds. (And I still have the right to talk about
maintenance even if you don't want to, by the way.)
topmind wrote:
> Kreeg wrote:
>> topmind wrote:
>>> Kreeg wrote:
>>>> topmind wrote:
>>>
snip
> can't read minds. (And I still have the right to talk about
> maintenance even if you don't want to, by the way.)
>
Never disputed that, nor even intimated that I thought you didn't. You
have the right to disagree, just as others have the right to say
'talking about maintenance in this context is way off base' :-)
Okay, but why is it "way off base"? I truly don't understand why such
is seemingly taboo? I don't see the "rule"? Bringing up such at least
sets the context and parameters for what is not off base.
>From now on I'm going to preface all my new posts with "I don't want
Topmind to post in this thread" just so I can see if you respect my
wish. ;^)
> Go f8ck yourself, Jordi!
You're coming in loud and clear, PM. Thanks for all the value you
added to this thread.
Jordan
topmind wrote:
> On Jun 16, 7:36 pm, Kreeg <k...@sentdotcom.nospam> wrote:
>> topmind wrote:
>>> Kreeg wrote:
>>>> topmind wrote:
>>>>> Kreeg wrote:
>>>>>> topmind wrote:
>> snip
>>
>>> can't read minds. (And I still have the right to talk about
>>> maintenance even if you don't want to, by the way.)
>> Never disputed that, nor even intimated that I thought you didn't. You
>> have the right to disagree, just as others have the right to say
>> 'talking about maintenance in this context is way off base' :-)
>
> Okay, but why is it "way off base"? I truly don't understand why such
> is seemingly taboo? I don't see the "rule"? Bringing up such at least
> sets the context and parameters for what is not off base.
>
Again, not taboo, not forbidden, or anything like that. 'Way off base',
as in not really pertinent to the discussion.
To me, it's akin to someone offering a critique on your payroll example
that focused on variable names. The critique when taken in isolation
may be perfectly valid, but it had nothing to do with what you were
looking for when you posted the example, which was the overall approach.
It ends up being more distracting than it is helpful.
> S Perryman wrote:
SP>2. If someone is delusional, it is useful to know what the claims of
SP>delusion specifically relate to.
TM>Your crazy embellished dramatic speculations on my allegedly sinister
TM>internal motivations for why I do what I do.
>>1. Who has alleged your "internal motivations" are sinister ??
Still waiting for an answer to this one ...
>>2. Far from it. You are merely deluded. deluded != sinister.
> Depends on which psych theory is being used.
Feel free to tell us which "psych" theory defines : deluded = sinister.
> How != Why
In addition to how, we also know *why* .
>>No, but we have *your* "blueprints" here on comp.object .
> You wrote my brian in OOP? Cool! Let me guess:
> while (! self.dead) {
> self.troll();
> }
Is your "blueprint" defined in "P/R" ??
The outputs of your brain is a great argument for your cause, eh.
>>An animal that spends 7 years continually dumping its bowels in the
>>same place cannot complain when the humans actually have a look at the
>>nasty mess and actually deduce much about it.
> Then why do you continue to insult me, Mr. Bowel Mouth?
Having a look at the nasty mess you leave behind is forensics and not
insult.
SP>1. Still asking for the same "objective evidence" that you have
SP>been told you can never get, the same "objective evidence" that
SP>you cannot provide the converse for (SIGH) .
TM>What use is the Fish example if we have no objective comparison?
>>It is of academic interest.
>>That is why the OP presented the problem.
>>That is why someone provided an SQL solution.
>>That is why the OP provided an OOP solution.
> The original never said, "Please don't evaluate this from a real-world
> perspective, for it is *only* meant as an acedemic excercise".
Here is what the OP *actually wrote* :
<quote>
http://www.coudal.com/thefish.php
I was once given this question at a job interview (my boss liked to
stress people out). Although I didn't finish the question during the
interview, I still got the job.
So this weekend I created an OO program that solves the problem within
1 to 29 seconds, depending on what order my attributes are initially
entered.
Mine is totally OO and uses no relation database at all, however, it
seems like a great problem to throw at a relational database, which I
would guess may be able to solve it faster.
Any takers? <ahem> ;^)
Jordan
</quote>
> You should thank me for taking the effort to try to clarify the scope and
> purpose. It was goodwill on my part, but you see it as sinister.
LOL.
1. There was no "scope and purpose" . It was a simple academic problem.
So in fact it was *you* who saw the "Whose fish" problem as sinister.
2. And as for "clarifying" , you spent days thrashing from pillar to post
with your embarrassingly pathetic attempts to claim why you *should not*
attempt the problem,
>>More delusions (continually proclaiming yourself as a "messenger"
>>delivering some great truth) ... ??
> In my head, yes. If I am nuts, I am not aware of it.
1. Thank you for your honesty.
2. Isn't a facet of delusional behaviour not being aware of the delusion ??
> From my point of
> view you are just riding my arse on every point as revenge for
> challenging OOP.
> I would rather talk about real-world OO evidence, not me.
LOL.
Your "challenging OOP" merely consists of :
- what you have heard the proverbial "bloke in the pub" say about OOP
- been foolish enough to take it as gospel
- provided hack writing and junk science in an attempt to debunk the
bloke in the pub (which amusingly you failed to do even that)
- deluded yourself into demanding "objective proof" for claims that no
one on comp.object has ever made (as evidenced by the fact that you
cannot even cite - even in the age of online Usenet archives - where
these claims are actually made)
Where is the "challenge" in that ??
OTOH, I will take issue with the fact that :
- you continually post the same rubbish to comp.object for 7+ yrs,
without actually furthering the knowledge base of OO. The smell and
volume of your bowel-dumping has made comp.object an unpleasant place.
Regards,
Steven Perryman
I suppose I need to start logging yourses insults and implications
because either youses have a very short memory, or insult out of habit
so frequently that you don't even know you are doing it.
>
>
> >>2. Far from it. You are merely deluded. deluded != sinister.
>
> > Depends on which psych theory is being used.
>
> Feel free to tell us which "psych" theory defines : deluded = sinister.
Your explanations waffle between being intentionally sinister and
Quixote-like delusional. (It may be that they are the same thing,
depending on psych theories used.)
>
>
> > How != Why
>
> In addition to how, we also know *why* .
Yes, the great neuron-debugger-at-a-distance you are. NOT.
> >>It is of academic interest.
> >>That is why the OP presented the problem.
> >>That is why someone provided an SQL solution.
> >>That is why the OP provided an OOP solution.
>
> > The original never said, "Please don't evaluate this from a real-world
> > perspective, for it is *only* meant as an acedemic excercise".
>
> Here is what the OP *actually wrote* :
>
> <quote>
>
> http://www.coudal.com/thefish.php
>
> I was once given this question at a job interview (my boss liked to
> stress people out). Although I didn't finish the question during the
> interview, I still got the job.
>
> So this weekend I created an OO program that solves the problem within
> 1 to 29 seconds, depending on what order my attributes are initially
> entered.
>
> Mine is totally OO and uses no relation database at all, however, it
> seems like a great problem to throw at a relational database, which I
> would guess may be able to solve it faster.
>
> Any takers? <ahem> ;^)
>
> Jordan
>
> </quote>
>
Your point? I later pointed out why I didn't want to participate,
namely lack of ties to real-world issues such as change and
mantenance. I see nothing wrong with that.
>
> > You should thank me for taking the effort to try to clarify the scope and
> > purpose. It was goodwill on my part, but you see it as sinister.
>
> LOL.
UnLOL.
>
> 1. There was no "scope and purpose" . It was a simple academic problem.
No purpose??? I rest my case.
>
> So in fact it was *you* who saw the "Whose fish" problem as sinister.
That is not my complaint. You are mixing things up.
>
> 2. And as for "clarifying" , you spent days thrashing from pillar to post
> with your embarrassingly pathetic attempts to claim why you *should not*
> attempt the problem,
>
>
> >>More delusions (continually proclaiming yourself as a "messenger"
> >>delivering some great truth) ... ??
>
> > In my head, yes. If I am nuts, I am not aware of it.
>
> 1. Thank you for your honesty.
> 2. Isn't a facet of delusional behaviour not being aware of the delusion ??
If so, then why insult delusional people? Would Don Quixote be "fixed"
by nagging him all the time about his delusions? If so, why hasn't Nag
Therapy been instituted at the local loony bin? Wives would have
discovered such a solution a looooong time ago.
> Your "challenging OOP" merely consists of :
>
> - what you have heard the proverbial "bloke in the pub" say about OOP
Show us the True and Correct oop with code if you don't like my
characterizations. You always complain without presenting
alternatives. Bosses fire people for such. If you don't have an
alternative, then you are not allowed to complain about the current
course.
>
> - been foolish enough to take it as gospel
>
> - provided hack writing and junk science in an attempt to debunk the
> bloke in the pub (which amusingly you failed to do even that)
It is not even my burden to show it objectively better. If I was a
pile of scum on the bottom of a pond, you STILL have no objective
proof OO is better for biz apps. Don't deflect your burden.
>
> - deluded yourself into demanding "objective proof" for claims that no
> one on comp.object has ever made (as evidenced by the fact that you
> cannot even cite - even in the age of online Usenet archives - where
> these claims are actually made)
If everyone stated that they agree and admit that OO is not
objectively better and stop *implying* it, I wouldn't have to do what
I do.
>
>
> Where is the "challenge" in that ??
>
>
> OTOH, I will take issue with the fact that :
>
> - you continually post the same rubbish to comp.object for 7+ yrs,
> without actually furthering the knowledge base of OO.
That is your opinion. I've asked tough questions and showed change
scenarios that the poster and defenders failed to consider or
downplayed.
> The smell and
> volume of your bowel-dumping has made comp.object an unpleasant place.
The feeling is mutual.
>
>
> Regards,
> Steven Perryman
-T-
And they have every goddam right to do that and I have NO RIGHT to
call them personal names for doing such (even if they irritate me).
> The critique when taken in isolation
> may be perfectly valid, but it had nothing to do with what you were
> looking for when you posted the example, which was the overall approach.
> It ends up being more distracting than it is helpful.
If a reader is interested in variable names, then it is not
"distracting" to *them*. Your goals are not necessarily other's goals.
If somebody goes into a subtopic that you are not interested in, THEN
SIMPLY IGNORE IT.
QED
-T-
Fine. Whatever. If people disagree with you you want them just to let
you have your say and not challenge you. Can we please end this
sub-topic now? I think it's sufficiently destroyed what started out as
an interesting thread. :-/
> -T-
>
Jordan Marr wrote:
> I never posted my solution to Whose Fish, and since my old thread
> probably has a stigma attached to it, I'll post it here.
>
*SNIP the rest of Jordan's code*
I had commented earlier that I'd like to see a linq implementation of
this problem. Well, in an attempt to salvage this thread at least a
little bit, I thought I'd give one a try.
I used Jordan's OO implementation as a base, and basically used his
entity objects without modification (I did end up adding a constructor
to the Street class).
Jordan's code that I stole so much from can be found here:
http://groups.google.com/group/comp.object/msg/73c3044ff3069baa
I cheated a bit (well, maybe a lot) and just used his IsValid rules to
do my filtering, and used linq to make some other parts of the code a
little clearer and more compact, I think. I actually end up liking the
finished product a fair bit. Maybe I'll try to make it all linq in the
future, but here's what I have. It's the first Linq that I've done, so
I may well have missed some obvious things.
On my laptop (a lowly centrino 1.4ghz) this runs in about 3 seconds.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessFramework;
using Entities;
namespace Whose_Fish
{
class LinqProgram
{
public void Solve()
{
//no cross join in linq AFAIK, so I have to do an inner
join on 1 == 1
var allHouses = from Nationalities n in
Enum.GetValues(typeof(Nationalities))
join HouseColors c in
Enum.GetValues(typeof(HouseColors)) on 1 equals 1
join Drinks d in
Enum.GetValues(typeof(Drinks)) on 1 equals 1
join Pets p in
Enum.GetValues(typeof(Pets)) on 1 equals 1
join Smokes s in
Enum.GetValues(typeof(Smokes)) on 1 equals 1
join int o in new int[]{0,1,2,3,4} on 1
equals 1
select new House() { Nationality = n,
HouseColor = c, Drink = d, Order=o, Pet=p, Smoke=s };
var validHouses = from h in allHouses
where h.IsValid
select h;
Console.WriteLine("{0} valid houses", validHouses.Count());
var streets = from h1 in validHouses
where h1.Order == 0
join h2 in validHouses on 1 equals h2.Order
join h3 in validHouses on 2 equals h3.Order
join h4 in validHouses on 3 equals h4.Order
join h5 in validHouses on 4 equals h5.Order
select new Street(h1, h2, h3, h4, h5);
Console.WriteLine("{0} total street permutations.",
streets.Count());
var result = from s in streets
where s.IsValid
select s;
foreach (Street h in result)
{
Console.WriteLine(h.DescribeStreet());
}
Console.ReadKey();
}
}
}
>
> Jordan
>
Fantastic!
Can I download the 3.0 extensions for free to run this?
Jordan
Jordan Marr wrote:
> On Jun 17, 8:48 pm, Kreeg <k...@sentdotcom.nospam> wrote:
>> Jordan Marr wrote:
>>> I never posted my solution to Whose Fish, and since my old thread
>>> probably has a stigma attached to it, I'll post it here.
>> *SNIP the rest of Jordan's code*
>>
>> I had commented earlier that I'd like to see a linq implementation of
>> this problem. Well, in an attempt to salvage this thread at least a
>> little bit, I thought I'd give one a try.
>>
*SNIP *>
> Fantastic!
>
> Can I download the 3.0 extensions for free to run this?
>
> Jordan
>
Thanks!
Yeah, the C# 3.5 bits are free. I wrote the code with the Visual Studio
Orcas Beta 1, which was a big (a gig or so) download, but is also free.
You may be able to get a .NET 3.5 CTP or something with the
command-line compiler, which is probably a smaller download.
Here's a link with some links to other downloads:
http://blogs.msdn.com/charlie/archive/2007/04/19/visual-studio-orcas-beta-1-available.aspx
Some of you replied with excessive *personal* insults. That's what
started this mess.
> Can we please end this
> sub-topic now? I think it's sufficiently destroyed what started out as
> an interesting thread. :-/
Thread branch A bends around and kicks branch B in the nuts? I don't
think so. You are exaggerating.
>
>
-T-
Not really. A thread gets far enough off-topic and people start
ignoring it, simple as that. Happened with the last 'Whose Fish' thread.
This is the last post I'm making to this thread branch.
>>
>
> -T-
>
3 seconds... that is even faster than the SQL example. Linq seems to
have provided the fastest solution yet!
Does changing the order of the enum lists have any noticeable affect
on the time?
Jordan
I'll have to try that tonight. Just to clarify, are you talking about
changing the order of the values within the enums, or changing the order
in which the enums are joined together to form the list of House
permutations? I'm assuming the former.
I wouldn't think that it would have any effect, though, because unlike
your code mine iterates over all of the possible Street permutations no
matter what. If I remember correctly yours had a short-circuit where if
it found a valid street it stopped processing, right? Were your
performance differences because of that short circuit, where a correct
answer early in the list of Street permutations short-circuits the rest
of the list?
> Jordan
>
My apologies if this ends up double-posting. :-/
My apologies if this ends up double-posting. :-/
I'll have to try that. Just to clarify, are you talking about changing
That is correct. It iterates until it finds a valid street and then
stops.
So you're saying that the Linq solution iterates all streets (no short
circuit). If the same validation logic is taking place *more times*
in the Linq version, how does Linq make it run so much faster? It
still has to loop through and run the validation algorithm.
Thoughts?
Jordan
When you timed your solution, did you have the Console.Writeline in each
iteration? I had your implementation up and running on my machine
without outputting to the console, and it ran in about the same amount
of time as the Linq solution.
> Jordan
>
Good catch my friend! It is so obvious that I completely overlooked
how much time it adds to display each count on screen! I guess it
just goes to show how much the industry has shifted my emphasis toward
the notion that "visual interface == user satisfaction".
Now my solution runs anywhere between 0 to 1 second. That is pretty
much instantaneous!
Jordan