Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #1735

Re: If "rigid rules" are the wrong way...

From "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org>
Newsgroups comp.programming
References <aa7173cd-2019-4e33-aa93-36b9344bee21@l10g2000pbi.googlegroups.com>
Subject Re: If "rigid rules" are the wrong way...
Date 2012-06-07 08:50 +0100
Message-ID <CuWdnfNWK9cfwE3SnZ2dnUVZ8iudnZ2d@bt.com> (permalink)

Show all headers | View raw


mike3 wrote:

> [..] So where does
> one get that knowledge, so that one can then actually do it right, and
> after doing it right, not worry so much about "smells" and the like,
> since then one will be able to know when to apply the rule and when
> not to. Which books would one need? But I suspect also a lot of it is
> practice work. But first you need to know the right thing to
> practice... otherwise you can end up developing bad habits.

How does one learn to write good English ?   It's certainly not a matter of
memorising the "rules" of English (either the real grammar or the long list of
forbidden forms that people do actually use).  How does one learn to write good
poetry, or a good news report ?

Obviously practise is part of it.  Good examples too.  But they are much more
easily found in English than in programming -- if only because reading a good
book is more fun than reading a good program.  OTOH nobody is paying you to
learn to write better (or speak better) English.  Probably.

But two other things, equally important in my view:

One is to accept fully that programming is an act of communication (talking of
"instructing the computer to do something" is simply missing the point).  Think
of your code (and comments) as yourself addressing the hypothetical audience,
explaining your understanding of the problem domain, and your approach to
solving the various issues that arise.  "Programming as oratory", you might say
;-)   This is the core and the heart of the subject.

Second is that practise by itself is not worth a lot.  There has to be a
continuous, conscious, effort to learn from the practise.  To analyse what you
are doing in terms of what is right (works well in all ways you are aware of)
and what is not (ugly, convoluted, slow, misleading, brittle, etc. etc).  Aim
for perfection -- making the results "good enough" is fine (by definition, in
fact), but the you should be /judging/ the code against perfection, even when
you aren't aiming for perfection in actual results.

I don't think books (and similar) help a lot, except perhaps as a source of
ideas.  If you do read a book (article on the web etc) treat it as an exercise.
Surround it, in your mind, with the words "This author claims that ...",  "...
Discuss.".  You can do the same with any "rules" you come across.

    -- chris


Back to comp.programming | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

If "rigid rules" are the wrong way... mike3 <mike4ty4@yahoo.com> - 2012-06-06 23:32 -0700
  Re: If "rigid rules" are the wrong way... "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2012-06-07 08:50 +0100
    Re: If "rigid rules" are the wrong way... "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2012-06-07 09:55 +0200
      Re: If "rigid rules" are the wrong way... "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2012-06-09 11:25 +0100
    Re: If "rigid rules" are the wrong way... mike3 <mike4ty4@yahoo.com> - 2012-06-07 01:39 -0700
      Re: If "rigid rules" are the wrong way... Patricia Shanahan <pats@acm.org> - 2012-06-07 06:43 -0700
      Re: If "rigid rules" are the wrong way... "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2012-06-09 11:05 +0100
        Re: If "rigid rules" are the wrong way... "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2012-06-09 11:24 +0100
      Re: If "rigid rules" are the wrong way... "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2012-06-09 11:15 +0100
    Re: If "rigid rules" are the wrong way... "BartC" <bc@freeuk.com> - 2012-06-07 10:55 +0100
      Re: If "rigid rules" are the wrong way... "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2012-06-09 10:44 +0100
        Re: If "rigid rules" are the wrong way... "BartC" <bc@freeuk.com> - 2012-06-09 12:35 +0100
  Re: If "rigid rules" are the wrong way... Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-06-07 09:38 -0700
    Re: If "rigid rules" are the wrong way... mike3 <mike4ty4@yahoo.com> - 2012-06-07 14:26 -0700
      Re: If "rigid rules" are the wrong way... Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-06-07 16:52 -0700

csiph-web