Re: connect four (game)

2017-11-27 Thread nospam . Chris Angelico
On Mon, Nov 27, 2017 at 3:04 PM, Rustom Mody wrote: >> Aviators have pinned down the best solution to this, I think. A pilot >> is not expected to be perfect; he is expected to follow checklists. A >> preflight checklist. A departure checklist. A landing checklist. >>

Re: connect four (game)

2017-11-27 Thread nospam . bartc
On 27/11/2017 17:41, Chris Angelico wrote: > On Tue, Nov 28, 2017 at 2:14 AM, bartc wrote: >> JPEG uses lossy compression. The resulting recovered data is an >> approximation of the original. > > Ah but it is a perfect representation of the JPEG stream. Any given > compressed

Re: connect four (game)

2017-11-27 Thread nospam . Ned Batchelder
On 11/27/17 1:57 PM, bartc wrote: > On 27/11/2017 17:41, Chris Angelico wrote: >> On Tue, Nov 28, 2017 at 2:14 AM, bartc wrote: >>> JPEG uses lossy compression. The resulting recovered data is an >>> approximation of the original. >> >> Ah but it is a perfect representation of

Merits of otherwise of test-first (Re: connect four (game))

2017-11-27 Thread nospam . Gregory Ewing
bartc wrote: > Testing everything comprehensively just wouldn't be useful for me who > works on whole applications, whole concepts, not just a handful of > functions with well-defined inputs and outputs. I had this experience with Pyrex (the precursor to Cython). The various parts are so

Re: connect four (game)

2017-11-27 Thread nospam . Ian Kelly
On Nov 27, 2017 7:08 AM, "Chris Angelico" wrote: In every compiler, interpreter, and CPU that I've ever used, the remainder has been well-defined. In what situation was it ill-defined, such that different compilers could do different things? In C89 the result of integer

Re: connect four (game)

2017-11-27 Thread nospam . Chris Angelico
On Tue, Nov 28, 2017 at 2:14 AM, bartc wrote: > JPEG uses lossy compression. The resulting recovered data is an > approximation of the original. Ah but it is a perfect representation of the JPEG stream. Any given compressed stream must always decode to the same output. The

Re: connect four (game)

2017-11-27 Thread namenobodywants
On Monday, November 27, 2017 at 2:10:56 AM UTC-8, Chris Angelico wrote: > Or you could use the floating-point values for positive and negative > infinity perfecto! thank you! peace stm -- https://mail.python.org/mailman/listinfo/python-list

Re: connect four (game)

2017-11-27 Thread nospam . Chris Angelico
On Mon, Nov 27, 2017 at 10:38 PM, bartc wrote: > On 27/11/2017 03:04, Michael Torrie wrote: >> >> On 11/26/2017 08:39 AM, bartc wrote: >>> >>> The problem was traced to two lines that were in the wrong order (in the >>> original program). I can't see how unit tests can have

Re: connect four (game)

