ksummit.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: ksummit-discuss@lists.linuxfoundation.org
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [Ksummit-discuss] [CORE-TOPIC] Documentation
Date: Tue, 14 Jul 2015 02:01:40 +0300	[thread overview]
Message-ID: <1682862.sCPqlQknzg@avalon> (raw)
In-Reply-To: <201507132120.33180.PeterHuewe@gmx.de>

On Monday 13 July 2015 21:20:32 Peter Hüwe wrote:
> Am Montag, 13. Juli 2015, 11:47:23 schrieb Alexey Dobriyan:
> > On Mon, Jul 13, 2015 at 1:38 AM, Peter Hüwe <PeterHuewe@gmx.de> wrote:
> > > as we talked about recruiting in the other thread I realized that one
> > > thing that might reduce the entrance barrier a bit (apart from tooling
> > > and flow) would be proper documentation.
> > 
> > Newbies should not write documentation because they, by definition,
> > have little knowledge of the code. It will lead to many, many useless
> > and redundant comments like below whose only purpose is stealing
> 
> > vertical whitespace:
> While I agree with your 'stupid documentation is stupid' argument, I tend to
> somewhat disagree about that newbies should not write documentation.
> 
> By newbies I do not mean someone new to programming - that of course makes
> no sense - but why shouldn't a experienced c-programmer who is currently
> figuring out how the kernel works not document stuff along the way?

I fully agree, as I've gone through that process when I wrote my first DRM/KMS 
driver, and found it very valuable.

Writing documentation is a very good way to try and understand a subsystem for 
newcomers. It's time consuming though, which goes in the way of the tight 
schedules everybody seems to have. Furthermore employers are unfortunately not 
usually keen to fund documentation, especially when the schedule is tight.

On the other hand, I realized that writing down my findings while I was 
exploring the DRM subsystem was a great way to learn about it. It then took a 
bit of time to format my notes into proper documentation, but less than 
writing everything from scratch in one go. Taking notes also help structuring 
the documentation in a more natural way.

The picture wasn't all bright though. The documentation patch I submitted was 
of course not 100% complete, but the problem came later when the subsystem got 
rearchitectured without updating the documentation. Code changes were merged 
with kerneldoc comments to document functions, but the global DocBook 
architecture documentation was left untouched (except for integration of 
kerneldoc as API reference). The end result is that the DRM/KMS subsystem went 
from having a reasonable architecture documentation to being undocumented. 
Needless to say my motivation as a documentation writer for DRM/KMS took a big 
blow.

This being said, not everything is dark either. The V4L2 subsystem, for 
instance, does a pretty good job at keeping its documentation up-to-date. The 
maintainers and core developers always nack code changes that do not come with 
related documentation updates. This proved to be effective, but requires the 
rule to be strictly enforced. I wonder if this could scale to other 
subsystems, and what kind of other incentives we could create.

> I think that's much better than fixing whitespaces and long lines.

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2015-07-13 23:01 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-12 22:38 Peter Hüwe
2015-07-12 23:15 ` Julia Lawall
2015-07-14 11:59   ` Mauro Carvalho Chehab
2015-07-13  9:47 ` Alexey Dobriyan
2015-07-13 16:01   ` Randy Dunlap
2015-07-13 16:37   ` Steven Rostedt
2015-07-13 16:46     ` David Woodhouse
2015-07-13 17:35       ` Steven Rostedt
2015-07-13 19:22         ` Peter Hüwe
2015-07-13 19:28       ` Peter Hüwe
2015-07-13 17:42     ` Jason Cooper
2015-07-13 18:11       ` Steven Rostedt
2015-07-14  3:56         ` Zefan Li
2015-07-13 19:25       ` Peter Hüwe
2015-07-13 22:10       ` Laurent Pinchart
2015-07-13 17:45   ` Jonathan Corbet
2015-07-13 19:46     ` Peter Hüwe
2015-07-14  2:36       ` Jonathan Corbet
2015-07-14  8:40         ` Laurent Pinchart
2015-07-14 11:19           ` Daniel Vetter
2015-07-14 12:43         ` Mauro Carvalho Chehab
2015-07-14 12:53           ` Jonathan Corbet
2015-07-14 13:57           ` Laurent Pinchart
2015-07-14  6:44       ` Johannes Berg
2015-07-13 19:20   ` Peter Hüwe
2015-07-13 23:01     ` Laurent Pinchart [this message]
2015-07-13 17:05 ` Lai Jiangshan
2015-07-13 17:42 ` Jonathan Corbet

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=1682862.sCPqlQknzg@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dan.carpenter@oracle.com \
    --cc=ksummit-discuss@lists.linuxfoundation.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