[Gambas-user] Crash with latest version

Jussi Lahtinen jussi.lahtinen at gmail.com
Tue Mar 9 18:59:34 CET 2021


On Tue, Mar 9, 2021 at 10:41 AM Christof Thalhofer <chrisml at deganius.de>
wrote:

> Am 08.03.21 um 22:49 schrieb Jussi Lahtinen:
>
> >     But it would help a lot if you could write the expected behavior in
> >     tests before you create a new method because if someone later would
> >     alter the program we could assure that it won't destroy the expected
> >     behavior.
> >
> > I agree, and it would work kind of a part of documentation /
> > standardization also.
> > But it may also be too much work for Benoit.
>
> My experience is that writing tests before the code often makes the work
> easier and faster at all.
>
> One part of the work as a programmer is to control whether the new code
> does it's thingi right. Before gb.test I used to write small routines
> that call new code so that I could run it with F5, stop at breakpoints,
> control the content of variables, print sth to stdout and so on.
>
> The predecessor of gb.test was created to keep control over that small
> routines, which at the end not only started the different parts of the
> code but also were able to test the output. So why not keep them for
> later usage? Why not collect them in test suites? gb.test solved that
> for me.
>
> But the real benefit comes later.
>
> I have written a database ORM for my firm which is quite complex and
> consists of several layers (a SQL wrapper, which creates SQL queries, an
> ORM that maps database tables to arrays of objects that represent
> columns and calls the SQL wrapper on changes). Fortunately I have
> written tests at every stage of the development that can verify that the
> database contains the correct values after each run and each change. Now
> I am quite sure I won't break the old behavior of this complex system
> when I touch it and change or add things. It is much easier to touch the
> system, it gives me much more freedom and i am free from fear.
>
> Before gb.test I broke a lot of things in my software by accident when I
> had to change old code, now it's a lot better.
> So gb.test helps me at the other part of my work as a programmer when I
> have to extend or fix old code.
>
> It gives me much more reliability. I can't be 100% sure that I'll never
> break old code again, but the amount of new bugs I produce has decreased
> significantly for code which is covered by tests.
>
> So the usage of gb.test not only made my software more reliable but it
> also saved me a lot of time because I did not have to fix as much bugs
> as before. Instead, I can use more of my energy to develop new things.
>
> I am old and I have to use my energy sparingly. When I was young, I
> could code for 16 hours a day for two months without a problem,
> producing and fixing lots and lots of bugs. gb.test is a crutch for old
> programmers, if you are young and have too much energy, don't use it.
>
> ;-)
>
> Alles Gute
>
> Christof Thalhofer
>
> --
> Dies ist keine Signatur
>

I think you make good points. Perhaps Benoit could write the test cases he
uses and others could expand from it.
But what Benoit thinks?


Jussi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210309/ab30a70f/attachment-0001.htm>


More information about the User mailing list