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


Groups > comp.lang.java.programmer > #13762 > unrolled thread

Re: terminology

Started byJan Burse <janburse@fastmail.fm>
First post2012-04-21 23:50 +0200
Last post2012-04-21 23:57 +0200
Articles 2 — 1 participant

Back to article view | Back to comp.lang.java.programmer

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: terminology Jan Burse <janburse@fastmail.fm> - 2012-04-21 23:50 +0200
    Re: terminology Jan Burse <janburse@fastmail.fm> - 2012-04-21 23:57 +0200

#13762 — Re: terminology

FromJan Burse <janburse@fastmail.fm>
Date2012-04-21 23:50 +0200
SubjectRe: terminology
Message-ID<jmva3r$ltn$1@news.albasani.net>
Stefan Ram schrieb:
>      context             sentence
> .------------------.   .------------.
> java.lang.Thread     . dumpStack()
> java.lang.System.out . print    ( 2 )
>                         '-------'
>                           verb
> '------------------------------'
>    not a verb, because of dots
> '-----------------------------------'
>    not a sentence, because of dots

Hi,

If you are up at applying linguistic
categories to parts of Java programs,
then the most successful approach would be:

+---------------- Sentence ----------------+
|                                          |
java.lang.System.out . print    ( 2        )
|                    |          |          |
+---- Subject -------+- Verb ---+- Object -+

This would make an English speaking person
very much at home, since English is typicall
a SVO language.  A German speaking person can
less relate to this pattern, since his languages
is judged a SOV language.

But libraries and applications,
the classes and methods they defined, the
names that are used, need not match the
categories of some known natural languages.
Natural language verbs might have implicit
arguments which need to be made explicit
in code, which goes beyond a "this".

Nevertheless the SOV view of a code can
be very useful for problem analysis.
Especially on a higher level. This
is best viewed by the CRC method.

The classes are the subjects/actors you name
it. The resposibilities are the verbs/
steps you name it. The collaborators are
some objects/other actors you name it. CRC
cards can be elicidated by a simple role play:

- Take a group of people that are about
   to execute a sequential use case and a
   ball. Give the ball to the first member of
   the group.

- The member of the group who has the ball
   should say his role and what step he is
   performing, and hand the ball to an
   appropriate next member of the group.

- Write a prose flow chart of the session,
   this is your use case. Let the members of
   the group take notes of their steps and
   collaborates, this is the component design.

I had once an idea to elaborate concurrent
interaction protocols by using multiple
balls, but had never the chance to do this
in real life. Maybe would end in
battle ball...

http://en.wikipedia.org/wiki/Subject%E2%80%93verb%E2%80%93object

http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card

[toc] | [next] | [standalone]


#13763

FromJan Burse <janburse@fastmail.fm>
Date2012-04-21 23:57 +0200
Message-ID<jmvag5$ltn$2@news.albasani.net>
In reply to#13762
Jan Burse schrieb:
> - Take a group of people that are about
>    to execute a sequential use case and a
>    ball. Give the ball to the first member of
>    the group.
>
> - The member of the group who has the ball
>    should say his role and what step he is
>    performing, and hand the ball to an
>    appropriate next member of the group.
>

Forgot to say:
- Repeat the whole procedure for different
   scenarios.

> - Write a prose flow chart of the session,
>    this is your use case. Let the members of
>    the group take notes of their steps and
>    collaborates, this is the component design.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web