Christopher Smith wrote:
> Bob La Quey wrote:
>> On Jan 2, 2008 9:25 PM, David Brown <[EMAIL PROTECTED]> wrote:
>>> On Wed, Jan 02, 2008 at 08:27:13PM -0800, SJS wrote:
>>>> What's amusing is that when I do read python or IAS psuedocode in a book
>>>> (or printed out), I annotate it with vertical lines from the initial
>>>> keyword to the closing block. That is,
>>>>
>>>>   while expression1                      while expression1
>>>>      if expression2                      |  if expression2
>>>>         do something           ===>      |  |  do something
>>>>      else                                |  else
>>>>         do something else                |  |__do something else
>>>>                                          |_____
>>> I find the code on the right significantly more difficult to read.  The
>>> lines are just noise that make the code harder to find.
>> Agreed. Noise is all that was added. I do hope such abortions
>> are not being taught.
> 
> Sadly, I remember being taught to do such [EMAIL PROTECTED]@$# when I was 
> first
> instructed to code (and definitely not an IAS language). It made me ill
> back then too.

I also have used pencil-line blocking technique for listings (in many
languages!) for code functions/sections which are too long and have many
levels of nesting.

There are pretty-printers which will even do it for you, though I agree
that it's actually distracting if used everywhere. :-) So I don't use
such tools.

Bottom line: if it needs such annotation to be understood, it probably
needs a rewrite.

Regards,
..jim

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to