Re: code replication (was: Re: Query regarding exec in mandocdb.c)

2017-08-26 Thread Raul Miller
On Sat, Aug 26, 2017 at 4:36 AM,   wrote:
> The greater the body of code is, the smaller our understanding, or at
> least our ability to grok the code.
>
> Even in the UNIX world, 'duckspeak' code -- just doing what seems right
> without realizing the longer-term implications -- is unfortunately very
> common.
>
> I don't think that we can really afford that in the modern world.

Could you be more specific?

What problem are you trying to solve?

Thanks,

-- 
Raul



code replication (was: Re: Query regarding exec in mandocdb.c)

2017-08-26 Thread leo_tck
Hi,

rauldmil...@gmail.com wrote:
> But replication also gives robustness in the face of failure, so it
> can also be a security asset. Still an issue, just not a security
> problem. (Or, a problem, but for people trying to defeat security.)

Yes, but especially in cases of untested, new ways of doing things.

In other cases I'm not so sure the risk isn't more evenly balanced (in
which case I'd of course argue for less replication, for its other
benefits -- see below).

> That said, replication is intrinsic in the nature of computer
> programming. Patterns are useful and, therefore, replicated. But even
> more than that we start with a [relatively] small set of primitive
> instructions and build up from there.

There's another angle to consider: code size and complexity. Not for the
computer (though the compiler often gets a great deal less confused if
the code contains lots of calls than if it contains lots of actual
logic!), but for us, the programmers.

The greater the body of code is, the smaller our understanding, or at
least our ability to grok the code.

Even in the UNIX world, 'duckspeak' code -- just doing what seems right
without realizing the longer-term implications -- is unfortunately very
common.

I don't think that we can really afford that in the modern world.

> But getting rid of all replication is an impossible rabbit hole that
> you really do not want to go down.

One can, indeed, overdo things. But imnsho efforts to reduce replication
(or even writing such repetetetive code in the first place!) could be
turned up a notch or two :)

--schaafuit.