Re: Design Pattern thoughts



On Fri, 17 Nov 2006 09:12:10 +0100, Laurent Bossavit
<laurent@xxxxxxxxxxxxxxxxxxxx> wrote:

Andy,

Go to address 32h in a ms-dos OS and read the code.

Does that qualify as "source code" ?

What we're interested in is how to write code so that maintainers of
that code, as we wrote it, will best be able to do their job. We've
heard conflicting advice: Phlip says "write small code that does a lot",
some posters (you among them) took that to mean "write obfuscated code"
and countered with advice of their own: "write lots of simple code". My
hunch is that you misunderstood Phlip; he's on to something.

If we are to gain any insight from this discussion, I suggest that we go
beyond opinions and look at actual facts. Hence my request that people
point to an example of source code that is actually being maintained,
that they think is a good example of "small and legible". Or feel free
to comment on the Perl code I pointed to.

Your problem is what is simple to me, ie. reading assembler, may not
be simple to you.

If you provide me with an example in assembler, I'll be happy with that.
We can learn from looking at an example, whatever the language it's in.
(I've already learned something about relational division from this
thread.)

Were you trying to make the point that "maintainable" is too subjective?

Suppose you asked me for an outstanding example of poetry, and I showed
you something by Victor Hugo, you would perhaps not understand it in
original form, but I would still be able to explain the meaning of the
poem, and discuss the aspects (rhyme, meter, imagery) which make it an
example of outstanding poetry. At the end of that you'd have a fairly
good understanding of what objectively makes that particular poem
outstanding.

Also, how do you define small amount of code.

A few sonnets' worth would do fine.

Laurent

I already did provide you with an example, open a command window and
type debug (I am of course assuming you are on a windows sytem and
know how to use debug).

That is source that is being maintained.

.



Relevant Pages

  • Re: Design Pattern thoughts
    ... Does that qualify as "source code"? ... What we're interested in is how to write code so that maintainers of ... Suppose you asked me for an outstanding example of poetry, ... good understanding of what objectively makes that particular poem ...
    (comp.object)
  • Re: AWK-Editing files in "place" and a --write switch
    ... your "reason for posting" is that you've ... the maintainers if they would consider implementing this functionality ... in the C source code). ... store up the results in an array, then, in the END block, ...
    (comp.lang.awk)