Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #20377 > unrolled thread
| Started by | infinitum3d@hotmail.com |
|---|---|
| First post | 2012-12-16 07:38 -0800 |
| Last post | 2012-12-18 10:35 -0800 |
| Articles | 20 on this page of 100 — 15 participants |
Back to article view | Back to comp.lang.java.programmer
proper use of .java files (layout) infinitum3d@hotmail.com - 2012-12-16 07:38 -0800
Re: proper use of .java files (layout) Robert Klemme <shortcutter@googlemail.com> - 2012-12-16 16:43 +0100
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-16 10:50 -0500
Re: proper use of .java files (layout) "John B. Matthews" <nospam@nospam.invalid> - 2012-12-16 16:25 -0500
Re: proper use of .java files (layout) markspace <-@.> - 2012-12-16 08:24 -0800
Re: proper use of .java files (layout) Lew <lewbloch@gmail.com> - 2012-12-17 10:28 -0800
Re: proper use of .java files (layout) markspace <-@.> - 2012-12-17 13:17 -0800
Re: proper use of .java files (layout) Lew <lewbloch@gmail.com> - 2012-12-17 13:51 -0800
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-17 20:55 -0500
Re: proper use of .java files (layout) Gene Wirchenko <genew@telus.net> - 2012-12-17 18:18 -0800
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-17 21:28 -0500
Re: proper use of .java files (layout) Gene Wirchenko <genew@telus.net> - 2012-12-17 21:10 -0800
Re: proper use of .java files (layout) Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-12-18 08:53 -0500
Re: proper use of .java files (layout) Gene Wirchenko <genew@telus.net> - 2012-12-18 09:13 -0800
Re: proper use of .java files (layout) Patricia Shanahan <pats@acm.org> - 2012-12-18 09:23 -0800
Re: proper use of .java files (layout) Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-12-18 13:49 -0500
Re: proper use of .java files (layout) Gene Wirchenko <genew@telus.net> - 2012-12-18 15:05 -0800
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-18 20:11 -0500
Re: proper use of .java files (layout) Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-12-18 21:07 -0500
Re: proper use of .java files (layout) lipska the kat <lipskathekat@yahoo.co.uk> - 2012-12-19 09:33 +0000
Re: proper use of .java files (layout) Gene Wirchenko <genew@telus.net> - 2012-12-19 10:12 -0800
Re: proper use of .java files (layout) Lew <lewbloch@gmail.com> - 2012-12-19 13:35 -0800
Re: proper use of .java files (layout) Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-12-19 15:55 -0600
Re: proper use of .java files (layout) Lew <lewbloch@gmail.com> - 2012-12-19 14:01 -0800
Re: proper use of .java files (layout) Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-12-19 16:05 -0600
Re: proper use of .java files (layout) Patricia Shanahan <pats@acm.org> - 2012-12-19 04:06 -0800
Re: proper use of .java files (layout) lipska the kat <lipskathekat@yahoo.co.uk> - 2012-12-19 12:24 +0000
Re: proper use of .java files (layout) Lew <lewbloch@gmail.com> - 2012-12-19 13:36 -0800
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-18 20:10 -0500
Re: proper use of .java files (layout) Joshua Cranmer <Pidgeot18@verizon.invalid> - 2012-12-18 12:14 -0600
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-18 20:04 -0500
Re: proper use of .java files (layout) Gene Wirchenko <genew@telus.net> - 2012-12-19 10:14 -0800
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-19 19:18 -0500
Re: proper use of .java files (layout) lipska the kat <lipskathekat@yahoo.co.uk> - 2012-12-20 11:05 +0000
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-27 21:43 -0500
Re: proper use of .java files (layout) Lew <lewbloch@gmail.com> - 2012-12-27 18:49 -0800
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-27 22:10 -0500
Re: proper use of .java files (layout) Gene Wirchenko <genew@telus.net> - 2012-12-20 09:01 -0800
Re: proper use of .java files (layout) Patricia Shanahan <pats@acm.org> - 2012-12-20 09:30 -0800
Re: proper use of .java files (layout) Gene Wirchenko <genew@telus.net> - 2012-12-20 13:35 -0800
Re: proper use of .java files (layout) Patricia Shanahan <pats@acm.org> - 2012-12-20 14:00 -0800
Re: proper use of .java files (layout) lipska the kat <lipskathekat@yahoo.co.uk> - 2012-12-21 08:58 +0000
Re: proper use of .java files (layout) Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-12-21 10:36 -0800
Re: proper use of .java files (layout) lipska the kat <lipskathekat@yahoo.co.uk> - 2012-12-21 18:43 +0000
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-27 22:05 -0500
Re: proper use of .java files (layout) lipska the kat <lipskathekat@yahoo.co.uk> - 2012-12-28 09:57 +0000
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-27 21:59 -0500
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-27 21:53 -0500
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-27 21:54 -0500
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-27 21:48 -0500
Re: proper use of .java files (layout) Gene Wirchenko <genew@telus.net> - 2012-12-27 21:11 -0800
Re: proper use of .java files (layout) "John B. Matthews" <nospam@nospam.invalid> - 2012-12-28 06:50 -0500
Re: proper use of .java files (layout) lipska the kat <lipskathekat@yahoo.co.uk> - 2012-12-28 13:46 +0000
Re: proper use of .java files (layout) Gene Wirchenko <genew@telus.net> - 2012-12-28 09:10 -0800
Re: proper use of .java files (layout) lipska the kat <lipskathekat@yahoo.co.uk> - 2012-12-18 09:50 +0000
Re: proper use of .java files (layout) "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2012-12-18 13:09 +0000
Re: proper use of .java files (layout) lipska the kat <lipskathekat@yahoo.co.uk> - 2012-12-18 14:05 +0000
Re: proper use of .java files (layout) Gene Wirchenko <genew@telus.net> - 2012-12-25 15:06 -0800
Re: proper use of .java files (layout) Patricia Shanahan <pats@acm.org> - 2012-12-26 06:31 -0800
Re: proper use of .java files (layout) Lew <lewbloch@gmail.com> - 2012-12-26 13:21 -0800
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-26 23:38 -0500
Re: proper use of .java files (layout) lipska the kat <lipskathekat@yahoo.co.uk> - 2012-12-27 08:37 +0000
Re: proper use of .java files (layout) Robert Klemme <shortcutter@googlemail.com> - 2012-12-27 11:51 +0100
Re: proper use of .java files (layout) Patricia Shanahan <pats@acm.org> - 2012-12-27 08:46 -0800
Re: proper use of .java files (layout) Robert Klemme <shortcutter@googlemail.com> - 2012-12-27 18:20 +0100
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-27 20:48 -0500
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-17 20:58 -0500
Re: proper use of .java files (layout) Gene Wirchenko <genew@telus.net> - 2012-12-17 18:22 -0800
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-17 21:39 -0500
Re: proper use of .java files (layout) Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-12-17 21:25 -0500
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-17 21:29 -0500
Re: proper use of .java files (layout) Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-12-17 21:32 -0500
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-17 21:37 -0500
Re: proper use of .java files (layout) Wayne <nospam@all.invalid> - 2012-12-18 18:45 -0500
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-18 20:13 -0500
Re: proper use of .java files (layout) infinitum3d@hotmail.com - 2012-12-16 09:23 -0800
Re: proper use of .java files (layout) infinitum3d@hotmail.com - 2012-12-16 21:07 -0800
Re: proper use of .java files (layout) lipska the kat <lipskathekat@yahoo.co.uk> - 2012-12-17 10:32 +0000
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-17 21:03 -0500
Re: proper use of .java files (layout) lipska the kat <lipskathekat@yahoo.co.uk> - 2012-12-18 09:34 +0000
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-18 20:00 -0500
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-18 20:01 -0500
Re: proper use of .java files (layout) infinitum3d@hotmail.com - 2012-12-18 06:32 -0800
Re: proper use of .java files (layout) lipska the kat <lipskathekat@yahoo.co.uk> - 2012-12-18 15:05 +0000
Re: proper use of .java files (layout) Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-12-18 11:07 -0500
Re: proper use of .java files (layout) lipska the kat <lipskathekat@yahoo.co.uk> - 2012-12-18 16:27 +0000
Re: proper use of .java files (layout) Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-12-18 11:44 -0500
Re: proper use of .java files (layout) lipska the kat <lipskathekat@yahoo.co.uk> - 2012-12-18 17:21 +0000
Re: proper use of .java files (layout) Gene Wirchenko <genew@telus.net> - 2012-12-18 09:21 -0800
Re: proper use of .java files (layout) lipska the kat <lipskathekat@yahoo.co.uk> - 2012-12-18 17:39 +0000
Re: proper use of .java files (layout) Gene Wirchenko <genew@telus.net> - 2012-12-18 10:40 -0800
Re: proper use of .java files (layout) lipska the kat <lipskathekat@yahoo.co.uk> - 2012-12-18 19:05 +0000
Re: proper use of .java files (layout) Gene Wirchenko <genew@telus.net> - 2012-12-18 15:15 -0800
Re: proper use of .java files (layout) Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-12-18 14:12 -0500
Re: proper use of .java files (layout) lipska the kat <lipskathekat@yahoo.co.uk> - 2012-12-18 19:39 +0000
Re: proper use of .java files (layout) Gene Wirchenko <genew@telus.net> - 2012-12-18 15:17 -0800
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-18 20:07 -0500
Re: proper use of .java files (layout) Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-12-18 21:11 -0500
Re: proper use of .java files (layout) Arne Vajhøj <arne@vajhoej.dk> - 2012-12-18 22:24 -0500
Re: proper use of .java files (layout) markspace <-@.> - 2012-12-18 10:35 -0800
Page 3 of 5 — ← Prev page 1 2 [3] 4 5 Next page →
| From | Patricia Shanahan <pats@acm.org> |
|---|---|
| Date | 2012-12-20 14:00 -0800 |
| Message-ID | <L_qdnR43pMcYF07NnZ2dnUVZ_uudnZ2d@earthlink.com> |
| In reply to | #20645 |
On 12/20/2012 1:35 PM, Gene Wirchenko wrote: > On Thu, 20 Dec 2012 09:30:09 -0800, Patricia Shanahan <pats@acm.org> ... >> Perhaps more importantly, why do we need an order? > > Many card games require order to rank hands or determine which > card beats which. I agree that a game may require and impose an order, but each game's order is different. Indeed, the order can even change during a game. For example, the ranking for winning trick in a bridge game depends on the contract and the suit of the trick's lead card. I expect many games to declare and use a Comparator<Card>. I'm suggesting that Card should not itself be Comparable. Patricia
[toc] | [prev] | [next] | [standalone]
| From | lipska the kat <lipskathekat@yahoo.co.uk> |
|---|---|
| Date | 2012-12-21 08:58 +0000 |
| Message-ID | <TZWdnRQfYL5NuUnNnZ2dnUVZ7qudnZ2d@bt.com> |
| In reply to | #20648 |
On 20/12/12 22:00, Patricia Shanahan wrote: > On 12/20/2012 1:35 PM, Gene Wirchenko wrote: >> On Thu, 20 Dec 2012 09:30:09 -0800, Patricia Shanahan <pats@acm.org> > ... >>> Perhaps more importantly, why do we need an order? >> >> Many card games require order to rank hands or determine which >> card beats which. > > I agree that a game may require and impose an order, but each game's > order is different. Indeed, the order can even change during a game. For > example, the ranking for winning trick in a bridge game depends on the > contract and the suit of the trick's lead card. > > I expect many games to declare and use a Comparator<Card>. I'm > suggesting that Card should not itself be Comparable. > A Comparator is an abstraction of what we as human beings do when we compare values. You can have a Comparator that compares in any way you want. A Comparator would effectively implement a sub set of the rules of the game. Seems a perfectly logical suggestion to me Once again if not a Comparator then what. It's all vary well playing devils advocate but sooner or later something actually needs to be written down. Asking 'why do we need an order' exposes either a surprisingly poor insight into a very common phenomena (the Playing Card/Card Game) or a pathalogical reluctance to commit oneself to a potential solution for fear of it being 'wrong' somewhere down the line. Object Oriented software engineering provides many mechanisms to deal with changing requirements, altered and enhanced insights and good old fashioned 'mistakes' Of course first you need to have the idea. lipska -- Lipska the Kat©: Troll hunter, sandbox destroyer and farscape dreamer of Aeryn Sun
[toc] | [prev] | [next] | [standalone]
| From | Daniel Pitts <newsgroup.nospam@virtualinfinity.net> |
|---|---|
| Date | 2012-12-21 10:36 -0800 |
| Message-ID | <P_1Bs.42993$LS5.38665@newsfe10.iad> |
| In reply to | #20655 |
On 12/21/12 12:58 AM, lipska the kat wrote: > On 20/12/12 22:00, Patricia Shanahan wrote: >> On 12/20/2012 1:35 PM, Gene Wirchenko wrote: >>> On Thu, 20 Dec 2012 09:30:09 -0800, Patricia Shanahan <pats@acm.org> >> ... >>>> Perhaps more importantly, why do we need an order? >>> >>> Many card games require order to rank hands or determine which >>> card beats which. >> >> I agree that a game may require and impose an order, but each game's >> order is different. Indeed, the order can even change during a game. For >> example, the ranking for winning trick in a bridge game depends on the >> contract and the suit of the trick's lead card. >> >> I expect many games to declare and use a Comparator<Card>. I'm >> suggesting that Card should not itself be Comparable. >> > > A Comparator is an abstraction of what we as human beings do when we > compare values. You can have a Comparator that compares in any way you > want. > > A Comparator would effectively implement a sub set of the rules of the > game. Seems a perfectly logical suggestion to me > > Once again if not a Comparator then what. Patricia is agreeing with the use of Comparator, and against the use of Comparable, two very different interfaces.
[toc] | [prev] | [next] | [standalone]
| From | lipska the kat <lipskathekat@yahoo.co.uk> |
|---|---|
| Date | 2012-12-21 18:43 +0000 |
| Message-ID | <ipKdnUdAmOdxMEnNnZ2dnUVZ8m-dnZ2d@bt.com> |
| In reply to | #20662 |
On 21/12/12 18:36, Daniel Pitts wrote: > On 12/21/12 12:58 AM, lipska the kat wrote: >> On 20/12/12 22:00, Patricia Shanahan wrote: >>> On 12/20/2012 1:35 PM, Gene Wirchenko wrote: >>>> On Thu, 20 Dec 2012 09:30:09 -0800, Patricia Shanahan <pats@acm.org> >>> ... >>>>> Perhaps more importantly, why do we need an order? >>>> >>>> Many card games require order to rank hands or determine which >>>> card beats which. >>> >>> I agree that a game may require and impose an order, but each game's >>> order is different. Indeed, the order can even change during a game. For >>> example, the ranking for winning trick in a bridge game depends on the >>> contract and the suit of the trick's lead card. >>> >>> I expect many games to declare and use a Comparator<Card>. I'm >>> suggesting that Card should not itself be Comparable. >>> >> >> A Comparator is an abstraction of what we as human beings do when we >> compare values. You can have a Comparator that compares in any way you >> want. >> >> A Comparator would effectively implement a sub set of the rules of the >> game. Seems a perfectly logical suggestion to me >> >> Once again if not a Comparator then what. > Patricia is agreeing with the use of Comparator, and against the use of > Comparable, two very different interfaces. Read the entire post before commenting. I agree with Patricia lipska -- Lipska the Kat©: Troll hunter, sandbox destroyer and farscape dreamer of Aeryn Sun
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2012-12-27 22:05 -0500 |
| Message-ID | <50dd0c81$0$291$14726298@news.sunsite.dk> |
| In reply to | #20655 |
On 12/21/2012 3:58 AM, lipska the kat wrote: > On 20/12/12 22:00, Patricia Shanahan wrote: >> On 12/20/2012 1:35 PM, Gene Wirchenko wrote: >>> On Thu, 20 Dec 2012 09:30:09 -0800, Patricia Shanahan <pats@acm.org> >> ... >>>> Perhaps more importantly, why do we need an order? >>> >>> Many card games require order to rank hands or determine which >>> card beats which. >> >> I agree that a game may require and impose an order, but each game's >> order is different. Indeed, the order can even change during a game. For >> example, the ranking for winning trick in a bridge game depends on the >> contract and the suit of the trick's lead card. >> >> I expect many games to declare and use a Comparator<Card>. I'm >> suggesting that Card should not itself be Comparable. >> > > A Comparator is an abstraction of what we as human beings do when we > compare values. You can have a Comparator that compares in any way you > want. > > A Comparator would effectively implement a sub set of the rules of the > game. Seems a perfectly logical suggestion to me A suggestion that Patricia actually made. > Once again if not a Comparator then what. It's all vary well playing > devils advocate but sooner or later something actually needs to be > written down. Asking 'why do we need an order' exposes either a > surprisingly poor insight into a very common phenomena (the Playing > Card/Card Game) or a pathalogical reluctance to commit oneself to a > potential solution for fear of it being 'wrong' somewhere down the line. ???? The topic of discussion is natural order of cards or card values out of context of a specific game. Asking if we need such an order is a very valid question. I will argue that the answer is yes. But asking the question neither expose poor insight or anything pathological. And using those terms about asking a valid design question reveals that you are completely unsuited to work with other people. Arne
[toc] | [prev] | [next] | [standalone]
| From | lipska the kat <lipskathekat@yahoo.co.uk> |
|---|---|
| Date | 2012-12-28 09:57 +0000 |
| Message-ID | <jMydncwaoqGR8EDNnZ2dnUVZ7rSdnZ2d@bt.com> |
| In reply to | #20746 |
On 28/12/12 03:05, Arne Vajhøj wrote: > On 12/21/2012 3:58 AM, lipska the kat wrote: >> On 20/12/12 22:00, Patricia Shanahan wrote: >>> On 12/20/2012 1:35 PM, Gene Wirchenko wrote: >>>> On Thu, 20 Dec 2012 09:30:09 -0800, Patricia Shanahan <pats@acm.org> >>> ... [snip] >> A Comparator would effectively implement a sub set of the rules of the >> game. Seems a perfectly logical suggestion to me > > A suggestion that Patricia actually made. And I was agreeing with >> Once again if not a Comparator then what. It's all vary well playing >> devils advocate but sooner or later something actually needs to be >> written down. Asking 'why do we need an order' exposes either a >> surprisingly poor insight into a very common phenomena (the Playing >> Card/Card Game) or a pathalogical reluctance to commit oneself to a >> potential solution for fear of it being 'wrong' somewhere down the line. > > ???? > > The topic of discussion is natural order of cards or card values out of > context of a specific game. > Asking if we need such an order is a very valid question. We seem to be getting confused here. There are two questions 1. 'Why do we need an order' and 2. 'Is there such a thing as a 'natural order' [of a pack/deck] of cards' These are two quite different questions. I'll take the first one first Asking 'why do we need an order' implies that the person asking the question has never played a game of cards. I don't know how else to interpret that question. Now the second one The Swiss have a game where Jack is high. In our house we have a game where Ace can be high or low. As for cribbage ... These orderings are game specific, in fact they are part of the rules of the game. So for any given game there may be a 'natural order' for a hand and (possibly) another order for the result of playing that hand against other hands. But is there an overall 'natural order' for all decks/hands I'd say no given the ambiguity of the positional status of Aces and jokers at the very least. > I will argue that the answer is yes. And I say no, bu it's just my POV > But asking the question neither expose poor insight or > anything pathological. > > And using those terms about asking a valid design question > reveals that you are completely unsuited to work with other > people. Fascinating, really, the things you learn on Usenet. Thank you, I'll inform my team of your analysis. lipska -- Lipska the Kat©: Troll hunter, sandbox destroyer and farscape dreamer of Aeryn Sun
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2012-12-27 21:59 -0500 |
| Message-ID | <50dd0b10$0$291$14726298@news.sunsite.dk> |
| In reply to | #20648 |
On 12/20/2012 5:00 PM, Patricia Shanahan wrote: > On 12/20/2012 1:35 PM, Gene Wirchenko wrote: >> On Thu, 20 Dec 2012 09:30:09 -0800, Patricia Shanahan <pats@acm.org> > ... >>> Perhaps more importantly, why do we need an order? >> >> Many card games require order to rank hands or determine which >> card beats which. > > I agree that a game may require and impose an order, but each game's > order is different. Indeed, the order can even change during a game. For > example, the ranking for winning trick in a bridge game depends on the > contract and the suit of the trick's lead card. > > I expect many games to declare and use a Comparator<Card>. I think that everybody is agreeing about that. > I'm > suggesting that Card should not itself be Comparable. That is the discussion. As explained in another post, then I believe it makes sense. Also note that at least the original claim just was that card value had an ordering. A card ordering implies a card value ordering (and a suit ordering), but a card value order does not imply a card ordering. Arne
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2012-12-27 21:53 -0500 |
| Message-ID | <50dd0999$0$284$14726298@news.sunsite.dk> |
| In reply to | #20632 |
On 12/20/2012 12:30 PM, Patricia Shanahan wrote: > On 12/20/2012 9:01 AM, Gene Wirchenko wrote: >> On Wed, 19 Dec 2012 19:18:16 -0500, Arne Vajhøj <arne@vajhoej.dk> >> wrote: >> >> [snip] >> >>>> My point is that, in this case, there would be more than one >>>> order. >>> >>> Yes, but game specific order will be provided by game while >>> natural order is provided by card. >> >> Try game-specific order*S*. >> >> What natural order? And how do you just the use of the word >> "natural"? "preferred" might be a better choice of words. >> >> And why would a card provide an order anyway? Order is a >> property of a deck, not a card. > > Outside a specific game, what is the proper default for ace-high vs. > ace-low, and where do you put the jokers, the NaNs of playing cards? Aces and jokers are not as natural sorted as the rest. > Perhaps more importantly, why do we need an order? I can think of a few reasons: * it reflects how people view cards * it is practical to be able to enumerate over all values (and that implies an order) Arne
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2012-12-27 21:54 -0500 |
| Message-ID | <50dd09fb$0$284$14726298@news.sunsite.dk> |
| In reply to | #20743 |
On 12/27/2012 9:53 PM, Arne Vajhøj wrote: > On 12/20/2012 12:30 PM, Patricia Shanahan wrote: >> On 12/20/2012 9:01 AM, Gene Wirchenko wrote: >>> On Wed, 19 Dec 2012 19:18:16 -0500, Arne Vajhøj <arne@vajhoej.dk> >>> wrote: >>> >>> [snip] >>> >>>>> My point is that, in this case, there would be more than one >>>>> order. >>>> >>>> Yes, but game specific order will be provided by game while >>>> natural order is provided by card. >>> >>> Try game-specific order*S*. >>> >>> What natural order? And how do you just the use of the word >>> "natural"? "preferred" might be a better choice of words. >>> >>> And why would a card provide an order anyway? Order is a >>> property of a deck, not a card. >> >> Outside a specific game, what is the proper default for ace-high vs. >> ace-low, and where do you put the jokers, the NaNs of playing cards? > > Aces and jokers are not as natural sorted as the rest. > >> Perhaps more importantly, why do we need an order? > > I can think of a few reasons: > * it reflects how people view cards > * it is practical to be able to enumerate over all values > (and that implies an order) But also note that the discussion actually started with something that both has an order and allows arithmetic (int) versus something that only has an order (enum). Arne
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2012-12-27 21:48 -0500 |
| Message-ID | <50dd08a0$0$291$14726298@news.sunsite.dk> |
| In reply to | #20630 |
On 12/20/2012 12:01 PM, Gene Wirchenko wrote: > On Wed, 19 Dec 2012 19:18:16 -0500, Arne Vajhøj <arne@vajhoej.dk> > wrote: > > [snip] > >>> My point is that, in this case, there would be more than one >>> order. >> >> Yes, but game specific order will be provided by game while >> natural order is provided by card. > > Try game-specific order*S*. OK. > What natural order? If 100 people are given 3 cards with 7, 8 and 9 and asked to put the cards in order do you think all combinations will show up evenly distributed or that the order 7 8 9 will show up 100 times? > And how do you just the use of the word > "natural"? "preferred" might be a better choice of words. No. The traditional term used in IT is "natural order". > And why would a card provide an order anyway? Order is a > property of a deck, not a card. ???? The natural order is defined by the items not the container. The natural order of int is defined for int not for int[] or List<Integer>. Arne
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@telus.net> |
|---|---|
| Date | 2012-12-27 21:11 -0800 |
| Message-ID | <0s9qd8h7lqcm82mplfkvfah34j82r6kbbj@4ax.com> |
| In reply to | #20741 |
On Thu, 27 Dec 2012 21:48:58 -0500, Arne Vajhøj <arne@vajhoej.dk>
wrote:
>On 12/20/2012 12:01 PM, Gene Wirchenko wrote:
[snip]
>> What natural order?
>
>If 100 people are given 3 cards with 7, 8 and 9 and asked to
>put the cards in order do you think all combinations will show
>up evenly distributed or that the order 7 8 9 will show up 100
>times?
Ah, a loaded question. Here is one of my own:
We make those 100 people work even more. We give them three
cards with A, K, Q and ask them to put the cards in order. I expect
that they will be ranked highest to lowest as [A, K, Q]. We then give
them three cards with 3, 2, A and ask them to put the cards in order.
This one is stickier. I expect that we will see the orders [3, 2, A]
and [A, 3, 2]. For those who pick the former, this implies [3, 2, A,
K, Q]. Oops!
>> And how do you just the use of the word
>> "natural"? "preferred" might be a better choice of words.
>
>No.
>
>The traditional term used in IT is "natural order".
I have never heard it. Live and learn.
>> And why would a card provide an order anyway? Order is a
>> property of a deck, not a card.
>
>????
>
>The natural order is defined by the items not the container.
Order is meaningless without having the concept of more than one
of an item.
Order is not defined by items. How does the integer 5 define
order for integers? The data type, not its values, defines the order.
>The natural order of int is defined for int not for int[]
>or List<Integer>.
Might you want to sort items by the order? What is the likely
signature of the sort procedure for, say int values?
void Sort(int);
or
void Sort(int []);
I suggest that the former does not make sense, but that the latter
does. It makes sense to sort an array, but sorting a single value
does not make much sense.
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | "John B. Matthews" <nospam@nospam.invalid> |
|---|---|
| Date | 2012-12-28 06:50 -0500 |
| Message-ID | <nospam-B5EBC6.06504628122012@news.aioe.org> |
| In reply to | #20748 |
In article <0s9qd8h7lqcm82mplfkvfah34j82r6kbbj@4ax.com>, Gene Wirchenko <genew@telus.net> wrote: > Order is meaningless without having the concept of more than > one of an item. > > Order is not defined by items. How does the integer 5 define > order for integers? The data type, not its values, defines > the order. In Java, each wrapper class of a primitive type implements the Comparable interface, which "imposes a total ordering" that "is referred to as the class's natural ordering." The implementation gives each instance a way to compare itself to another. The natural order can be used as a foundation for domain order, sometimes expressed using a Comparator: <http://www.codinghorror.com/blog/2007/12/sorting-for-humans-natural-sort-order.html> -- John B. Matthews trashgod at gmail dot com <http://sites.google.com/site/drjohnbmatthews>
[toc] | [prev] | [next] | [standalone]
| From | lipska the kat <lipskathekat@yahoo.co.uk> |
|---|---|
| Date | 2012-12-28 13:46 +0000 |
| Message-ID | <3Nqdnejsd_NfP0DNnZ2dnUVZ8mOdnZ2d@bt.com> |
| In reply to | #20741 |
On 28/12/12 02:48, Arne Vajhøj wrote: > On 12/20/2012 12:01 PM, Gene Wirchenko wrote: >> On Wed, 19 Dec 2012 19:18:16 -0500, Arne Vajhøj <arne@vajhoej.dk> >> wrote: >> >> [snip] >> >>>> My point is that, in this case, there would be more than one >>>> order. >>> >>> Yes, but game specific order will be provided by game while >>> natural order is provided by card. >> >> Try game-specific order*S*. > > OK. > >> What natural order? > > If 100 people are given 3 cards with 7, 8 and 9 and asked to > put the cards in order do you think all combinations will show > up evenly distributed or that the order 7 8 9 will show up 100 > times? Give 100 people the 7 of Hearts, 7 of Clubs, 7 of Spades and 7 of Diamonds and ask them to put them in order ... Actually the more I think of it the more I think this whole idea of 'order' is spurious in a card game that uses a standard pack of cards (52 suit cards and two jokers). I think I might change my mind and substitute the word precedence for order ... hmm, yes, that might work. But it needs more thinking time. lipska -- Lipska the Kat©: Troll hunter, sandbox destroyer and farscape dreamer of Aeryn Sun
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@telus.net> |
|---|---|
| Date | 2012-12-28 09:10 -0800 |
| Message-ID | <bckrd851bt93imsgf1vsvmu8j7q3hriamd@4ax.com> |
| In reply to | #20757 |
On Fri, 28 Dec 2012 13:46:40 +0000, lipska the kat
<lipskathekat@yahoo.co.uk> wrote:
>On 28/12/12 02:48, Arne Vajhøj wrote:
>> On 12/20/2012 12:01 PM, Gene Wirchenko wrote:
[snip]
>>> What natural order?
>>
>> If 100 people are given 3 cards with 7, 8 and 9 and asked to
>> put the cards in order do you think all combinations will show
>> up evenly distributed or that the order 7 8 9 will show up 100
>> times?
>
>Give 100 people the 7 of Hearts, 7 of Clubs, 7 of Spades and 7 of
>Diamonds and ask them to put them in order ...
BWAHAHA! Good one!
Or is that hearts, spades, diamonds, clubs? <G> (That is the
order of trump suits in each hand of whist. The fifth hand has no
trump. Then, the cycle repeats.)
I personally use the order diamonds, hearts, spades, and clubs
for collecting suits when playing solitaire games.
[snip]
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | lipska the kat <lipskathekat@yahoo.co.uk> |
|---|---|
| Date | 2012-12-18 09:50 +0000 |
| Message-ID | <9_6dnbVv5aTwoU3NnZ2dnUVZ8kOdnZ2d@bt.com> |
| In reply to | #20398 |
On 18/12/12 04:06, Stefan Ram wrote: > markspace<-@.> writes: >> I was actually thinking about that. I don't like the idea of trying to >> encode most of the values of a face card as enums. > > I do not like the idea of designing a card game /before/ > I know exactly /which/ card game it is at all. I need to > know the rules of this card game and what exactly has to be > programmed (e.g., human players or also computer [AI] > players?). Only then I start to design. > > But often not even then do I do a beforehand OOD. Instead, > I start out procedurally, using OOP only where it is obvious. > Then I start to see OO patterns in the procedural code, > so I then refactor into OOD and eventually arrive at an > »object-oriented program«. Then I suggest with respect that you do not 'get' OO. The idea of designing computer systems as a series of communicating abstractions of real world human concepts (Classes) came about exactly because procedural programming was shown to be unsuitable for large scale complex systems. Starting out with a procedural design then trying to force it into an OO model seems to be a lot of work to me. A better approach would be to come up with a high level abstraction first, in this case 'CardGame' Then we start to break the problem down, immediately we can split the word into two classes, Card and Game, we have already halved the problem. Now we take Card, in the real word we know that we don't play a game with a single card, we know that a card is a member of a pack of 54, another word pops out Pack ... this is a new class. We can now go away and develop a Pack of Cards independently of our game ... and it will be reusable to boot... THIS is OO Notice that until now I know nothing about what game I might be 'designing' in fact I venture to suggest that we will discover, in the end that a Game' is nothing more than a set of rules that we can apply to our Deck. Our Deck is made up of a number of cards from one or more (reusable) Packs. Our Game will use a reusable Dealer who has a shuffle and deal methods. Once we have all these Classes in place we can start thinking about the rules of the game. The detail comes at the end, not at the beginning. Just my POV lipska -- Lipska the Kat©: Troll hunter, sandbox destroyer and farscape dreamer of Aeryn Sun
[toc] | [prev] | [next] | [standalone]
| From | "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> |
|---|---|
| Date | 2012-12-18 13:09 +0000 |
| Message-ID | <pJ-dnQJkvP9a9k3NnZ2dnUVZ8o2dnZ2d@bt.com> |
| In reply to | #20434 |
lipska the kat wrote:
> Notice that until now I know nothing about what game I might be
> 'designing' in fact I venture to suggest that we will discover, in the
> end that a Game' is nothing more than a set of rules that we can apply
> to our Deck. Our Deck is made up of a number of cards from one or more
> (reusable) Packs.
Just want to point out that your OO "modelling" here is making quite a few
asumptions about what kind of game we are going to want to play with the cards.
I'm not saying that's a bad thing, but it could /get/ bad if you were doing it
without being aware of it.
For instance:
Can cards be marked as part of the game ? (Legaloloy, I mean -- for
instance "cheating" might be allowed as part of the game)
If we have > 1 pack, are the two 2 of Hearts considered /identical/, or are
they distinguished in some way ? (Perhaps by the colours of the backs of the
cards).
Can new packs be added to the game as it is played ?
Can cards be destroyed (taken out of the game) as it is played ?
Are there rules about who should shuffle and when ?
Are there rules about who should deal and when ?
Can the rules change (evolve) at "run time" ?
Put it another way: you can't safely design an abstraction without knowing what
the abstraction is going to be used /for/. Which is in support of Stefan's
point:
> I do not like the idea of designing a card game /before/
> I know exactly /which/ card game it is at all.
even though I don't at all agree with his idea of starting in a procedureal
mode then switching to OO later (in fact I wouldn't be /able/ to do things his
way -- I find classic procedural code a lot harder to think about and/or create
than the OO kind).
-- chris
[toc] | [prev] | [next] | [standalone]
| From | lipska the kat <lipskathekat@yahoo.co.uk> |
|---|---|
| Date | 2012-12-18 14:05 +0000 |
| Message-ID | <R7WdnReD0tjX5U3NnZ2dnUVZ8iadnZ2d@bt.com> |
| In reply to | #20438 |
On 18/12/12 13:09, Chris Uppal wrote: > lipska the kat wrote: > > Just want to point out that your OO "modelling" here is making quite a few > asumptions about what kind of game we are going to want to play with the cards. > I'm not saying that's a bad thing, but it could /get/ bad if you were doing it > without being aware of it. Not sure why you chose to put the word "modelling" in inverted commas, let's just assume that you were highlighting the process. Anyway, it's OK to make assumptions, that's how we progress. Everything you mention below are rules, they do not impact in any way whatsoever the abstractions of Card, Pack, Deck, Dealer shuffle, deal or make the tea > For instance: > > Can cards be marked as part of the game ? (Legaloloy, I mean -- for > instance "cheating" might be allowed as part of the game) This is a rule of the game, you are modelling the game, not the abstractions you will use to play it, a markable card simply extends Card and will be a new class, say, MarkableCard extends Card, you are going through the "modelling" process in front of your very eyes. > > If we have> 1 pack, are the two 2 of Hearts considered /identical/, or are > they distinguished in some way ? (Perhaps by the colours of the backs of the > cards). Again a rule of the game, nothing to do with the top level abstractions. If during the modelling process you discover you need to invent a new Class to deal with some situation that makes the original abstraction unworkable then invent something, just make sure to keep the UML up to date :-) > Can new packs be added to the game as it is played ? Rule, no impact on the top level abstractions > > Can cards be destroyed (taken out of the game) as it is played ? ditto > > Are there rules about who should shuffle and when ? A 'rule' you said it yourself > > Are there rules about who should deal and when ? rule > > Can the rules change (evolve) at "run time" ? A meta rule no less; > > Put it another way: you can't safely design an abstraction without knowing what > the abstraction is going to be used /for/. Which is in support of Stefan's > point: But we do know what it/they is/are going to be used for, a game of cards. A pack of cards is static. It's a well known and understood concept that most humans can grasp. I don't care what game you are playing a pack of card is a pack of cards. End of. Why cloud your thinking. to use a favourite 'bulls**it' bingo phrase, Abstract the [Cards] away from the problem space. Park them, assume you have them, develop stubs, do whatever you have to do to remove the need to worry about a Pack of Cards from your thinking ... Do the same for Deck and Dealer, write an interface with method stubs, write code, reiterate, challenge your assumptions. When I start on a new problem I usually start writing code by the end of the first day, even if it's just getting some package names down with a bunch of empty classes that I think might help me to solve the problem. Often (more often than you might think) the problem hasn't even been fully defined when I start, in fact the definition changes as I go along. As I model part of the system, questions arise. When I put those questions to the stakeholders I often get 'oh I hadn't thought of that' and a new facet of the problem becomes apparent. If I waited until I had all the answers I'd be living in a cardboard box outside Liverpool Street station OO is hard. Getting those first few abstractions is often the hardest part of all. > >> I do not like the idea of designing a card game /before/ >> I know exactly /which/ card game it is at all. > > even though I don't at all agree with his idea of starting in a procedureal > mode then switching to OO later (in fact I wouldn't be /able/ to do things his > way -- I find classic procedural code a lot harder to think about and/or create > than the OO kind). The bottom line is you need to tease out the rules or the 'how' from the 'what' or, in our case the classes that will be used to implement the concept. It's quite straightforward once you get the hang of it. ;-) lipska -- Lipska the Kat©: Troll hunter, sandbox destroyer and farscape dreamer of Aeryn Sun
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@telus.net> |
|---|---|
| Date | 2012-12-25 15:06 -0800 |
| Message-ID | <33ckd8p6uk92l4lrehttga71ro2iafemev@4ax.com> |
| In reply to | #20398 |
On 25 Dec 2012 21:32:37 GMT, ram@zedat.fu-berlin.de (Stefan Ram)
wrote:
[snip]
> So, here's how to do it:
>
> If you already did similar projects like this before or have
> obtained a good education about projects like this, then
> design first and implement later.
>
> But if you never did similar projects before, then either
> let someone else do the design (who DID similar projects
> before) or start to try to code and experience (more in a
> bottom-up manner and with enough time for many refactorings
> or rewrites) or start to read some books about the desing of
Yes. When I have played with languages, I often take the example
of a times table. I first implement it minimally. Then, I get into
formatting, allowing ranges to be selected, allowing input of ranges,
having different operations, and so on.
> such projects (also do the exercises from the books).
Be sure to modify the exercises from the books, too. You can
think of a slightly different thing that you would like to try, can't
you?
Some books have sample programs and if you do not try modifying
them to your own ends, you can think you know something when you don't
really. Non-trivial modifying requires digging in and helps you
learn.
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | Patricia Shanahan <pats@acm.org> |
|---|---|
| Date | 2012-12-26 06:31 -0800 |
| Message-ID | <-7qdnc2dgM62l0bNnZ2dnUVZ_tKdnZ2d@earthlink.com> |
| In reply to | #20398 |
On 12/25/2012 1:32 PM, Stefan Ram wrote: ... > But if you never did similar projects before, then either > let someone else do the design (who DID similar projects > before) or start to try to code and experience (more in a > bottom-up manner and with enough time for many refactorings > or rewrites) or start to read some books about the desing of > such projects (also do the exercises from the books). > I have a variant on this. I often don't actually write the code, but I spend a lot of time imagining the outlines of the code. Especially if I'm working in a language I know well, I can often think up mid-level structures that I know I could program, if they turned out to be useful. I then think of the high level design in terms of those mid-level structures. Patricia
[toc] | [prev] | [next] | [standalone]
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Date | 2012-12-26 13:21 -0800 |
| Message-ID | <c83576b8-438a-4e4d-939c-6aeb9d20c9f1@googlegroups.com> |
| In reply to | #20704 |
Patricia Shanahan wrote:
> Stefan Ram wrote:
> ...
>> But if you never did similar projects before, then either
>> let someone else do the design (who DID similar projects
>> before) or start to try to code and experience (more in a
>> bottom-up manner and with enough time for many refactorings
>> or rewrites) or start to read some books about the desing of
>> such projects (also do the exercises from the books).
>
> I have a variant on this. I often don't actually write the code, but I
> spend a lot of time imagining the outlines of the code. Especially if
> I'm working in a language I know well, I can often think up mid-level
> structures that I know I could program, if they turned out to be useful.
> I then think of the high level design in terms of those mid-level
> structures.
To describe the elephant from yet another projection, I use a combination
of intuitive and cognitive models derived from the linguistic space of the
application domain.
The intuitive portion matches domain-specific language ("TPS Report") with
a ready-to-hand skill set of noun-verb object metamodels.
"Hmm, a report /has-a/ {title, ...}, /is-a/ {Retrievable, Readable, ...}."
The metamodel is the idea of "/has-a/" and "/is-a/", the notion of objects
having types, attributes, and behaviors, and the toolbox containing
polymorphism, assertions and all the panoply of design and programming skills.
Mixing in or out aspects such as functional programming is rather a mind
twist, but really an extension of the metamodel. I use different programming
languages, so I will slot in architecturally parallel constructs such as
first-class functions vs. SAM interfaces to the same spot in the mental
model.
I've got in trouble with certain managers for using skeleton Java interfaces
to generate UML diagrams, because "it isn't time to code yet; we're doing
diagrams". I defended my approach as being at the same level of architectural
design as diagramming, and consonant with how a programmer thinks. They let it
go.
Begrudgingly.
But it was exactly what Patricia describes. If you think structurally, it might
look like code - but hey, structure's structure however you describe it.
You sketch what you can see, try it as quickly as you can get a prototype up
(hours, not days), and proceed in however fashion you proceed to fill in the
details.
As a fillip, I correlate Java elements to UML differently from (and therefore
superior to, by my definition :-') some. Java idiomatically, and
controversially, exposes all attributes as accessor and mutator (getter and
setter) methods. Some diagram 'getX()' and 'setX()' methods as methods under
UML. Tsk. They're still attributes - 'get' and 'set' are just conventions
for expressing their public face. Architecturally, at the level where UML
can hope to do any good, I diagram them as attributes.
I'm not religious about it. If a paycheck is at stake I'll diagram them
as blueberries if you like.
--
Lew
[toc] | [prev] | [next] | [standalone]
Page 3 of 5 — ← Prev page 1 2 [3] 4 5 Next page →
Back to top | Article view | comp.lang.java.programmer
csiph-web