From: Ron Jeffries Date: 2002-01-14T11:28:34+09:00 Subject: Re: Small Methods - a ramble On Sun, 13 Jan 2002 22:56:22 GMT, Tobias Reif wrote: >It's true; either I have large methods, and it's a mess, or I break lots >of stuff into small(er) methods, then I get so many methods that it >becomes hard to find one. > >A browser like you describe would be cool then. > >Or I can separate them into more classes, break those into files: the nI >can browse methods hirarchically: files -> classes/modules -> >private/public methods. > >How does a Smalltalk-like browser represent the hirarchies? >Why can you find methods faster with it? Typically there will be three panes: top left a list of classes, top right a list of methods, bottom the method source for the method selected by list selection in top left and right. When you look at a method like one of my tiny ones and want to know the implementation of one of the messages it sends, you highlight that word, pop up a menu and pick "implementors" or "local implementors" and you see that method. Usually you only have to go down a little ways and you get the drift. > > > Smalltalk browser has a pane listing just the method names, typically > > alphabetically (or possibly > > grouped, alpha inside each group). When you click on a method in the > > list pane, that method appears. > > You can look at it, edit it, save it, look at another, and so on. > >Some editors can collapse Ruby methods; that could help. I've not seen one of those, where can I find one? I'm just using TextPad as I'm a Windows guy ... > >But some nifty Ruby code browser integrated into FreeRIDE would >definitely be helpful. Yes. I'm not sure whether or how to hook up with the FreeRIDE project right now. Chet and I have been working a little bit on a fully incremental Ruby browser and might continue that. It seems to me that the Smalltalk style is so different from what most Rubyites are used to that it might never catch on. Regards, Ronald E Jeffries http://www.XProgramming.com http://www.objectmentor.com I'm giving the best advice I have. You get to decide whether it's true for you.