From: Curt Hibbs Date: 2002-01-14T17:57:38+09:00 Subject: RE: Small Methods - a ramble > From: Laurent Julliard [mailto:Laurent.Julliard@xrce.xerox.com] > Sent: Monday, January 14, 2002 12:48 AM > > Building on Ron's remark I too do tend to have either large methods with > comment in it because it makes it easier to follow the "story". > Splitting the code in many small pieces which I do as well is really > when either you know the code very well and the code browser is actually > in your brain or you have a powerful and convenient browsing tool at > hand (I still haven't found one personally and stick to Emacs. Which is > why I want FreeRIDE to be innovative in this area) > > So it looks like we have a sort of a dilema here between reading a story > (like we read a novel in a book) and looking at the structure of the > story (like we read a table of content and possibly the index).If we > push the book analogy one step further there is another thing we could > do which is a variant of the = Collapsible Text = describe by Curt above. > > The idea is to have the ability to flatten a method in place. In other > words it would give you the ability to substitute a method call in a > given piece of code by the code of the method itself (possibly doing > clever substitution argument names). And you could do this recursively > of course so that from a highly fragmented series of methods you can at > any given time flatten the code and read the story in-line. > > It is exactly like if you were given a table of content of a book and > had the ability to expand any of the chapter section, sub-section and > substitute them with the content for a while to read the story. > > I don't know if this kind of tool is already available is some IDE and > I'd be glad to here your comments about that. This is a very interesting idea -- I haven't seen this before. I can see how this could be very useful for learning an unfamiliar piece of code. Would you be willing to add this to the FreeRIDE wiki (probably under the Other Features Project). Thanks, Curt