• Re: The end of software secrecy is almost upon

    From Rosario19@3:633/10 to All on Mon Nov 2 10:54:42 2026
    On Tue, 20 Oct 2026 20:20:39 -0000 (UTC), Lawrence D˜Oliveiro wrote:

    On Tue, 20 Oct 2026 15:06:48 -0500, Lynn McGuire wrote:

    The key to writing any software is lots of commenting.

    A key point about comments is they should explain *why* the code is

    the win for comment it is when code explain itself with 0 comment

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Fred. Zwarts@3:633/10 to All on Mon Nov 2 11:11:40 2026
    Op 02.nov.2026 om 10:54 schreef Rosario19:
    On Tue, 20 Oct 2026 20:20:39 -0000 (UTC), Lawrence D˜Oliveiro wrote:

    On Tue, 20 Oct 2026 15:06:48 -0500, Lynn McGuire wrote:

    The key to writing any software is lots of commenting.

    A key point about comments is they should explain *why* the code is

    the win for comment it is when code explain itself with 0 comment

    Code can only explain what it does, what the algorithm is.
    Code cannot explain why that algorithm was chosen. That is where
    comments are for.


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Charlie Gibbs@3:633/10 to All on Mon Nov 2 16:51:46 2026
    On 2026-11-02, Fred. Zwarts <F.Zwarts@HetNet.nl> wrote:

    Op 02.nov.2026 om 10:54 schreef Rosario19:

    On Tue, 20 Oct 2026 20:20:39 -0000 (UTC), Lawrence D˜Oliveiro wrote:

    On Tue, 20 Oct 2026 15:06:48 -0500, Lynn McGuire wrote:

    The key to writing any software is lots of commenting.

    A key point about comments is they should explain *why* the code is

    the win for comment it is when code explain itself with 0 comment

    Code can only explain what it does, what the algorithm is.
    Code cannot explain why that algorithm was chosen. That is where
    comments are for.

    Unfortuately, a lot of people (especially CS weenies) love to
    loudly proclaim, "My code is so readable that no comments are
    necessary!" (Sometimes they apply this argument to their choice
    of programming language as well.) They're usually wrong.

    --
    /~\ Charlie Gibbs | In this world there are
    \ / <cgibbs@kltpzyxm.invalid> | two kinds of people:
    X I'm really at ac.dekanfrus | 1. Those who can extrapolate
    / \ if you read it the right way. | from incomplete data.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Lawrence D?Oliveiro@3:633/10 to All on Mon Nov 2 20:06:53 2026
    On Mon, 02 Nov 2026 16:51:46 GMT, Charlie Gibbs wrote:

    Unfortuately, a lot of people (especially CS weenies) love to loudly proclaim, "My code is so readable that no comments are necessary!"

    Wasn?t that the argument made by the ?business? users for COBOL? That
    the language was practically English anyway ... ?

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Rosario19@3:633/10 to All on Fri Nov 6 12:43:08 2026
    On Tue, 20 Oct 2026 23:18:44 GMT, Charlie Gibbs wrote:
    On 2026-10-20, Lawrence D?Oliveiro <ldo@nz.invalid> wrote:

    On Tue, 20 Oct 2026 19:04:55 GMT, Charlie Gibbs wrote:

    The undisciplined use of GOTOs is bad, agreed.

    Is there such a thing as a *disciplined* use of gotos?

    Yes, especially in COBOL or assembly language. For instance,
    a GOTO to the end of a function ensures any of its cleanup code
    gets executed, and fulfils a goal of structured proramming:
    each function has one exit point.

    I find the C code I write tends to do a lot of dynamic resource
    allocations. These can sometimes fail with errors. So error recovery
    will invariably involve cleaning up those parts of the allocations
    which already succeeded.

    Gotos are no good for this; you need to exit
    levels of structure nesting one by one, disposing of allocations as
    you go.

    If in the start of the function all pointer are NULL, and in the end
    of the function there are all the free()
    I not have find all your problems with possibly multiple goto that
    point to the end of the function

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From boltar@3:633/10 to All on Fri Nov 6 16:38:28 2026
    On Fri, 06 Nov 2026 12:43:08 +0100
    Rosario19 <Ros@invalid.invalid> gabbled:
    On Tue, 20 Oct 2026 23:18:44 GMT, Charlie Gibbs wrote:
    On 2026-10-20, Lawrence D?Oliveiro <ldo@nz.invalid> wrote:

    On Tue, 20 Oct 2026 19:04:55 GMT, Charlie Gibbs wrote:

    The undisciplined use of GOTOs is bad, agreed.

    Is there such a thing as a *disciplined* use of gotos?

    Yes, especially in COBOL or assembly language. For instance,
    a GOTO to the end of a function ensures any of its cleanup code
    gets executed, and fulfils a goal of structured proramming:
    each function has one exit point.

    I find the C code I write tends to do a lot of dynamic resource
    allocations. These can sometimes fail with errors. So error recovery
    will invariably involve cleaning up those parts of the allocations
    which already succeeded.

    Gotos are no good for this; you need to exit
    levels of structure nesting one by one, disposing of allocations as
    you go.

    If in the start of the function all pointer are NULL, and in the end
    of the function there are all the free()
    I not have find all your problems with possibly multiple goto that
    point to the end of the function

    This is also a reason the only-one-exit-point nonsense mentioned above is a Very Bad Idea unless its a simple function because you may have to do a load
    of checks that wouldn't be required if the flow of control left at an earlier point. Also with too much block nesting it becomes unreadable even in the best IDEs.


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Rosario19@3:633/10 to All on Sat Nov 7 13:35:34 2026
    On Mon, 02 Nov 2026 16:51:46 GMT, Charlie Gibbs wrote:
    On 2026-11-02, Fred. Zwarts <F.Zwarts@HetNet.nl> wrote:

    Op 02.nov.2026 om 10:54 schreef Rosario19:

    On Tue, 20 Oct 2026 20:20:39 -0000 (UTC), Lawrence D˜Oliveiro wrote:

    On Tue, 20 Oct 2026 15:06:48 -0500, Lynn McGuire wrote:

    The key to writing any software is lots of commenting.

    A key point about comments is they should explain *why* the code is

    the win for comment it is when code explain itself with 0 comment

    Code can only explain what it does, what the algorithm is.
    Code cannot explain why that algorithm was chosen. That is where
    comments are for.

    Unfortuately, a lot of people (especially CS weenies) love to
    loudly proclaim, "My code is so readable that no comments are
    necessary!" (Sometimes they apply this argument to their choice
    of programming language as well.) They're usually wrong.

    I m not a too much code writer
    until now, making some test I can understand and can correct bug on my
    code even if not commented enought (but input variable and output
    variable of one function are always/ should always be commented). code difficult as printf like functions, malloc, bignum function operators
    etc in assembly too.

    On others code i suspect it would be difficult for me even if
    commented... the indentation and names of variable are one easy way of
    comment code (i read that in a book speak on pascal language), without
    write one line of comment. Writing always the same type of loop, the
    same type of inizialization in the same position, the same names, I
    can figure out all soon...



    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)