From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_05,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,9a0ff0bffdf63657 X-Google-Attributes: gidfac41,public X-Google-Thread: f43e6,9a0ff0bffdf63657 X-Google-Attributes: gidf43e6,public X-Google-Thread: 103376,4b06f8f15f01a568 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,9a0ff0bffdf63657 X-Google-Attributes: gid1108a1,public From: Tim Ottinger Subject: Re: Software landmines (loops) Date: 1998/09/10 Message-ID: <35F749AA.1B0ABBD2@oma.com>#1/1 X-Deja-AN: 389743762 Content-Transfer-Encoding: 7bit References: <6rf59b$2ud$1@nnrp1.dejanews.com> <6spia2$1s36$1@prime.imagin.net> <35F06D6A.91A3D34E@s054.aone.net.au> <6t6b3m$30j8$1@prime.imagin.net> Content-Type: text/plain; charset=us-ascii Organization: Object Mentor Mime-Version: 1.0 Newsgroups: comp.lang.eiffel,comp.object,comp.software-eng,comp.lang.ada Date: 1998-09-10T00:00:00+00:00 List-Id: Samuel Mize wrote: > If someone uses Tagalog or Mayan words as identifiers, he (or she, in > all cases) would understand his own code easily. However, it would be > hard and error-prone for others from a typical project team to > understand it. > > This is similar to someone who understands clearly what he intends the > code to do, but expresses it in a way that is not clear to a reader. > > An appeal to clarity of thought won't shape up that person's code; his > thoughts are perfectly clear, just complex. now, wait a minute here. Obscurity and complexity are not the same thing. I've seen simple code written in obscure ways. There is a mighty big gulf there. Now, complexity can obscure to be sure, but there are many other ways to obscure other than being complex. > In fact, one could argue that some obscure code comes from too MUCH > clarity of thought. I would never accept this argument. I would say that sometimes simple solutions are not obvious. That's when clarity of exposition takes over. But clarity of thought does not cause one to write obscure code. What does happen, by the way, is that a reader may see a problem as being unrealistically simple. In MT programs, for example, they might not understand how to solve the problems caused by race conditions and update anomalies, and may not even understand the problems. To them, the multi-threaded code seems needlessly complex and overdesigned. In reality, it's probably as simple as it can be given the requirements. The obscurity is not caused by clarity of thought on the part of the writer, but by cloudiness of thought on the part of the reader. While generalization is a valuable skill, overgeneralization is not. tim