Re: [AD] another patch

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Michael Bukin <M.A.Bukin@xxxxxxxxxx> writes:
> Personally, I like lists sorted alphabetically, because it is easier for 
> adding new entries and for finding something.

True. Plus it avoids the inevitable problem of putting the people who do 
most work at the top, which is that the people who did less work start to 
resent being sorted towards the bottom, so all of a sudden you have to worry 
about doing it all fairly and somehow trying to judge what work was the most 
important, which I'd hate!

> Now for suggestion.  I've got an idea about attracting more attention to 
> the AUTHORS file (and showing names in big letters :).  The idea is to 
> make new example program which will read the AUTHORS file and will show it 
> in various views:

I love that idea. Although I also like George's suggestion of adding this 
into the demo game: it might be nice to have the names displayed in some 
cool way alongside the starfield, above the scrolling readme message (the 
demo game already parses readme.txt to find out what should go in the 
scroller, so it makes sense that it could look at the AUTHORS file as well).

Another possibility is that as well as pulling the list of names from 
AUTHORS, it could parse the actual source code to see what files include a 
mention of each name. This gives a surprisingly accurate measurement of what 
things people have worked on: it is skewed towards both extremes because 
people who wrote less than an entire source file tend not to be mentioned at 
all, while I get credited for a lot of things that I didn't write, since my 
name ends up stuck on the top of things just because I started them no 
matter who else has later improved that code, but overall I don't think 
anyone could complain about this not being fair. So if we read AUTHORS to 
find the names and descriptions of what these people did, and then parsed 
the source code to find what files were affected, we could sort the list by 
the number of files each person has written, and display the filenames along 
with the info from AUTHORS...

As an example of what I'm talking about, this script just pulls out a list 
of names and source files:


   #! /usr/bin/perl -w

   open FILE, "docs/thanks._tx" or die "Can't open docs/thanks._tx\n";

   while (<FILE>) {
      if (/^\s+(.+) \(<email>/) {
	 push @people, $1;
      }
   }

   sub scandir
   {
      for $file (<@_>) {
	 if (-d $file) {
	    scandir("$file/*");
	 }
	 elsif ($file =~ /\.(c|h|inc|s)$/) {
	    print STDERR "Scanning $file\n";

	    open FILE, $file or die "Can't open $file\n";

	    SCAN: while ($line = <FILE>) {
	       for $dude (@people) {
		  if (index($line, $dude) >= 0) {
		     $stuff{$dude}{$file} = 1;
		  }
		  elsif ($line =~ /\*\//) {
		     last SCAN;
		  }
	       }
	    }
	 }
      }
   }

   scandir("*");

   sub cmpfunc
   {
      my $diff = (keys %{$stuff{$b}} <=> keys %{$stuff{$a}});
      $diff = ($a cmp $b) unless ($diff);
      return $diff;
   }

   for $dude (sort cmpfunc keys %stuff) {
      print "$dude\n";

      for $file (sort keys %{$stuff{$dude}}) {
	 print "\t$file\n";
      }

      print "\n";
   }



--
Shawn Hargreaves - shawn@xxxxxxxxxx - http://www.talula.demon.co.uk/
"A binary is barely software: it's more like hardware on a floppy disk."



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/