From: Junio C Hamano <junkio@cox.net>
To: Linus Torvalds <torvalds@osdl.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] diff-cache path restriction fix.
Date: Tue, 24 May 2005 20:22:59 -0700 [thread overview]
Message-ID: <7vwtpong4s.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.58.0505242002340.2307@ppc970.osdl.org> (Linus Torvalds's message of "Tue, 24 May 2005 20:04:56 -0700 (PDT)")
>>>>> "LT" == Linus Torvalds <torvalds@osdl.org> writes:
LT> On Tue, 24 May 2005, Junio C Hamano wrote:
>>
LT> Also, what language do you actually speak?
>>
>> Japanese.
LT> It is possible it is cultural. I certainly find it harder to read the
LT> "unexpected" way.
I doubt it is Japanese vs Western kind of cultural. When I said
"people around me", that set of people did not include a single
Japanese. I meant people who worked with the person I was
trained by to use this style. Cultural, maybe, but that is
programming culture and definitely not natural language culture
in my case.
Here is a quick and dirty experiment which showed quite an
interesting statistics. It counts number of '<' and '>' in the
program text, after stripping out ptr->deref (yes it catches
#include <stdlib.h>, but they even out and it also catches
whatever is in comments, but this is just a Q&D stats for fun).
The percentage is how close the program text is to "visually
ordered" style:
$ cat count-compare.perl
#!/usr/bin/perl -w
for my $filename (@ARGV) {
open I, '<', $filename;
my ($lt, $gt) = (0, 0);
while (<I>) {
s/->//g; # pointer deref not comparison
$lt += tr/</</; # count
$gt += tr/>/>/; # count
}
close I;
my $ratio = ($lt / ($lt + $gt)) * 100;
printf "'<' (%d) '>' (%d) (%d%%) %s\n", $lt, $gt, $ratio, $filename;
}
$ perl count-compare.perl diff*.c
'<' (9) '>' (4) (69%) diff-cache.c
'<' (20) '>' (26) (43%) diff-delta.c
'<' (8) '>' (1) (88%) diff-files.c
'<' (12) '>' (1) (92%) diff-helper.c
'<' (11) '>' (11) (50%) diff-tree.c
'<' (28) '>' (10) (73%) diff.c
'<' (3) '>' (0) (100%) diffcore-pathspec.c
'<' (2) '>' (0) (100%) diffcore-pickaxe.c
'<' (22) '>' (6) (78%) diffcore-rename.c
This clearly shows that diff-delta.c does not have my code at
all. Most of the others have been touched moderately to heavily
by me, or in some cases done entirely by me.
Personally, what I find most interesting is that diff-tree.c is
something you did quite a lot of nice features (and hence
something I was afraid to touch), and the number clearly shows
my hesitation. It does not have as many '<' as it would have
had, if I had mucked with it as freely as I did to the others.
next prev parent reply other threads:[~2005-05-25 3:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-25 0:47 [PATCH] diff-cache path restriction fix Junio C Hamano
2005-05-25 1:00 ` Linus Torvalds
2005-05-25 1:05 ` Junio C Hamano
2005-05-25 1:24 ` Linus Torvalds
2005-05-25 1:49 ` Junio C Hamano
2005-05-25 2:16 ` Russ Allbery
2005-05-25 2:33 ` Junio C Hamano
2005-05-25 3:04 ` Linus Torvalds
2005-05-25 3:22 ` Junio C Hamano [this message]
2005-05-25 9:06 ` Ingo Molnar
2005-05-25 17:07 ` Linus Torvalds
2005-05-25 19:14 ` Junio C Hamano
2005-05-25 19:17 ` Thomas Glanzmann
2005-05-25 20:31 ` Matthias Urlichs
2005-05-28 7:55 ` [OT] if (4 < number_of_children) you're in trouble Junio C Hamano
2005-05-25 8:31 ` [PATCH] diff-cache path restriction fix Ingo Molnar
2005-05-25 16:02 ` Florian Weimer
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=7vwtpong4s.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=torvalds@osdl.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 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).