Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #78158

Re: Love to get some feedback on my first python app!!!

References <CAPTjJmrMq=rCXYFMzCDwFDt577UBdh6O=xNDHM6+n=M-vg6KLA@mail.gmail.com> <1142710437.7070860.1411401142913.JavaMail.root@sequans.com>
Date 2014-09-23 02:04 +1000
Subject Re: Love to get some feedback on my first python app!!!
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.14215.1411401886.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Sep 23, 2014 at 1:52 AM, Jean-Michel Pichavant
<jeanmichel@sequans.com> wrote:
> The code I posted had many bugs but one could not be fixed without the comment. Or at least there's an obvious discrepancy between the comment and the code that should catch the reader's attention.
>

The obvious discrepancy, sadly, doesn't tell you which one is right.
It's like the old days of FAT file systems - DOS would maintain two
copies of the eponymous File Allocation Table, but in the event of
corruption, it had no way of knowing which was to be trusted. (And I'm
not sure anything would ever actually notice differences, other than
an explicit CHKDSK.) When you have an intention comment, rather than
simply replicating the functionality in human-readable form, you can
more easily check that the intention matches the rest of the design.

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Love to get some feedback on my first python app!!! Chris Angelico <rosuav@gmail.com> - 2014-09-23 02:04 +1000

csiph-web