[Q] Squeak author statistics

Dan Ingalls Dan at SqueakLand.org
Sat Aug 3 00:34:01 UTC 2002


"Norton, Chris" <chrisn at Kronos.com> wrote...

>I used my lunch hour to snoop around in Squeak 3.2.  Specifically I was
>looking for statistics on those author initials that you see in the Browser
>when you turn on the annotation pane preference.  Surprisingly, I got lost
>in the code and didn't find what I was looking for!  (Yes, I used method
>finder, etc.)
>
>As I understand it, and my understanding of this area is rudimentary at
>best, each selector has a CompiledMethod and that CompiledMethod has a link
>(in its last 3 digits) to the source code in the sources file and that's
>where you get your method sources.  Where is the author initials and
>timestamp information kept?
>
>What I was trying to do, was to create a script that would generate a list
>of all of the author initials in the image, along with a count of how many
>methods each person touched...  Just for fun.  :-)
>
>I suppose someone has already written this script and I just haven't found
>it yet.  In any case, will one of you experts please explain briefly how the
>source code is maintained in the Squeak image?  Or could you please point me
>to a description of this mechanism on the web?

The last 3 bytes of the method are an index into the .sources file or the .changes file.  The method is stored in that file, *preceded by a header* of the form...

!Preferences class methodsFor: 'halos' stamp: 'tk 6/28/2002 12:16' prior: 74799167!

Now you can see where the stamp info comes from, and the 'prior' arg is the source link back to the prior version of the method.  It is, of course ignored when a fileIn reads and executes the header.

Try screen-menu/changes.../recent log file... to paw around in some of your own changes.

If you want to trace down code that can naviggate this structure, look at

	Utilities class >>browseVersionsForClass:selector:

Hope this helps

	- Dan



More information about the Squeak-dev mailing list