all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: stephen@xemacs.org, emacs-devel@gnu.org
Subject: Re: Trunk still not open
Date: Sat, 15 Mar 2014 11:02:58 +0200	[thread overview]
Message-ID: <8338ijdebh.fsf@gnu.org> (raw)
In-Reply-To: <5323F1AF.1040902@yandex.ru>

> Date: Sat, 15 Mar 2014 08:22:39 +0200
> From: Dmitry Gutov <dgutov@yandex.ru>
> CC: stephen@xemacs.org, emacs-devel@gnu.org
> 
> On 14.03.2014 17:29, Eli Zaretskii wrote:
> 
> > Not necessarily.  You will know how to test a function, but without
> > some overview docs, you will have no idea how to test a complex
> > feature that is built of several functions and variables, and relies
> > on some internals on top of that.  Also, internal functions many times
> > don't have doc strings -- a practice that Emacs development accepts as
> > valid.
> 
> If I'm a "testing engineer" in a separate department from people who 
> wrote the code (not the case here), then yes, I might like an overview 
> document to understand the code, or write tests for it.
> 
> "No code without tests" policy assumes that someone actually can write 
> the code changes, and they need to supply the tests that fail without that.
> 
> I.e. you both seem to be referring to some different kind of testing: 
> non-automated, performed by third parties?

At least I didn't, and I'm quite sure Stephen didn't, either.

Here's what I had in mind: It is quite rare in Emacs nowadays to write
code to implement a new feature entirely from scratch.  Usually, you
either enhance an existing feature or fix a bug in an existing
feature.  IOW, you are adding code on top of existing implementation.
Therefore, writing a good test requires you to know what the existing
code should do, because a good test will test both that you fixed
whatever problem you wanted to fix, and that you didn't break the
existing code where you didn't mean to modify existing behavior.

Therefore, you need to know what was expected of the code which you
modified.  This is exacerbated in Emacs by the lack of good coverage
by existing tests, so in many cases you will be writing a test for
modified implementation without having a test for the existing
implementation.  In those cases, your _only_ source to learn what the
existing implementation tried to do will be the docs.

> If I write automated tests, I'll have to get familiar with the code 
> either way, and it's often its own best documentation.

It's not always possible to get familiar with the code enough to
understand how it was supposed to work and what effects it was
supposed to produce, without investing unduly large or even
impractical effort.  Many times, you fix a bug or add a feature whose
effects are localized enough to make it unnecessary to study too much
surrounding or supporting code.  Sometimes, the code you modify use
some infrastructure which you understand only vaguely, but writing a
test for your changes requires to know some specific detail about
those other parts.  Etc. etc. -- I'm sure that if you dig deep enough
into your own experience, you will recall such incidents.  They all
require one to read the docs and try gleaning from there what the code
in question was supposed to do.

As another data point, consider the bug reports which say "the docs
says FOO should work such-and-such, but in fact I see a different
behavior".  IOW, people use the docs as a kind of contract, and
rightfully so.  Documenting the behavior goes a long way towards
explaining users what they should expect.

> Lisp packages often put the intro or overview in the Commentary, though.

Yes, but it's rare to have there enough stuff to cover the ground.
And if that overview is good enough, copying it into the manual and
adding the necessary markup is almost trivial.



  reply	other threads:[~2014-03-15  9:02 UTC|newest]

