git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Eugen Konkov <kes-kes@yandex.ru>, Git Mailing List <git@vger.kernel.org>
Subject: Re: Re* --creation-factor=100 does not show code
Date: Mon, 01 Aug 2022 16:17:56 -0700	[thread overview]
Message-ID: <xmqqa68nlfiz.fsf@gitster.g> (raw)
In-Reply-To: <xmqq5yjf4l60.fsf@gitster.g> (Junio C. Hamano's message of "Fri, 29 Jul 2022 15:19:03 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> When we say an option's value is expressed in <percent>, unless we
> are careful, people will assume that the valid value the option will
> take will lie between 0 and 100, and you cannot blame them.  IOW,
> while the word "percent" may be 100% correct in your mind, the way
> it is used to describe the feature in "git range-diff --help", it
> was not sufficient to help readers.

Stepping back a bit, I find that saying
"--creation-factor=<percent>" is like giving "--max-size=<bytes>".
They both make it clear that the readers express the number in what
scale, but fails to explain what the number means.  It is especially
hard for readers when the name of the option does not help explain
what the number is, e.g. "max size, size of what?" is a valid
question when dealing with "--max-size", and without the question
answered, the readers cannot decide what value they want to give to
achieve the effect they want.

the reader would want to know what it is (e.g. maximum memory that
is allowed to be allocated on heap) and how it is measured (i.e. in
bytes).  The former helps the readers guess what a reasonable value
they want to specify is (e.g. "I can afford to dedicate yMB"), and
the latter is essential for the readers to decide how exactly they
express what they chose (e.g. "I want to give yMB, but it is
measured in bytes, so I'll write y * 10^20 here").  We need both.

So _after_ they decide that 1.20 is the right number they want to
give to --creation-factor, the knowledge that the number is
expressed as percent does help them to write --creation-factor=120
correctly (not --creation-factor=1.20).

But for readers to come up with the number 1.20, there needs a
better explanation of what the number means in the first place.  "Go
read the algorithm section" is better than having nothing there, but
we should be able to do better by having a simple-to-understand
single paragraph description.

Thanks.

  reply	other threads:[~2022-08-01 23:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26 12:54 --creation-factor=100 does not show code Eugen Konkov
2022-07-28 14:59 ` Johannes Schindelin
2022-07-28 16:52   ` Re* " Junio C Hamano
2022-07-28 17:12     ` Ævar Arnfjörð Bjarmason
2022-07-28 17:44       ` Junio C Hamano
2022-07-28 19:46         ` Ævar Arnfjörð Bjarmason
2022-07-28 19:54           ` Junio C Hamano
2022-07-28 17:49     ` [PATCH] format-patch: clarify --creation-factor=<factor> Eric Sunshine
2022-07-28 20:55       ` Ævar Arnfjörð Bjarmason
2022-07-28 20:59         ` Junio C Hamano
2022-07-28 21:09           ` Eric Sunshine
2022-07-30  0:25             ` Eric Sunshine
2022-07-31 18:56               ` Junio C Hamano
2022-07-29 13:16     ` Re* --creation-factor=100 does not show code Johannes Schindelin
2022-07-29 22:19       ` Junio C Hamano
2022-08-01 23:17         ` Junio C Hamano [this message]
2023-04-02 21:55           ` Eugen Konkov

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqqa68nlfiz.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=kes-kes@yandex.ru \
    /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 public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).