Anyone who is writing something brand new and NOT referring to other 
working models (similar code chunks) is wasting their time. No one can 
keep everything in mind at once, especially once you start talking about 
truly complex beasts.

NB: I'm assuming your question is not necessarily limited to standalone 
programs that are 100% of the function but should also include modules 
that can be plugged in (such as shared objects/DLLs and Linux kernel 
modules).

For all of this, I'm only talking about fairly unique code, not small 
tweaks to existing code or rebuilding several chunks together to make a 
larger program.

I've written a few dozen programs that are >1000 lines. I've never had one 
work perfectly the first time. With code of that size, the odds of having 
it work completely correctly the first time are astronomically small.

I've probably written hundreds of new small (<50 LOC) programs. I would 
estimate 5% work correctly the first time (the benefit of experience with 
very similar programs).

For the middle sized programs (on the order of 100s of lines), I would say 
that I've had maybe one or two out of hundreds that worked the first time.

So, on the average, excluding code that is really just simple 
modifications of existing code, I would say 2-5% work correctly the first 
time, depending on how similar to something I have written before they 
are.

Eric Rossman, CISSPĀ®
ICSF Cryptographic Security Development
z/OS Enabling Technologies
[email protected]

"IBM Mainframe Discussion List" <[email protected]> wrote on 
08/21/2021 09:30:58 PM:

> From: "Bob Bridges" <[email protected]>
> To: [email protected]
> Date: 08/21/2021 09:31 PM
> Subject: [EXTERNAL] Programs that work right the first time.
> Sent by: "IBM Mainframe Discussion List" <[email protected]>
> 
> This part of the thread got me thinking.  How often do you write a 
> program that works right the first time, with no compile or 
> execution errors?  I'm not talking about two-liners, of course, or 
> even ten-liners; let's say 30 or thereabouts.  Please specify the 
> language, too, since it seems to me they vary in error-prone-ness.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to