2017-11-27 Thread nospam . Gregory Ewing
bartc wrote: > (Maybe it's viable if working from an exacting > specification that someone else has already worked out.) In my experience, for anything non-trivial that hasn't been done before, these "exacting specifications" never exist. Even if someone handles wnat they *think* are exact and

Re: connect four (game)

2017-11-27 Thread nospam . bartc
On 27/11/2017 13:57, Chris Angelico wrote: > On Mon, Nov 27, 2017 at 10:38 PM, bartc wrote: > Your decoder was straight-up buggy, and tests would have proven this. I created my Python version after the abysmal results from other Python decoders I tried which didn't work at

Re: connect four (game)

2017-11-27 Thread nospam . Rustom Mody
On Monday, November 27, 2017 at 12:12:24 PM UTC+5:30, Chris Angelico wrote: > On Mon, Nov 27, 2017 at 3:04 PM, Rustom Mody wrote: > >> Aviators have pinned down the best solution to this, I think. A pilot > >> is not expected to be perfect; he is expected to follow checklists. A > >> preflight

Re: connect four (game)

2017-11-27 Thread nospam . bartc
On 27/11/2017 03:04, Michael Torrie wrote: > On 11/26/2017 08:39 AM, bartc wrote: >> The problem was traced to two lines that were in the wrong order (in the >> original program). I can't see how unit tests can have helped in any way >> at all, and it would probably have taken much longer. > >

Re: connect four (game)

2017-11-27 Thread namenobodywants
On Sunday, November 26, 2017 at 7:09:25 PM UTC-8, Michael Torrie wrote: > So you are using this Infinity class as a sentinel value of some kind? > Representing game state? There may be an easier way than a full on > custom type. Sometimes just a sentinel object is sufficient. Or an >

Re: connect four (game)

2017-11-27 Thread nospam . Chris Angelico
On Mon, Nov 27, 2017 at 9:01 PM, wrote: > On Sunday, November 26, 2017 at 7:09:25 PM UTC-8, Michael Torrie wrote: > >> So you are using this Infinity class as a sentinel value of some kind? >> Representing game state? There may be an easier way than a full on >>

Re: connect four (game)

2017-11-27 Thread nospam . Chris Angelico
On Mon, Nov 27, 2017 at 10:08 AM, Gregory Ewing wrote: > Chris Angelico wrote: > >> On Mon, Nov 27, 2017 at 1:11 AM, bartc wrote: > >> >>> >>> If I had to bother with such systematic tests as you suggest, and finish >>> and >>> sign off everything

Re: connect four (game)

2017-11-27 Thread nospam . Rustom Mody
On Monday, November 27, 2017 at 9:08:42 AM UTC+5:30, Chris Angelico wrote: > On Mon, Nov 27, 2017 at 1:55 PM, Michael Torrie wrote: > > On 11/26/2017 07:11 AM, bartc wrote: > >>> You may argue that testing doesn't matter for his small game, written > >>> for his own education and amusement. The

Re: connect four (game)

2017-11-27 Thread nospam . Gregory Ewing
Chris Angelico wrote: > On Mon, Nov 27, 2017 at 1:11 AM, bartc wrote: > >>If I had to bother with such systematic tests as you suggest, and finish and >>sign off everything before proceeding further, then nothing would ever get >>done. (Maybe it's viable if working from an

Re: connect four (game)

2017-11-27 Thread nospam . Chris Angelico
On Mon, Nov 27, 2017 at 1:55 PM, Michael Torrie wrote: > On 11/26/2017 07:11 AM, bartc wrote: >>> You may argue that testing doesn't matter for his small game, written >>> for his own education and amusement. The fact is that software in >>> general is of abysmal quality

Re: connect four (game)

2017-11-27 Thread nospam . Michael Torrie
On 11/26/2017 08:39 AM, bartc wrote: > The problem was traced to two lines that were in the wrong order (in the > original program). I can't see how unit tests can have helped in any way > at all, and it would probably have taken much longer. What makes you think that? Surely other decoders were

Re: connect four (game)

2017-11-27 Thread nospam . Michael Torrie
On 11/26/2017 07:11 AM, bartc wrote: >> You may argue that testing doesn't matter for his small game, written >> for his own education and amusement. The fact is that software in >> general is of abysmal quality across the boards, and promoting a habit >> of unit testing is good, even for

Re: connect four (game)

2017-11-27 Thread nospam . Michael Torrie
On 11/25/2017 12:58 PM, namenobodywa...@gmail.com wrote: > the idea is that there should be exactly one object posinf (positive infinity) that compares as strictly greater than any number ever considered, and exactly one object neginf that compares as strictly less; as the code stands now there is

Re: connect four (game)

2017-11-27 Thread nospam . nospam . nospam . bartc
On 25/11/2017 23:49, Terry Reedy wrote: > On 11/25/2017 4:57 PM, namenobodywa...@gmail.com wrote: >> On Saturday, November 25, 2017 at 12:48:38 AM UTC-8, Terry Reedy wrote: >> >>> I did, and it looks buggy to me.â The top and left frame lines are >>> missing.â If I click a square, the bottom

Re: connect four (game)

2017-11-27 Thread nospam . nospam . nospam . bartc
On 25/11/2017 16:07, Michael Torrie wrote: > On 11/25/2017 06:00 AM, bartc wrote: >> And there's a quite lot left of the rest of the program to worry about too! >> >> If you add 'window()' at the end of the program, then it seems to run on >> Python 3. I'd play around with it first before thinking

Re: connect four (game)

2017-11-27 Thread nospam.nospam.nospam.alister via Python-list
On Sat, 25 Nov 2017 12:26:52 -0800, namenobodywants wrote: > On Friday, November 24, 2017 at 8:07:07 AM UTC-8, Chris Angelico wrote: > >> This is the kind of function that needs a docstring and some comments. >> What exactly is this doing? What are the "lines" of the board? What's >> the

Re: connect four (game)

2017-11-27 Thread Ned Batchelder
On 11/27/17 1:57 PM, bartc wrote: On 27/11/2017 17:41, Chris Angelico wrote: On Tue, Nov 28, 2017 at 2:14 AM, bartc wrote: JPEG uses lossy compression. The resulting recovered data is an approximation of the original. Ah but it is a perfect representation of the JPEG

Re: connect four (game)

2017-11-27 Thread bartc
On 27/11/2017 17:41, Chris Angelico wrote: On Tue, Nov 28, 2017 at 2:14 AM, bartc wrote: JPEG uses lossy compression. The resulting recovered data is an approximation of the original. Ah but it is a perfect representation of the JPEG stream. Any given compressed stream must

Re: connect four (game)

2017-11-27 Thread Chris Angelico
On Tue, Nov 28, 2017 at 2:14 AM, bartc wrote: > JPEG uses lossy compression. The resulting recovered data is an > approximation of the original. Ah but it is a perfect representation of the JPEG stream. Any given compressed stream must always decode to the same output. The

Re: connect four (game)

2017-11-27 Thread bartc
On 27/11/2017 13:57, Chris Angelico wrote: On Mon, Nov 27, 2017 at 10:38 PM, bartc wrote: Your decoder was straight-up buggy, and tests would have proven this. I created my Python version after the abysmal results from other Python decoders I tried which didn't work at

Re: connect four (game)

2017-11-27 Thread Ian Kelly
On Nov 27, 2017 7:08 AM, "Chris Angelico" wrote: In every compiler, interpreter, and CPU that I've ever used, the remainder has been well-defined. In what situation was it ill-defined, such that different compilers could do different things? In C89 the result of integer

Re: connect four (game)

2017-11-27 Thread Chris Angelico
On Mon, Nov 27, 2017 at 10:38 PM, bartc wrote: > On 27/11/2017 03:04, Michael Torrie wrote: >> >> On 11/26/2017 08:39 AM, bartc wrote: >>> >>> The problem was traced to two lines that were in the wrong order (in the >>> original program). I can't see how unit tests can have

Re: connect four (game)

2017-11-27 Thread Rustom Mody
On Monday, November 27, 2017 at 12:12:24 PM UTC+5:30, Chris Angelico wrote: > On Mon, Nov 27, 2017 at 3:04 PM, Rustom Mody wrote: > >> Aviators have pinned down the best solution to this, I think. A pilot > >> is not expected to be perfect; he is expected to follow checklists. A > >> preflight

Re: connect four (game)

2017-11-27 Thread namenobodywants
On Monday, November 27, 2017 at 2:10:56 AM UTC-8, Chris Angelico wrote: > Or you could use the floating-point values for positive and negative > infinity perfecto! thank you! peace stm -- https://mail.python.org/mailman/listinfo/python-list

Re: connect four (game)

2017-11-27 Thread bartc
On 27/11/2017 03:04, Michael Torrie wrote: On 11/26/2017 08:39 AM, bartc wrote: The problem was traced to two lines that were in the wrong order (in the original program). I can't see how unit tests can have helped in any way at all, and it would probably have taken much longer. What makes

Re: connect four (game)

2017-11-27 Thread Chris Angelico
On Mon, Nov 27, 2017 at 9:01 PM, wrote: > On Sunday, November 26, 2017 at 7:09:25 PM UTC-8, Michael Torrie wrote: > >> So you are using this Infinity class as a sentinel value of some kind? >> Representing game state? There may be an easier way than a full on >>

Re: connect four (game)

2017-11-27 Thread namenobodywants
On Sunday, November 26, 2017 at 7:09:25 PM UTC-8, Michael Torrie wrote: > So you are using this Infinity class as a sentinel value of some kind? > Representing game state? There may be an easier way than a full on > custom type. Sometimes just a sentinel object is sufficient. Or an >

Re: connect four (game)

2017-11-26 Thread Chris Angelico
On Mon, Nov 27, 2017 at 3:04 PM, Rustom Mody wrote: >> Aviators have pinned down the best solution to this, I think. A pilot >> is not expected to be perfect; he is expected to follow checklists. A >> preflight checklist. A departure checklist. A landing checklist. >>

Re: connect four (game)

2017-11-26 Thread Rustom Mody
On Monday, November 27, 2017 at 9:08:42 AM UTC+5:30, Chris Angelico wrote: > On Mon, Nov 27, 2017 at 1:55 PM, Michael Torrie wrote: > > On 11/26/2017 07:11 AM, bartc wrote: > >>> You may argue that testing doesn't matter for his small game, written > >>> for his own education and amusement. The

Re: connect four (game)

2017-11-26 Thread Chris Angelico
On Mon, Nov 27, 2017 at 1:55 PM, Michael Torrie wrote: > On 11/26/2017 07:11 AM, bartc wrote: >>> You may argue that testing doesn't matter for his small game, written >>> for his own education and amusement. The fact is that software in >>> general is of abysmal quality

Re: connect four (game)

2017-11-26 Thread Michael Torrie
On 11/25/2017 12:58 PM, namenobodywa...@gmail.com wrote: > the idea is that there should be exactly one object posinf (positive > infinity) that compares as strictly greater than any number ever considered, > and exactly one object neginf that compares as strictly less; as the code > stands now

Re: connect four (game)

2017-11-26 Thread Michael Torrie
On 11/26/2017 08:39 AM, bartc wrote: > The problem was traced to two lines that were in the wrong order (in the > original program). I can't see how unit tests can have helped in any way > at all, and it would probably have taken much longer. What makes you think that? Surely other decoders

Re: connect four (game)

2017-11-26 Thread Michael Torrie
On 11/26/2017 07:11 AM, bartc wrote: >> You may argue that testing doesn't matter for his small game, written >> for his own education and amusement. The fact is that software in >> general is of abysmal quality across the boards, and promoting a habit >> of unit testing is good, even for

Merits of otherwise of test-first (Re: connect four (game))

2017-11-26 Thread Gregory Ewing
bartc wrote: Testing everything comprehensively just wouldn't be useful for me who works on whole applications, whole concepts, not just a handful of functions with well-defined inputs and outputs. I had this experience with Pyrex (the precursor to Cython). The various parts are so

Re: connect four (game)

2017-11-26 Thread Chris Angelico
On Mon, Nov 27, 2017 at 10:08 AM, Gregory Ewing wrote: > Chris Angelico wrote: > >> On Mon, Nov 27, 2017 at 1:11 AM, bartc wrote: > >> >>> >>> If I had to bother with such systematic tests as you suggest, and finish >>> and >>> sign off everything

Re: connect four (game)

2017-11-26 Thread Gregory Ewing
Chris Angelico wrote: On Mon, Nov 27, 2017 at 1:11 AM, bartc wrote: > If I had to bother with such systematic tests as you suggest, and finish and sign off everything before proceeding further, then nothing would ever get done. (Maybe it's viable if working from an exacting

Re: connect four (game)

2017-11-26 Thread Gregory Ewing
bartc wrote: (Maybe it's viable if working from an exacting specification that someone else has already worked out.) In my experience, for anything non-trivial that hasn't been done before, these "exacting specifications" never exist. Even if someone handles wnat they *think* are exact and

Re: connect four (game)

2017-11-26 Thread nospam . nospam . bartc
On 26/11/2017 14:23, Chris Angelico wrote: > On Mon, Nov 27, 2017 at 1:11 AM, bartc wrote: >> The way I write code isn't incrementally top down or bottom up. It's >> backwards and forwards. Feedback from different parts means the thing >> develops as a whole. Sometimes parts are

Re: connect four (game)

2017-11-26 Thread nospam . nospam . bartc
On 25/11/2017 23:49, Terry Reedy wrote: > On 11/25/2017 4:57 PM, namenobodywa...@gmail.com wrote: >> On Saturday, November 25, 2017 at 12:48:38 AM UTC-8, Terry Reedy wrote: >> >>> I did, and it looks buggy to me.â The top and left frame lines are >>> missing.â If I click a square, the bottom

Re: connect four (game)

2017-11-26 Thread nospam . nospam . bartc
On 25/11/2017 16:07, Michael Torrie wrote: > On 11/25/2017 06:00 AM, bartc wrote: >> And there's a quite lot left of the rest of the program to worry about too! >> >> If you add 'window()' at the end of the program, then it seems to run on >> Python 3. I'd play around with it first before thinking

Re: connect four (game)

2017-11-26 Thread nospam.nospam.alister via Python-list
On Sat, 25 Nov 2017 12:26:52 -0800, namenobodywants wrote: > On Friday, November 24, 2017 at 8:07:07 AM UTC-8, Chris Angelico wrote: > >> This is the kind of function that needs a docstring and some comments. >> What exactly is this doing? What are the "lines" of the board? What's >> the

Re: connect four (game)

2017-11-26 Thread nospam . nospam . Terry Reedy
On 11/25/2017 4:57 PM, namenobodywa...@gmail.com wrote: > On Saturday, November 25, 2017 at 12:48:38 AM UTC-8, Terry Reedy wrote: > >> I did, and it looks buggy to me. The top and left frame lines are >> missing. If I click a square, the bottom square in the column lights >> up. But then I have

Re: connect four (game)

2017-11-26 Thread namenobodywants
On Saturday, November 25, 2017 at 12:48:38 AM UTC-8, Terry Reedy wrote: > I did, and it looks buggy to me. The top and left frame lines are > missing. If I click a square, the bottom square in the column lights > up. But then I have no idea whether those are your intentions or not. i hadn't

Re: connect four (game)

2017-11-26 Thread namenobodywants
On Friday, November 24, 2017 at 8:07:07 AM UTC-8, Chris Angelico wrote: > This is the kind of function that needs a docstring and some comments. > What exactly is this doing? What are the "lines" of the board? What's > the difference between "linear" and "lines"? What exactly is it > returning?

Re: connect four (game)

2017-11-26 Thread namenobodywants
On Saturday, November 25, 2017 at 5:00:12 AM UTC-8, bartc wrote: > Actually I've no idea what these tests are supposed to prove. me neither; i think you guys may be getting me out of my depth now > They are to do with one class called 'infinity', which is never used in the rest > of the

Re: connect four (game)

2017-11-26 Thread nospam . nospam . Michael Torrie
On 11/25/2017 06:00 AM, bartc wrote: > And there's a quite lot left of the rest of the program to worry about too! > > If you add 'window()' at the end of the program, then it seems to run on > Python 3. I'd play around with it first before thinking up strategies > for testing it. Actually, no.

Re: connect four (game)

2017-11-26 Thread nospam . Chris Angelico
On Mon, Nov 27, 2017 at 1:11 AM, bartc wrote: > The way I write code isn't incrementally top down or bottom up. It's > backwards and forwards. Feedback from different parts means the thing > develops as a whole. Sometimes parts are split into distinct sections, > sometimes

Re: connect four (game)

2017-11-26 Thread nospam . bartc
On 25/11/2017 23:49, Terry Reedy wrote: > On 11/25/2017 4:57 PM, namenobodywa...@gmail.com wrote: >> On Saturday, November 25, 2017 at 12:48:38 AM UTC-8, Terry Reedy wrote: >> >>> I did, and it looks buggy to me.â The top and left frame lines are >>> missing.â If I click a square, the bottom

Re: connect four (game)

2017-11-26 Thread nospam.alister via Python-list
On Sat, 25 Nov 2017 12:26:52 -0800, namenobodywants wrote: > On Friday, November 24, 2017 at 8:07:07 AM UTC-8, Chris Angelico wrote: > >> This is the kind of function that needs a docstring and some comments. >> What exactly is this doing? What are the "lines" of the board? What's >> the

Re: connect four (game)

2017-11-26 Thread nospam . bartc
On 26/11/2017 14:23, Chris Angelico wrote: > On Mon, Nov 27, 2017 at 1:11 AM, bartc wrote: >> The way I write code isn't incrementally top down or bottom up. It's >> backwards and forwards. Feedback from different parts means the thing >> develops as a whole. Sometimes parts are

Re: connect four (game)

2017-11-26 Thread nospam . bartc
On 25/11/2017 16:07, Michael Torrie wrote: > On 11/25/2017 06:00 AM, bartc wrote: >> And there's a quite lot left of the rest of the program to worry about too! >> >> If you add 'window()' at the end of the program, then it seems to run on >> Python 3. I'd play around with it first before thinking

Re: connect four (game)

2017-11-26 Thread nospam . Terry Reedy
On 11/25/2017 4:57 PM, namenobodywa...@gmail.com wrote: > On Saturday, November 25, 2017 at 12:48:38 AM UTC-8, Terry Reedy wrote: > >> I did, and it looks buggy to me. The top and left frame lines are >> missing. If I click a square, the bottom square in the column lights >> up. But then I have

Re: connect four (game)

2017-11-26 Thread namenobodywants
On Saturday, November 25, 2017 at 12:48:38 AM UTC-8, Terry Reedy wrote: > I did, and it looks buggy to me. The top and left frame lines are > missing. If I click a square, the bottom square in the column lights > up. But then I have no idea whether those are your intentions or not. i hadn't

Re: connect four (game)

2017-11-26 Thread namenobodywants
On Saturday, November 25, 2017 at 5:00:12 AM UTC-8, bartc wrote: > Actually I've no idea what these tests are supposed to prove. me neither; i think you guys may be getting me out of my depth now > They are to do with one class called 'infinity', which is never used in the rest > of the

Re: connect four (game)

2017-11-26 Thread nospam . Michael Torrie
On 11/25/2017 06:00 AM, bartc wrote: > And there's a quite lot left of the rest of the program to worry about too! > > If you add 'window()' at the end of the program, then it seems to run on > Python 3. I'd play around with it first before thinking up strategies > for testing it. Actually, no.

Re: connect four (game)

2017-11-26 Thread namenobodywants
On Friday, November 24, 2017 at 8:07:07 AM UTC-8, Chris Angelico wrote: > This is the kind of function that needs a docstring and some comments. > What exactly is this doing? What are the "lines" of the board? What's > the difference between "linear" and "lines"? What exactly is it > returning?

Re: connect four (game)

2017-11-26 Thread bartc
On 26/11/2017 14:23, Chris Angelico wrote: On Mon, Nov 27, 2017 at 1:11 AM, bartc wrote: The way I write code isn't incrementally top down or bottom up. It's backwards and forwards. Feedback from different parts means the thing develops as a whole. Sometimes parts are split

Re: connect four (game)

2017-11-26 Thread Chris Angelico
On Mon, Nov 27, 2017 at 1:11 AM, bartc wrote: > The way I write code isn't incrementally top down or bottom up. It's > backwards and forwards. Feedback from different parts means the thing > develops as a whole. Sometimes parts are split into distinct sections, > sometimes

Re: connect four (game)

2017-11-26 Thread bartc
On 25/11/2017 23:49, Terry Reedy wrote: On 11/25/2017 4:57 PM, namenobodywa...@gmail.com wrote: On Saturday, November 25, 2017 at 12:48:38 AM UTC-8, Terry Reedy wrote: I did, and it looks buggy to me.  The top and left frame lines are missing.  If I click a square, the bottom square in the

Re: connect four (game)

2017-11-26 Thread bartc
On 25/11/2017 16:07, Michael Torrie wrote: On 11/25/2017 06:00 AM, bartc wrote: And there's a quite lot left of the rest of the program to worry about too! If you add 'window()' at the end of the program, then it seems to run on Python 3. I'd play around with it first before thinking up

Re: connect four (game)

2017-11-26 Thread alister via Python-list
On Sat, 25 Nov 2017 12:26:52 -0800, namenobodywants wrote: > On Friday, November 24, 2017 at 8:07:07 AM UTC-8, Chris Angelico wrote: > >> This is the kind of function that needs a docstring and some comments. >> What exactly is this doing? What are the "lines" of the board? What's >> the

Re: connect four (game)

2017-11-25 Thread Terry Reedy
On 11/25/2017 4:57 PM, namenobodywa...@gmail.com wrote: On Saturday, November 25, 2017 at 12:48:38 AM UTC-8, Terry Reedy wrote: I did, and it looks buggy to me. The top and left frame lines are missing. If I click a square, the bottom square in the column lights up. But then I have no idea

Re: connect four (game)

2017-11-25 Thread namenobodywants
On Saturday, November 25, 2017 at 12:48:38 AM UTC-8, Terry Reedy wrote: > I did, and it looks buggy to me. The top and left frame lines are > missing. If I click a square, the bottom square in the column lights > up. But then I have no idea whether those are your intentions or not. i hadn't

Re: connect four (game)

2017-11-25 Thread namenobodywants
On Friday, November 24, 2017 at 8:07:07 AM UTC-8, Chris Angelico wrote: > This is the kind of function that needs a docstring and some comments. > What exactly is this doing? What are the "lines" of the board? What's > the difference between "linear" and "lines"? What exactly is it > returning?

Re: connect four (game)

2017-11-25 Thread namenobodywants
On Saturday, November 25, 2017 at 5:00:12 AM UTC-8, bartc wrote: > Actually I've no idea what these tests are supposed to prove. me neither; i think you guys may be getting me out of my depth now > They are to do with one class called 'infinity', which is never used in the > rest > of the

Re: connect four (game)

2017-11-25 Thread Michael Torrie
On 11/25/2017 06:00 AM, bartc wrote: > And there's a quite lot left of the rest of the program to worry about too! > > If you add 'window()' at the end of the program, then it seems to run on > Python 3. I'd play around with it first before thinking up strategies > for testing it. Actually,

Re: connect four (game)

2017-11-25 Thread Christopher Reimer
On Nov 25, 2017, at 9:16 AM, Ian Kelly wrote: > >> On Sat, Nov 25, 2017 at 10:02 AM, Chris Angelico wrote: >>> On Sun, Nov 26, 2017 at 3:36 AM, Ian Kelly wrote: On Sat, Nov 25, 2017 at 6:00 AM, bartc wrote:

Re: connect four (game)

2017-11-25 Thread Ian Kelly
On Sat, Nov 25, 2017 at 10:02 AM, Chris Angelico wrote: > On Sun, Nov 26, 2017 at 3:36 AM, Ian Kelly wrote: >> On Sat, Nov 25, 2017 at 6:00 AM, bartc wrote: >>> Where are your unittests for these unittests? >> >> No, the point of having

Re: connect four (game)

2017-11-25 Thread Chris Angelico
On Sun, Nov 26, 2017 at 3:36 AM, Ian Kelly wrote: > On Sat, Nov 25, 2017 at 6:00 AM, bartc wrote: >> Where are your unittests for these unittests? > > No, the point of having unit tests is to build confidence that the > code in question works correctly.

Re: connect four (game)

2017-11-25 Thread Ian Kelly
On Sat, Nov 25, 2017 at 6:00 AM, bartc wrote: > Where are your unittests for these unittests? Taking this question more seriously than it deserves: the tests for the unittest module itself are at https://hg.python.org/cpython/file/tip/Lib/unittest/test. Yes, unittest has tests

Re: connect four (game)

2017-11-25 Thread bartc
On 25/11/2017 04:43, Ian Kelly wrote: On Fri, Nov 24, 2017 at 7:05 PM, wrote: On Friday, November 24, 2017 at 12:13:18 PM UTC-8, Terry Reedy wrote: Since you did not start with tests or write tests as you wrote code, ... why on earth would you assume that?

Re: connect four (game)

2017-11-25 Thread Terry Reedy
On 11/24/2017 9:05 PM, namenobodywa...@gmail.com wrote: On Friday, November 24, 2017 at 12:13:18 PM UTC-8, Terry Reedy wrote: Since you did not start with tests or write tests as you wrote code, ... that I could tell ... I agree that I should have stuck in a qualifier, such as 'apparently'.

Re: connect four (game)

2017-11-24 Thread Ian Kelly
On Fri, Nov 24, 2017 at 7:05 PM, wrote: > On Friday, November 24, 2017 at 12:13:18 PM UTC-8, Terry Reedy wrote: > >> Since you did not start with tests or write tests as you wrote code, ... > > why on earth would you assume that? instantiate "window" and you'll see it

Re: connect four (game)

2017-11-24 Thread Chris Angelico
On Sat, Nov 25, 2017 at 1:05 PM, wrote: > On Friday, November 24, 2017 at 12:13:18 PM UTC-8, Terry Reedy wrote: > >> Since you did not start with tests or write tests as you wrote code, ... > > why on earth would you assume that? instantiate "window" and you'll see it

Re: connect four (game)

2017-11-24 Thread namenobodywants
On Friday, November 24, 2017 at 12:13:18 PM UTC-8, Terry Reedy wrote: > Since you did not start with tests or write tests as you wrote code, ... why on earth would you assume that? instantiate "window" and you'll see it works exactly as i intended; nobody's asking you to debug code for free;

Re: connect four (game)

2017-11-24 Thread Terry Reedy
On 11/24/2017 10:33 AM, namenobodywa...@gmail.com wrote: hi all i've just finished my first excursion into artificial intelligence with a game less trivial than tictactoe, and here it is in case anybody can offer criticism/suggestions/etc Since you did not start with tests or write tests as

Re: connect four (game)

2017-11-24 Thread Chris Angelico
On Sat, Nov 25, 2017 at 2:33 AM, wrote: > hi all > > i've just finished my first excursion into artificial intelligence with a > game less trivial than tictactoe, and here it is in case anybody can offer > criticism/suggestions/etc > Hi! You don't have a lot of