From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id Cr8VA33IZGMcaQEAbAwnHQ (envelope-from ) for ; Fri, 04 Nov 2022 09:08:29 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id QIe/AH3IZGMt5gAAauVa8A (envelope-from ) for ; Fri, 04 Nov 2022 09:08:29 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B59703DFE2 for ; Fri, 4 Nov 2022 09:08:28 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqrjE-00051M-Gi; Fri, 04 Nov 2022 04:07:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqrix-00050m-4B for emacs-orgmode@gnu.org; Fri, 04 Nov 2022 04:06:49 -0400 Received: from mail.tuxteam.de ([5.199.139.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqriu-000867-Fn for emacs-orgmode@gnu.org; Fri, 04 Nov 2022 04:06:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject :Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=QtnDQ982vEjPMhis6fIYJOV7pB2n+nNJMKJ+tL7Si3Y=; b=L1cc1iUtL/G7xdOsyDbApO+Soo PJrY/fmvQofLmd/d/j9Vc105aM3N8yDkUyp6JCy+Nj/5eNnAmjaSYLDqsyhRsOnfrUvHYJc/21/Gv y7PTP72lhbS4PmQd+9H2+a3ZTm/uXmxRprdhfwEx6n4QRXc/g0pgMpXrAEzBk18c5cPwgIL9umse8 2AC/zudssgXxOF1f2iRj1RsoTUIH16d5T72Z8ZExUPmGKOgo52VNrQaj8q6oj76VBAP1qcM3lDlXP UgXSDCTx7knWceQhUo9dHaHMnnRXKR9MdpZXuqdEqFEZnNOe0b+Lv/Spxc2Lh2px7PWv6h56w0kOk cslfduCQ==; Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1oqriq-0003Px-A6; Fri, 04 Nov 2022 09:06:40 +0100 Date: Fri, 4 Nov 2022 09:06:40 +0100 From: tomas@tuxteam.de To: Marcin Borkowski Cc: emacs-orgmode@gnu.org Subject: Re: Docstrings and literate programming (good practices?) Message-ID: References: <87bkpqbwef.fsf@posteo.net> <87mt976x6f.fsf@mbork.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="awx9ncVNUFtqyP6s" Content-Disposition: inline In-Reply-To: <87mt976x6f.fsf@mbork.pl> Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667549308; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=QtnDQ982vEjPMhis6fIYJOV7pB2n+nNJMKJ+tL7Si3Y=; b=Y81dzi32LZDdJprDXuQhFOpnodPQ+sr1CqvURsdEvTg9JCPPhQTZL97iwBLlOmMKho2n0e lgG/0vNRXaG74SZslgG+BgQox+5wLiKGk6bniED9R+S3sNndoRMBkCSCvoy33VJF5Y+1i8 Dit0zQhS6xXuiQyXLH1x1S9IYTBLmDiMkZtWrt2fJ1GEc8LvGJeKXG3i2B7idJ2tayOPz5 JiIsFs1AfK/ijB/0d2QyfTpcYPr1RXrMq+K2oJeDqFrgNEw+aznsWVMCmW4i8Huj5bkroa DmtO6a3YNJdHM/mWVZWhkCdjZRP288ec0lZmRV3QrJSl1/80pOkUvmipxIRztA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667549308; a=rsa-sha256; cv=none; b=UvIW+JBwC0byrEhF6z0VsWLtNeYBm3xQQAuCAHREfqVkQN/DN5Q3hJ9F9dQzc5dCqAIwbY ofg4BkCSTJWci21T5wQqmONOLgLmOtDxymN0FBS3V3AUtUbSo0fB77a+X+9lGKGS8bB67S 6SzQkA/COoDfHh4ryCHnETTRHrgpxRZvWyLwH9274cA7dgcO4V1wyIVah/d8E39ZYh6zTz a3C9EmEQzBldUU4/LiCYPRnghNn4HV1nCwW1Tz1unhLZferfDWmTExW74tQit3hOUujwTC dumkdJxGaobGXnKf4sWR6F6vyj89g8boNynMM42Wt6/a8hfKrJeztA2C9biDHw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tuxteam.de header.s=mail header.b=L1cc1iUt; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.40 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tuxteam.de header.s=mail header.b=L1cc1iUt; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: B59703DFE2 X-Spam-Score: -1.40 X-Migadu-Scanner: scn0.migadu.com X-TUID: oOmDEi3dBwQH --awx9ncVNUFtqyP6s Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 04, 2022 at 07:39:04AM +0100, Marcin Borkowski wrote: >=20 > On 2022-11-04, at 06:45, tomas@tuxteam.de wrote: [...] > > Ah. Javadoc and their descendants. I tend to call that "illiterate > > programming"... >=20 > I spat my tea. :-) Thanks, that's a nice one! Sorry to hear that ;-P > Though this _may_ work in some cases. For example, imagine you divide > your package into two files =E2=80=93 one with user-facing commands and a= nother > one with internal functions. If you order the former one carefully, the > "extract docstrings" might actually work as a documentation. Yes, of course it's just a tool; but that kind of tool all too often seduces people to switch to auto-pilot. How many Doxygen docs have I had which tell me that function so-and- so takes an int as third argument? I can see that by inspecting the source! As a bonus, I don't get that much optical fluff and don't have to go to the browser to look at it. > Still, a "normal" documentation seems a better (even if more > time-consuming) options. Yes, it takes work. > Also, such docstring-based documentation is still better than none. That depends on how much work goes into the docstring. This: /* add 2 to x */ x +=3D 2; is the typical quality you get when you're writing the docs while waist-deep in the code. If you want good docs, you have to take a step back and try to put yourself into the mind of someone else (i.e. "forget" for a moment all the implicit knowledge you have about that code you've been intimate with for weeks, perhaps for years). That's not easy :) Cheers --=20 t --awx9ncVNUFtqyP6s Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCY2TICgAKCRAFyCz1etHa RmVBAJ9XFpH3K6N/UBIVaOTkaLjAQ6YlBwCfb/U2D2h/QOldsJiMfpR0L9HROVE= =pd+M -----END PGP SIGNATURE----- --awx9ncVNUFtqyP6s--