Thread overview: 128+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-27  5:00 Trunk still not open Stefan Monnier
2014-03-13 20:55 ` Glenn Morris
2014-03-14  7:58   ` Eli Zaretskii
2014-03-14  9:29     ` Stephen J. Turnbull
2014-03-14  9:35       ` David Kastrup
2014-03-14  9:47         ` Eli Zaretskii
2014-03-14 10:02           ` David Kastrup
2014-03-14 10:23             ` Eli Zaretskii
2014-03-14 10:40               ` David Kastrup
2014-03-14 11:02                 ` Eli Zaretskii
2014-03-14  9:43       ` Eli Zaretskii
2014-03-14  9:55       ` Bastien
2014-03-14 15:16         ` Stephen J. Turnbull
2014-03-14 11:42       ` Eric S. Raymond
2014-03-15  9:13         ` Jambunathan K
2014-03-14 12:34       ` Dmitry Gutov
2014-03-14 13:38         ` Stefan Monnier
2014-03-14 19:35           ` Glenn Morris
2014-03-18 20:01             ` joakim
2014-03-19  6:29               ` Glenn Morris
2014-03-19 16:43             ` Stefan
2014-03-14 14:34         ` Stephen J. Turnbull
2014-03-14 14:57           ` Dmitry Gutov
2014-03-14 15:29             ` Eli Zaretskii
2014-03-15  6:22               ` Dmitry Gutov
2014-03-15  9:02                 ` Eli Zaretskii [this message]
2014-03-16  0:26                   ` Dmitry Gutov
2014-03-16  3:49                     ` Eli Zaretskii
2014-03-14 15:39             ` Stephen J. Turnbull
2014-03-15  6:30               ` Dmitry Gutov
2014-03-17  4:33                 ` Stephen J. Turnbull
2014-03-14 19:31         ` Glenn Morris
2014-03-14 20:08           ` Daniel Colascione
2014-03-16  1:00             ` Glenn Morris
2014-03-16  2:30               ` Daniel Colascione
2014-03-15  1:55           ` Stephen J. Turnbull
2014-03-15  2:09             ` Dmitry Gutov
2014-03-15  8:22               ` Eli Zaretskii
2014-03-15 10:52                 ` Juanma Barranquero
2014-03-15 11:18                   ` Eli Zaretskii
2014-03-15 11:28                     ` Juanma Barranquero
2014-03-16  1:08                   ` Glenn Morris
2014-03-16  2:09                     ` Juanma Barranquero
2014-03-16 10:02                       ` martin rudalics
2014-03-17 16:26                       ` Glenn Morris
2014-03-17 17:03                         ` Juanma Barranquero
2014-03-17 17:25                           ` Eli Zaretskii
2014-03-17 17:31                             ` Juanma Barranquero
2014-03-18 15:54                           ` Glenn Morris
2014-03-18 17:07                             ` Juanma Barranquero
2014-03-18 17:21                               ` David Kastrup
2014-03-18 17:27                                 ` Juanma Barranquero
2014-03-19  4:25                             ` Stephen J. Turnbull
2014-03-17  4:43                   ` Stephen J. Turnbull
2014-03-17 12:38                     ` Juanma Barranquero
2014-03-17 14:31                       ` Eli Zaretskii
2014-03-18  6:00                       ` Stephen J. Turnbull
2014-03-18  7:51                         ` David Kastrup
2014-03-18 12:10                           ` John Yates
2014-03-18 12:20                             ` David Kastrup
2014-03-18 12:52                               ` John Yates
2014-03-18 13:01                                 ` David Kastrup
2014-03-18 10:56                         ` Juanma Barranquero
2014-03-18 16:13                       ` Jambunathan K
2014-03-18 16:16                         ` Juanma Barranquero
2014-03-18 17:25                           ` Jambunathan K
2014-03-18 17:30                             ` Juanma Barranquero
2014-03-18 17:51                               ` Jambunathan K
2014-03-16  0:39                 ` Dmitry Gutov
2014-03-16  3:52                   ` Eli Zaretskii
2014-03-16  5:25                     ` Dmitry Gutov
2014-03-16 16:10                       ` Eli Zaretskii
2014-03-16 16:36                         ` Dmitry Gutov
2014-03-16 18:20                           ` Eli Zaretskii
2014-03-15 10:02               ` Jambunathan K
2014-03-15 10:19                 ` David Kastrup
2014-03-15 11:01                   ` Jambunathan K
2014-03-15 11:10                 ` Eli Zaretskii
2014-03-17 14:32             ` Stefan
2014-03-17 15:13               ` Lars Magne Ingebrigtsen
2014-03-17 16:13                 ` Glenn Morris
2014-03-17 16:43                 ` Eli Zaretskii
2014-03-17 16:13               ` Glenn Morris
2014-03-17 16:52                 ` Eli Zaretskii
2014-03-17 16:33               ` Eli Zaretskii
2014-03-15  3:22           ` Dmitry Gutov
2014-03-15  7:10             ` Thien-Thi Nguyen
2014-03-15  9:02               ` David Kastrup
2014-03-15  8:45             ` Eli Zaretskii
2014-03-16  0:32               ` Dmitry Gutov
2014-03-16  1:27                 ` Glenn Morris
2014-03-16  5:31                   ` Dmitry Gutov
2014-03-16 11:26                 ` Nicolas Richard
2014-03-16  3:57               ` Jambunathan K
2014-03-16 16:17                 ` Eli Zaretskii
2014-03-16 19:17                   ` Jambunathan K
2014-03-16 20:10                     ` Eli Zaretskii
2014-03-17  4:56                       ` Stephen J. Turnbull
2014-03-19  7:57                         ` Jambunathan K
2014-03-19 16:06                           ` Eli Zaretskii
2014-03-19 23:21                             ` Jambunathan K
  -- strict thread matches above, loose matches on Subject: below --
2014-03-17 14:47 Barry OReilly
2014-03-18 17:55 ` Juanma Barranquero
2014-03-18 19:05   ` Jambunathan K
2014-03-18 19:24     ` Juanma Barranquero
2014-03-18 19:29       ` Jambunathan K
2014-03-18 19:47     ` David Kastrup
2014-03-18 19:57       ` David Kastrup
2014-03-19 15:17       ` Jambunathan K
2014-03-19  6:20         ` David Kastrup
2014-03-19  7:24           ` Jambunathan K
2014-03-19 15:22       ` Jambunathan K
2014-03-19 14:54 Alexander Poslavsky
2014-03-19 15:18 ` Jambunathan K
2014-03-19 15:21   ` Alexander Poslavsky
2014-03-19 15:51     ` Glenn Morris
2014-03-19 16:23       ` Stephen J. Turnbull
2014-03-19 20:38       ` Jambunathan K
2014-03-19 15:57     ` Bastien
2014-03-19 15:59       ` Bastien
2014-03-19 16:13         ` Glenn Morris
2014-03-19 17:15       ` Nicolas Richard
2014-03-19 23:38         ` Bastien
2014-03-19 18:45     ` Stefan
2014-03-19 20:01       ` Glenn Morris
2014-03-20  1:22         ` Stefan
2014-03-19 21:21       ` Paul Eggert
2014-03-20  1:24         ` Stefan

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=8338ijdebh.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=stephen@xemacs.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.