in reply to Re: small steps toward Perl literacy, temp vars and parentheses
in thread small steps toward Perl literacy, temp vars and parentheses

It is clear why you focus on the writing, but I was trying to focus on the reading of code.

I see it much like the difference between

See spot. Spot is a dog. See the dish. See the food. The food is in the dish. Spot runs to the dish. Spot eats the food.
and
The dog, Spot, runs to the dish and eats the food.
What is gained?

Time. I can read the single line faster; if I have the ability to read it there is no loss of clarity. There is an increase in clarity through expressiveness: Dick and Jane may be readable in three word sentences but I would not want to read White Fang that way. Concise expressions allow larger thoughts to cohere by remaining nearby.

Be well.

Replies are listed 'Best First'.
Re^3: small steps toward Perl literacy, temp vars and parentheses
by chance (Beadle) on Jun 17, 2004 at 17:34 UTC
    If I was reading White Fang for the pleasure of it I agree.

    but I'm reading White Fang to figure out why there is a slight logicial inconsistency dealing with a Lantern somehere in pages 36-98 or page 14 or pages 19-22, which in turn creates a slight problem in the plot timeline on page 132, I'll take the Dick and Jane Version.

    ditto for your code.
      If I was reading White Fang for the pleasure of it I agree

      Yes! There is a point. Who reads code? And when? And why?

      My counter is that White Fang is 271 pages and that White Fang, the Dick and Jane Version (DJV) will run over 1300 pages.

      Another counter: Would you really prefer DJV over White Fang for pleasure? Something that is pleasurable is apt to be done well.

      I suspect that the DJV will have more instances of the word $lantern to lead me astray when I look for the problem.

      I picked that sample to express the limit of some cognitive ability skill of mine. The slicing puts it up there right on or just past my limit. ( Without the slicing it is a no-op.)

      I do understand how code needs to be readable by its audience/maintainers. If I were running a crew of programmers, I would consider this a subtle issue.

      If I can understand White Fang as well as I can understand DJV, then I don't see any point in your argument. I understand you to be arguing for simplicity. I am pushing for literacy or fluency. I don't see them as opposed. I see this as a skill-level issue, greater fluency makes more things simple.

      Be well.