Editing class method sources in single place
jason.johnson.081 at gmail.com
Thu Jan 31 17:43:24 UTC 2008
On Jan 31, 2008 12:27 PM, Blake <blake at kingdomrpg.com> wrote:
> Squeak isn't source file based, and I doubt any form of presentation could
> make it so. (Though, I guess maybe if you had the Smalltalk OS, it would
> probably host something like a source-file based scripting system. Or
I was just pointing out the kind of requests that happen from people
coming from other languages and not "integrating". I remember
recently seeing someone request that Smalltalk drop the "image idea"
and switch to source files so it would be more "friendly to newbies".
> But the "root of the problem" is visual as well as tactile. It's all very
> well to have all the source code available all the time, but much of the
> time, I don't want to have to care. And the remainder of the time, I don't
> want to see all of it, all the time. I want to see what =I= am working on.
> More importantly, when I'm teaching, I want students to see =THEIR= code
> most of the time: I'd like to be able set it up so that the debugger
> wouldn't go in to the base classes unless asked, because that stuff can be
> very confusing to a beginner.
> One of the most important lessons in programming is that, when you're
> programming and there's a bug, it's in your own code. Not in the library,
> not in the compiler, not in the operating system. (If that's not the case,
> you need a new library/compiler/OS.) I love the encouragement to explore
> in Smalltalk--I just want to be able to turn it off sometimes.
> I recall a study (by IBM, I think) where the amount of code one could see
> at once was postiively related to productivity.
I don't understand this. Are you saying that having more source code
on the screen increased productivity? That may be but if so a simple
"show me all the methods in the class" isn't going to work.
For example (sorry to keep going back to this), I'm working on a C#
project now that is relatively old and has a lot of lines of code in
it. Of course the way that IDE works is the standard "show everything
in a flat file" way. So one big problem for me is all this
distracting code in my view (i.e. code that is not part of the
functionality I'm working on in that moment). The problem is simply
that this view is static. The files are written as:
1. private/protected variables
3. private/protected methods
4. event related
So that view is good for figuring out where functionality is in a new
class. But when I want to work on the functionality of one specific
button the view is all wrong. I want to see the above mentioned items
that are related to this specific button and nothing else. What I do
right now is click the minus on the unrelated methods to shorten them
down to one line, but it's still clutter I have to wade through.
> (And yet, I'm the only
> coder I know with a propensity for conserving vertical space.) I do know
> that if I'm in method A and it calls method B, and method B is right
I wonder about doing a tooltip style pop up on mouse over of the B
method call. :)
>I'm golden. As a corrolary to "the problem is in your code",
> there's also, "the problem is mostly in the code you just changed". I
> could see a browser where the methods highlighted their latest changes,
> like a mini-diff--something also good for pedagogical purposes.
More information about the Squeak-dev