| Deutsch English Français Italiano |
|
<vhi3r3$1rs08$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com> Newsgroups: comp.lang.c Subject: Re: else ladders practice Date: Tue, 19 Nov 2024 14:29:06 +0100 Organization: A noiseless patient Spider Lines: 34 Message-ID: <vhi3r3$1rs08$1@dont-email.me> References: <3deb64c5b0ee344acd9fbaea1002baf7302c1e8f@i2pn2.org> <vg0t3j$2ruor$1@dont-email.me> <78eabb4054783e30968ae5ffafd6b4ff2e5a5f17@i2pn2.org> <vg2g37$37mh3$1@dont-email.me> <6724CFD2.4030607@grunge.pl> <vg2llt$38ons$1@dont-email.me> <2491a699388b5891a49ef960e1ad8bb689fdc2ed@i2pn2.org> <b681ee05856e165c26a5c29bf42a8d9d53843d6d@i2pn2.org> <vg2ttn$3a4lk$1@dont-email.me> <vg33gs$3b8n5$1@dont-email.me> <vg358c$3bk7t$1@dont-email.me> <vg37nr$3bo0c$1@dont-email.me> <vg3b98$3cc8q$1@dont-email.me> <vg5351$3pada$1@dont-email.me> <vg62vg$3uv02$1@dont-email.me> <vg8a84$euka$1@dont-email.me> <vg8koq$gpsg$1@dont-email.me> <vgat50$112jp$1@dont-email.me> <vgb8if$13ioj$1@dont-email.me> <vgbhkt$155v2$1@dont-email.me> <vgn0vl$3kr82$1@dont-email.me> <vgnfnd$3nmui$1@dont-email.me> <vgpcdv$7jqv$1@dont-email.me> <vgqiii$edif$1@dont-email.me> <vhh86t$1mtjb$1@dont-email.me> <vhhhm7$1oeqa$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Date: Tue, 19 Nov 2024 14:29:08 +0100 (CET) Injection-Info: dont-email.me; posting-host="e321b97f454cd8d7351f3d1738b157ab"; logging-data="1961992"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/E0ueJUvT230UR6zOaqa0P" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cancel-Lock: sha1:MZnyhkriILHoN4cEYG0Y3lyat+o= In-Reply-To: <vhhhm7$1oeqa$1@dont-email.me> X-Enigmail-Draft-Status: N1110 Bytes: 3415 On 19.11.2024 09:19, David Brown wrote: [...] > > There are a great variety of projects, [...] I don't want the theme to get out of hand, so just one amendment to... > Of course testing is important, at many levels. But the time to test > your code is when you are confident that it is correct - testing is not > an alternative to writing code that is as clearly correct as you are > able to make it. Sound like early days practice, where code is written, "defined" at some point as "correct", and then tests written (sometimes written by the same folks who implemented the code) to prove that the code is doing the expected, or the tests have been spared because it was "clear" that the code is "correct" (sort of). Since the 1990's we've had other principles, yes, "on many levels" (as you started your paragraph). At all levels there's some sort of specification (or description) that defined the expected outcome and behavior; tests [of levels higher than unit-tests] are written if not in parallel then usually by separate groups. The decoupling is important, the "first implement, then test" serializing certainly not. Of course every responsible programmer tries to create correct code, supported by own experience and by projects' regulatory means. But that doesn't guarantee correct code. Neither do test guarantee that. But tests have been, IME, more effective in supporting correctness than being "confident that it is correct" (as you say). Janis