:: Re: [DNG] Latest DNG software guide…
Page principale
Supprimer ce message
Répondre à ce message
Auteur: tito
Date:  
À: dng
Sujet: Re: [DNG] Latest DNG software guide (20210807) now available
On Sat, 7 Aug 2021 16:59:03 -0400
Steve Litt <slitt@???> wrote:

> Hi all,
>
> As you know, the people on the DNG Devuan mailing list are developing
> documentation on how to make safe, resilient, maintainable and
> efficient software.
>
> The latest revision of this documentation can be downloaded, as a TGZ,
> at
>
> http://troubleshooters.com/linux/presentations/golug_software_guide_20210807.tgz
>
> This revision incorporates the input from the 8/4/2021 GoLUG meeting.
> It can be downloaded with a simple wget command. Please make sure the
> directory into which you downloaded the .tgz has no existing
> golug_software_guide directory, or else moves and deletions won't be
> respected.
>
> Thanks,
>
> SteveT
>
> Steve Litt
> Spring 2021 featured book: Troubleshooting Techniques of the Successful
> Technologist http://www.troubleshooters.com/techniques


Hi,
its great I never believed (as self-taught C programmer) to get into
such document!!!

Some additions that came to my mind while reading it:

Universal and complete error handling
        Handling every error is ultimately the right thing to do
        But sometimes it interferes with the pace of development
            Which can lead to forgetting the algorithm you're working on


            +My compromise: write your algorithm (sized so that it fits your screen)
                  +than go back and ask yourself what happens if this step fails for every line.
                  + A side effect is that it helps (me) to optimize code size, and makes clear
                  + every side aspect of that so clever looking code (which most of the
                  + is not so clever at all in its first iterations).


        Minimizing the tradeoff:
            Make comment every time you omit error handling, come back later to put it in
            Make a few error handling functions to make error handling trivial


                + Compilers often offer macros like gcc's  _FILE_,  _FUNCTION_,  _LINE_ that
                + make it easier to detect where  that error message came from.

            
                 In C, use assert() and come back later to change it to real error handling.


Ciao,
Tito