Breaking up the image

Andreas Raab andreas.raab at gmx.de
Tue Dec 10 18:40:53 UTC 2002


Daniel,

I don't think that's a very good theory. You are taking statistical
measures and apply meaning to them where you have to look at the
concrete context. By and large I would argue that most of these
references come from two different kinds.

One are references from methods where the method *logically* belongs to
another package. Meaning that the reference to a class from this package
is entirely reasonable and removing those would be obfuscating the fact
that this method is not a part of the "Kernel-Object" aspect of objects.
This certainly applies to many of the references in class Object and
others in particular in any fundamental classes (like Morph).

Then, there are other references that come from a set of collaborators
and which are entirely reasonable and perfectly logical. Would you be
surprised to see references to (for example) the classes being
responsible for graphics (color, fill style, border style, form, etc)
being referenced from class Morph?! Certainly not - those are simply
aspects which are used to describe the (composite) behavior of an
animated graphical object.

Given the above, is there any meaningful interpretation of your
results?! I argue not. Except from the fact that "Object references 63
classes" there is no real information in this unless you start looking
at where, how, and why a certain class is referenced.

And that's also why I like the "top-down" approach much more. Sure, I
could go in and remove (for example) the reference to "TestTMethod" from
Object>>primitive:parameters:receiver:. I might for example solve this
problem by saying "ClassRegistry at: #TestTMethod" or (shorter)
"Smalltalk at: #TestTMethod". But what have I done then?! I have just
obfuscated the problem for someone who wants to work on VM-Removal. And
really, that person should decide how to go about the problem, since it
is understandable in the concrete context why the reference is there and
why it may (or may not) be useful.

Of course, for some places the above does not apply (such as the file
list) in particular if there is some general service that many clients
(classes) want to subscribe to. Yet again, you have to look at the
concrete context in order to figure out what is going on here. Just
counting the number of references doesn't help you.

Cheers,
  - Andreas


> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org 
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On 
> Behalf Of Daniel Vainsencher
> Sent: Tuesday, December 10, 2002 5:42 PM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: Breaking up the image
> 
> 
> I'm offering a theory:
> 1. We have a big image because it has explicit references from basic
> core classes to things that should be packages.
> 2. The references were put there by well meaning people, because it is
> useful for the core class to know the package class.
> 3. Some few specific classes hold most of the bad references, because
> they are useful entry points for linking in functionality.
> 4. To make the image smaller, we need to find those core classes that
> know everybody, and break them up, refactor them, or make their
> utilities into class-extensions, until their bad links are no longer
> binding all those classes into the image. An example is the 
> dynamic file
> list services refactoring that's already happened in 3.3a/3.4.
> 
> Call this Bottom-Up theory of squeak spaghetti, as opposed to the
> Top-Down theory, that says we should remove applications whole one by
> one.
> 
> So I did some SpaghettiTracer magic, and got the following results.
> 
> Here's a list of classes that know too much (Specifically, too many
> other classes). This list excludes high level objects that should
> probably be removed from the image quite early. Any insights on why
> these classes know so much, and how to fix it would be most welcome.
> 
> # of referenced classes -> #ClassNames
>  127-> #Morph
>  107-> #SystemDictionary
>  85-> #PasteUpMorph
>  77-> #Project
>  73-> #Utilities
>  63-> #Object
>  55-> #ParagraphEditor
>  50-> #ImageSegment #TheWorldMenu
>  46-> #BookMorph
>  44-> #FileList #ChangeList
>  41-> #Preferences
>  40-> #Form #ServerDirectory #SmartRefStream #ChangeSet
>  39-> #Browser
>  37-> #CodeHolder
>  36-> #String #ChangeSorter #Debugger
>  34-> #FileContentsBrowser
>  33-> #FileList2
>  32-> #AbstractSound 
>  31-> #Behavior 
>  30-> #SystemWindow
>  29-> #MailMessage
>  28-> #TextMorph #Flaps
> 
> 
> Full list (cutoff at 6 references, since that's meaningless)
> 
> 
>  127-> #Morph
>  107-> #SystemDictionary
>  85-> #PasteUpMorph
>  77-> #Project
>  73-> #Utilities
>  67-> #SyntaxMorph
>  66-> #Player
>  63-> #Object
>  55-> #ParagraphEditor
>  50-> #ImageSegment #TheWorldMenu
>  49-> #Celeste
>  46-> #WonderlandCameraMorph #BookMorph
>  45-> #WonderlandActor
>  44-> #FileList #ChangeList
>  41-> #Preferences
>  40-> #Form #ServerDirectory #SmartRefStream #ChangeSet
>  39-> #Browser #Wonderland
>  37-> #ScriptEditorMorph #CodeHolder
>  36-> #String #ChangeSorter #Scamper #Debugger
>  35-> #ScorePlayerMorph #Vocabulary #Lexicon
>  34-> #FileContentsBrowser
>  33-> #FlashMorphReader #FileList2
>  32-> #AbstractSound #ProcessBrowser
>  31-> #Behavior #StandardScriptingSystem
>  30-> #CategoryViewer #SystemWindow
>  29-> #EnvelopeEditorMorph #MailMessage #SuperSwikiServer
>  28-> #TextMorph #Flaps #ArchiveViewer #AudioChatGUI
>  27-> #MoviePlayerMorph #TileMorph #HTTPSocket #ClassDescription
> #StringHolder #ProjectViewMorph #Inspector
>  26-> #IRCConnection
>  25-> #InterpreterSimulator #EToySenderMorph #Parser #DataStream
> #EventRecorderMorph #DocLibrary #HandMorph #Presenter
>  24-> #InternalThreadNavigationMorph #ScreenController #ProjectLoading
> #ProjectNavigationMorph #NetworkTerminalMorph
>  23-> #WaveEditor #SelectorBrowser #PluggableFileList #CRDictionary
>  22-> #StackMorph #PaintBoxMorph #FlashPlayerMorph 
> #CRDictionaryBrowser
> #MethodFinder #MailDB #StandardViewer #ResourceManager 
> #PreferencesPanel
> #SketchMorph
>  21-> #StandardFileStream #WorldState #Color
>  20-> #PolygonMorph #FlapTab #CCodeGenerator #Text
> #ComplexProgressIndicator #HaloMorph
>  19-> #FlashFileReader #StandardSystemView #CompiledMethod
> #FileDirectory #Environment #Integer #InterpreterProxy #MessageSet
>  18-> #StrikeFont #MenuMorph #DigitalSignatureAlgorithm #ContextPart
> #EToyCommunicatorMorph #Collection #FileStream #RunArray
> #TextMorphEditor #FormEditor
>  17-> #ThreeDSParser #Encoder #PositionableStream #EToyChatMorph
> #CanvasDecoder #Pen #StarSqueakMorph #TMethod #SketchEditorMorph
>  16-> #CRDictionaryMorph #SecurityManager #ScriptInstantiation
> #EToyListenerMorph #SampledSound #SimpleButtonMorph #BitBlt 
> #HTTPClient
> #FreeCell #TabbedPalette #PostscriptCanvas #CelesteComposition
>  15-> #SimpleClientSocket #VRMLStream #ZipWriteStream 
> #ButtonProperties
> #StringMorph #SelectionMorph #JPEGReadWriter #MIDIFileReader
> #CRDisplayPropertiesInstanceBrowser #BitEditor #PseudoClass
> #SequenceableCollection #HtmlFormatter #CanvasEncoder #CRRecognizer
> #Class #Number #GenericPropertiesMorph
>  14-> #PluggableListMorph #URLMorph #Viewer #EToyMultiChatMorph
> #NewParagraph #BalloonEngine #ResourceCollector #PopUpMenu
> #GraphicalDictionaryMenu #SyntaxError #WonderlandCamera
> #EToyIncomingMessage #PluggableTextMorph #StringSocket #MessageTally
> #Paragraph #ReferenceMorph #BDFFontReader #ZipArchiveMember
> #CRAddFeatureMorph #EToyFridgeMorph #TextPlusMorph
>  13-> #ColorPickerMorph #TestTMethod #MenuItemMorph
> #DecompilerConstructor #B3DRenderEngine #PianoRollScoreMorph 
> #SqueakPage
> #PhraseTileMorph #WordNet #CRDisplayPropertiesMorph 
> #UpdatingStringMorph
> #FlashCodec #ClassBuilder #ProjectSorterMorph #Preference
> #TextPropertiesMorph #MessageNames #Socket #ChatNotes
>  12-> #ControlManager #CRStrokeFeature #NebraskaServerMorph
> #EToyVocabulary #B3DIndexedMesh #FancyCelesteComposition #IconicButton
> #CardPlayer #SimpleHierarchicalListMorph 
> #ThreadNavigationMorph #HttpUrl
> #EToyProjectHistoryMorph #ScorePlayer #TCaseStmtNode #Dictionary
> #FormCanvas #EToyPeerToPeer #IndexFile #BookPageThumbnailMorph
> #TabSorterMorph #Url #WonderlandMesh #DialectParser #TextOnCurve
> #Base64MimeConverter #FMSound #ReferenceStream #FatBitsPaint
> #SystemVersion #SmallInteger #LineIntersections #ParseNode
>  11-> #StandardFileMenu #SampledInstrument #LoopedSampledSound
> #ColorForm #InputSensor #Transcripter #AutoStart #Interpreter
> #FreeCellBoard #B3DHardwareEngine #B3DSimpleMesh #B3DSimulRasterizer
> #ScrollBar #Rectangle #HTTPLoader #ObjectPropertiesMorph
> #TextDiffBuilder #PlayingCard #PointerFinder #PoohSubdivision
> #CompoundTileMorph #GeePrinter #MorphWorldView #MessageNode 
> #FilePackage
> #SoundPlayer #B3DPrimitiveRasterizer #FillInTheBlankMorph
> #BitBltSimulation #Array #BlockContext #PackagePaneBrowser
> #PluggableCollectionMorph #ObjectsTool #WonderlandLightSource
> #AlignmentMorph
>  10-> #GraphMorph #VariableNode #SearchingViewer #SoundRecorder
> #RemoteHandMorph #BalloonCanvas #HtmlParser #ImageMorph
> #ClassCommentVersionsBrowser #Symbol #FileUrl #StringHolderView
> #StandardSystemController #PluggableButtonView #B3DSTriangleMesh
> #FormMenuView #FreeTranslation #MorphicModel #AllScriptsTool
> #MessageSend #NetNameResolver #Date #View #HtmlEntity #NebraskaServer
> #BouncingAtomsMorph #Time #EToyProjectRenamerMorph 
> #MorphicEvent #Canvas
> #ComponentLikeModel #VersionsBrowser
>  9-> #MorphicTransform #NumericReadoutTile #HtmlTokenizer 
> #GIFReadWriter
> #PoohTriangle #ZipArchive #PinMorph #ImageReadWriter
> #PortugueseLexiconServer #IndexFileEntry #Bitmap #TilePadMorph #Model
> #Command #B3DScanner #ExternalDropHandler #POPSocket 
> #TimeProfileBrowser
> #WarpBlt #FillInTheBlankView #CharRecog #TranscriptStream
> #NebraskaClient #FTPSocket #SoundBuffer #WonderlandScene 
> #DisplayScreen
> #BMPReadWriter #BorderedMorph #WonderlandWrapperMorph
> #AlansTextPlusMorph #SpeakerMorph #FlashSorterMorph
>  8-> #PartsBin #ThreePhaseButtonMorph #KeyboardMorphForInput
> #DisplayScanner #FlashButtonMorph #IRCDirectMessagesObserver
> #StringButtonMorph #TextPlusPasteUpMorph #AIFFFileReader
> #UndefinedObject #DisplayText #ProgressInitiationException
> #PluggableListView #InterpreterPlugin #MovieClipStartMorph #Compiler
> #UniclassScript #EToySystem #BooklikeMorph #SecureHashAlgorithm
> #ScrollController #DHtmlFormatter #MethodInterface #GradientFillStyle
> #Scanner #B3DMatrix4x4 #SARInstaller #EToyGenericDialogMorph 
> #BraceNode
> #Component #GZipSurrogateStream #BalloonMorph #ScrollPane
> #ButtonPropertiesMorph #B3DIndexedTriangleMesh #GZipReadStream
> #TestCodeGenerator #SystemOrganizer #MIMEDocument #ClassOrganizer
> #ProjectHistory #TextStyle #StrokeSimplifier #DiskProxy 
> #CrLfFileStream
> #RemoteString #GraphAnalyzer #BookPageSorterMorph #MethodNode
> #OrderedCollection #BorderStyle #WonderlandVerifier #DisplayObject
>  7-> #CustomMenu #PlayingCardDeck #CRDictionaryInstanceBrowser
> #ThumbnailMorph #GeePrinterDialogMorph #ListView #EToyGateKeeperEntry
> #FlashSpriteMorph #WeakRegistry #ShortRunArray #MethodHolder
> #DictionaryInspector #ObjectExplorer #IRCChannelListBrowser
> #StarSqueakTrees #ProtocolBrowser #ClassDiffBuilder 
> #B3DIndexedQuadMesh
> #ComplexBorder #DoCommandOnceMorph #Point #AttributedTextStream
> #ListParagraph #MIDIControllerMorph #Password #Subdivision
> #AlignmentMorphBob1 #IndentingListItemMorph #FlashMorph #RemoteCanvas
> #DialectStream #TextContainer #NumberType #PluggableButtonMorph
> #SqueakPageCache #FreeCellStatistics #NewWorldWindow #TextURL
> #TextPrinter #SoundCodec #PianoKeyboardMorph #MailAddressParser
> #TextFieldMorph #SimpleSliderMorph #ChangeSetCategory #MethodContext
> #InflateStream #FFT #IRCChannelObserver #ChangeRecord
> #ObjectWithDocumentation #Decompiler #Metaclass #PlayingCardMorph
> #ReadWriteStream #BasicButton #FlashFileStream #TextComposer
> 




More information about the Squeak-dev mailing list