Re: [MMUSIC] Coding from examples [was Re: I-D Action:draft-ietf-mmusic-ice-tcp-09.txt]

Marc Petit-Huguenin <petithug@acm.org> Mon, 06 September 2010 21:09 UTC

Return-Path: <petithug@acm.org>
X-Original-To: mmusic@core3.amsl.com
Delivered-To: mmusic@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 4058E3A697F for <mmusic@core3.amsl.com>; Mon, 6 Sep 2010 14:09:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -100.183
X-Spam-Level:
X-Spam-Status: No, score=-100.183 tagged_above=-999 required=5 tests=[AWL=-0.332, BAYES_40=-0.185, IP_NOT_FRIENDLY=0.334, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FHzKnEW9QLE7 for <mmusic@core3.amsl.com>; Mon, 6 Sep 2010 14:09:05 -0700 (PDT)
Received: from server.implementers.org (server.implementers.org [69.55.225.91]) by core3.amsl.com (Postfix) with ESMTP id E3C7C3A684C for <mmusic@ietf.org>; Mon, 6 Sep 2010 14:09:04 -0700 (PDT)
Received: by server.implementers.org (Postfix, from userid 1001) id ED82CEBC4006; Mon, 6 Sep 2010 21:09:32 +0000 (UTC)
Received: from [192.168.2.3] (server.implementers.org [127.0.0.1]) by server.implementers.org (Postfix) with ESMTPA id 3C63ADCC414C; Mon, 6 Sep 2010 21:09:32 +0000 (UTC)
Message-ID: <4C85588B.1030608@acm.org>
Date: Mon, 06 Sep 2010 14:09:31 -0700
From: Marc Petit-Huguenin <petithug@acm.org>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100805 Iceowl/1.0b1 Icedove/3.0.6
MIME-Version: 1.0
To: Ari Keranen <ari.keranen@nomadiclab.com>
References: <20100902110001.7AC493A68EF@core3.amsl.com> <4C7F8451.8050502@nomadiclab.com> <4C7F97E1.9080704@viagenie.ca> <028201cb4af7$1cc4d3f0$564e7bd0$@com> <4C80EB20.4040007@viagenie.ca> <4C812C2B.5040306@acm.org> <4C815A82.6080405@nomadiclab.com> <4C817937.1080605@acm.org> <4C8552D8.6020503@nomadiclab.com>
In-Reply-To: <4C8552D8.6020503@nomadiclab.com>
X-Enigmail-Version: 1.0.1
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Cc: mmusic@ietf.org
Subject: Re: [MMUSIC] Coding from examples [was Re: I-D Action:draft-ietf-mmusic-ice-tcp-09.txt]
X-BeenThere: mmusic@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Multiparty Multimedia Session Control Working Group <mmusic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/mmusic>, <mailto:mmusic-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/mmusic>
List-Post: <mailto:mmusic@ietf.org>
List-Help: <mailto:mmusic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/mmusic>, <mailto:mmusic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 06 Sep 2010 21:09:06 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/06/2010 01:45 PM, Ari Keranen wrote:
> 4.9.2010 1:39, Marc Petit-Huguenin wrote:
>> On 09/03/2010 01:28 PM, Ari Keranen wrote:
>>> 3.9.2010 20:11, Marc Petit-Huguenin wrote:
>>>> On 09/03/2010 05:33 AM, Simon Perreault wrote:
>>>>> On 2010-09-02 19:32, Dan Wing wrote:
>>>>>> In any event, if we're going to do a big example, how about
>>>>>> a real example in draft-ietf-sipping-nat-scenarios, if it
>>>>>> doesn't have it already?
>>>>>
>>>>> I don't care where it is, but we need one. When you're implementing
>>>>> something, you end up looking longer at examples than at the actual
>>>>> spec. It really is extremely useful.
>>>>
>>>> And, in my opinion, terribly wrong.  I personally would ban all
>>>> examples from
>>>> RFC, because at best they are exposing only a subset of what the RFC
>>>> describe
>>>> and at worst there is bugs in it, bugs[1] that you will then find in
>>>> implementations.
>>>
>>> I agree with Simon that an example would be really useful, but I think
>>> also Marc is right that having it wrong is likely worse than not having
>>> it at all.
>>>
>>> Since we have a draft (the nat-scenarions one) that is already
>>> documenting this kind of things, I'd say that would be a better place
>>> for the example and we can add an informative reference so that
>>> implementors know where to look at.
>>>
>>> Also, the examples in the nat-scenarios draft should probably be run
>>> through multiple real implementations and still would need disclaimers
>>> saying "there are probably errors in the examples, so take a look at the
>>> errata, etc.", but that's a whole other story..
>>
>> The way I managed the examples in my recently published RFC[1] is
>> twofold:
>>
>> 1. I refused to add examples to explain something until the normative
>> text
>> itself was clear enough to in fact make the examples redundant. 
>> Examples are
>> fine for people that are just interested in vaguely understanding what
>> it is
>> about but implementers should not look at examples, or at any section
>> titled
>> "Introduction", "Overview" or "Informative References".  I wish I
>> could somehow
>> filter this sections automatically when my developers upload RFC from
>> the Internet.
> 
> I agree that implementers should not rely on examples, but they can make
> understanding the specs much easier too and can be therefore really
> useful. That said, given how easily errors creep into examples, I'm
> usually a bit reluctant on having really specific examples in something
> as immutable as an RFC.

I think that a good first step would be to move all the examples in future RFCs
in a separate section, and explicitly declare this section as non-normative.

>  > 2. I generated automatically the examples in the spec.  I first wrote a
>> reference implementation[2] of the RFC.  Then I added unit tests to
>> verify that
>> my reference implementation was correct.  Then finally I wrote the
>> code listed
>> in [3] that automatically generates the RFC2629 fragments listed in [4],
>> fragments that are automatically merged in the draft using Xinclude. 
>> Because
>> the examples were generated each time I built the text version of the
>> draft, I
>> was sure that the examples were correct - or at least as correct as my
>> reference
>> implementation.
> 
> Nice tool chain you got! Something like that would be good also for the
> examples of ICE TCP if we end up having such in the nat-scenarios draft.
> 

I will be happy to help, especially because there is an ICE TCP implementation
in my future.

- -- 
Marc Petit-Huguenin
Personal email: marc@petit-huguenin.org
Professional email: petithug@acm.org
Blog: http://blog.marc.petit-huguenin.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkyFWIgACgkQ9RoMZyVa61eqwgCePBTYNCK65mXXG6aRjaL+Hsll
eCQAnji5JyeYqR2jgRsJIlZnoE5cT2ef
=FFP1
-----END PGP SIGNATURE-----