What's exactly "method defactoring"?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

What's exactly "method defactoring"?

Andrea Gammachi
Hi all. I've found a "Method Defactoring tool" (http://www.craftedsmalltalk.com/downloads.html) but can't figure out what kind of use I can give it, I mean I've swap between Defactor and Source tabs in the CodePane in many methods but doesn't found any method in which makes difference.

from http://www.cincomsmalltalk.com/userblogs/traymond/blogView?showComments=true&entry=3308226450

"One of my pet peeves about smalltalk is that it can be a pain to read highly factored code. You end up chasing through several small methods to figure out what is going on"

What does it mean "highly factored code" ?
What's the big deal with "inline message sends" with or without method recompilation?

Any help?

Regards

Andrea
Reply | Threaded
Open this post in threaded view
|

RE: What's exactly "method defactoring"?

Terry Raymond

Andrea

 

I find it annoying to have to trace through several small methods

to figure out what is being done. By highly factored, I mean the

writer has taken a method of about 20 lines and reduced it to

a method of 5 or less lines. It usually sends about 3 to 5 self

messages to accomplish the same thing. The defactoring tool

inlines those 3 to 5 methods so you can read the surrounding context

and under stand what it is doing. However, the inlining is only done

in the editor, the actual method is not changed.

 

Terry

===========================================================
Terry Raymond       Smalltalk Professional Debug Package
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
<http://www.craftedsmalltalk.com>
===========================================================


From: Andrea Gammachi [mailto:[hidden email]]
Sent: Thursday, March 02, 2006 8:11 PM
To: [hidden email]
Subject: What's exactly "method defactoring"?

 

Hi all. I've found a "Method Defactoring tool" (http://www.craftedsmalltalk.com/downloads.html) but can't figure out what kind of use I can give it, I mean I've swap between Defactor and Source tabs in the CodePane in many methods but doesn't found any method in which makes difference.

from http://www.cincomsmalltalk.com/userblogs/traymond/blogView?showComments=true&entry=3308226450

"One of my pet peeves about smalltalk is that it can be a pain to read highly factored code. You end up chasing through several small methods to figure out what is going on"

What does it mean "highly factored code" ?
What's the big deal with "inline message sends" with or without method recompilation?

Any help?

Regards

Andrea