qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Anthony Liguori <aliguori@linux.vnet.ibm.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	qemu-devel@nongnu.org, Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 02/11] Add operations to qlist to allow it to be used as a stack
Date: Fri, 13 Nov 2009 09:51:50 +0100	[thread overview]
Message-ID: <4AFD1E26.2080001@redhat.com> (raw)
In-Reply-To: <4AFC4249.8020702@linux.vnet.ibm.com>

Am 12.11.2009 18:13, schrieb Anthony Liguori:
> Kevin Wolf wrote:
>> Unfortunately. There are places where such comments could be a good
>> specification on what an interface is actually meant to work like
>> (particularly in error cases). Currently you often can't tell if the
>> implementation or the caller of a function is buggy.
>>
>> Not sure if they are really useful for the simple qlist.c functions (but
>> even there the function name does not tell me what it's doing with NULL
>> parameters), but it might be helpful to have a general discussion about
>> it. I think in general qemu is poorly commented.
>>   
> 
> I agree, but I don't think the solution is forcing boiler plate 
> commenting styles.  I think what we could improve on is asking people to 
> comment bits of code during review.

Be sure that I'll be asking for comments in qcow2 patches. I did in the
past and I'll continue to do so. ;-)

I agree that boiler plates are not going to help per se. But I think
what actually does play a role in commenting is what surrounding code
looks like and it's also habits. And it's probably not wrong to say that
we're currently in a habit of not documenting anything. If boiler plates
in some places are the price to get into a habit of documenting things,
I think considering to accept that price wouldn't be completely
unreasonable.

Another thing is that we could ask more often to move explanations from
mails into the code. The explanation often exists and sometimes we're
lucky enough that it ends up at least in the commit log, but there are
cases where it's in PATCH 0/n or buried in the corresponding mail thread.

Kevin

  parent reply	other threads:[~2009-11-13  8:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-11 17:28 [Qemu-devel] [PATCH 01/11] Properly escape QDECREF macro arguments Anthony Liguori
2009-11-11 17:28 ` [Qemu-devel] [PATCH 02/11] Add operations to qlist to allow it to be used as a stack Anthony Liguori
2009-11-12 15:33   ` Kevin Wolf
2009-11-12 16:46     ` Anthony Liguori
2009-11-12 16:56       ` Kevin Wolf
2009-11-12 17:13         ` Anthony Liguori
2009-11-12 17:20           ` Luiz Capitulino
2009-11-13  8:51           ` Kevin Wolf [this message]
2009-11-12 17:17         ` Ian Molton
2009-11-11 17:28 ` [Qemu-devel] [PATCH 03/11] Allow strings to grow in size Anthony Liguori
2009-11-11 17:28 ` [Qemu-devel] [PATCH 04/11] Add a QFloat datatype Anthony Liguori
2009-11-11 17:28 ` [Qemu-devel] [PATCH 05/11] Add unit test for QFloat Anthony Liguori
2009-11-11 17:28 ` [Qemu-devel] [PATCH 06/11] Add a QBool type Anthony Liguori
2009-11-11 17:28 ` [Qemu-devel] [PATCH 07/11] Add a lexer for JSON Anthony Liguori
2009-11-11 17:29 ` [Qemu-devel] [PATCH 08/11] Add a JSON message boundary identifier Anthony Liguori
2009-11-11 17:29 ` [Qemu-devel] [PATCH 09/11] Add a JSON parser Anthony Liguori
2009-11-11 17:29 ` [Qemu-devel] [PATCH 10/11] Add a QObject JSON wrapper Anthony Liguori
2009-11-11 18:12   ` [Qemu-devel] " Luiz Capitulino
2009-11-11 19:39     ` Anthony Liguori
2009-11-11 19:58       ` Luiz Capitulino
2009-11-11 17:29 ` [Qemu-devel] [PATCH 11/11] Add a unit test for JSON support Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AFD1E26.2080001@redhat.com \
    --to=kwolf@redhat.com \
    --cc=aliguori@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).