Code Comments
Programming Forum and web based access to our favorite programming groups.Can someone explain me what "refactoring" of a (java) project mean? I searched in google for a good explanation but found only mess (in the firs t 100 items). Anan
Post Follow-up to this message"Anan H. Samiti" <anan22@hotmail.com> wrote in message news:ce5of5$5kc$04$1@news.t-online.com... > Can someone explain me what "refactoring" of a (java) project mean? > I searched in google for a good explanation but found only mess (in the first 100 items). > > Anan > The process of reviewing and improving code. There are IDE's that specialise in assisting this kind of thing. You can review call trees, see where a method is used, rename variables/classes more appropriately etc. -- Mike W
Post Follow-up to this messageOn Tue, 27 Jul 2004 16:22:30 +0200, anan22@hotmail.com (Anan H. Samiti) wrote or quoted : >Can someone explain me what "refactoring" of a (java) project mean? see http://mindprod.com/jgloss/refactoring.html -- Canadian Mind Products, Roedy Green. Coaching, problem solving, economical contract programming. See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Post Follow-up to this messageAnan H. Samiti wrote: >Can someone explain me what "refactoring" of a (java) project mean? >I searched in google for a good explanation but found only mess (in the fir st 100 items). > >Anan > > A quite good explanation (at least in my opinion) is given at http://en.wikipedia.org/wiki/Refactoring (espcially the first 2 paragraphs there) -- Thomas<dot>Fritsch<squiggle>ops<dot>de
Post Follow-up to this messageOn Tue, 27 Jul 2004, Anan H. Samiti wrote: > Can someone explain me what "refactoring" of a (java) project mean? > I searched in google for a good explanation but found only mess (in the first 100 items). Refactoring is improving the design of existing code. It does not add new feature or change the behaviour of the existing features. It improves the internal structure. It is just a way of making the code more maintainable. Over time, software will become difficult and costly to maintain. By occasionally refactoring it, you will be able to avoid this. -- Send e-mail to: darrell at cs dot toronto dot edu Don't send e-mail to vice.president@whitehouse.gov
Post Follow-up to this messageAnan H. Samiti wrote: > Can someone explain me what "refactoring" of a (java) project mean? > I searched in google for a good explanation but found only mess (in the first 100 items). http://www.extremeprogramming.org/rules/refactor.html /Thomas
Post Follow-up to this message> Can someone explain me what "refactoring" of a (java) project mean? > I searched in google for a good explanation but found only mess (in the first 100 items). > http://www.refactoring.com/ -- Andrei Kouznetsov http://uio.dev.java.net Unified I/O for Java http://reader.imagero.com Java image reader
Post Follow-up to this messageIn article <ce5of5$5kc$04$1@news.t-online.com>, anan22@hotmail.com (Anan H. Samiti) wrote: > Can someone explain me what "refactoring" of a (java) project mean? > I searched in google for a good explanation but found only mess (in the fi rst > 100 items). Refactoring is simply code improvement done mostly through code movement or minor changes. For example, renaming a method from "dagnabit" to "searchForDuplicates" is a simple refactoring. Extracting the "searchForNextToken" guts of "searchForDuplicates" is another, and useful if more than one routine needs it. It is something that most developers do on a regular basis, but having a set of common names for the actions, and some agreement on a basic set of such actions, makes it more likely that IDE makers will support these actions. Martin Fowler wrote a book called "Refactoring" in which he popularized this term. He also categorized them, and suggested that IDEs should do some of this automatically. This push led, I suspect, to its heavy influence on XP and the inclusion of so-named refactoring support in IDEA, Eclipse, and TogetherJ. What makes it better than glorified cut and paste is the understanding your IDE can have of your code. For example, you could do a search and replace to find the "dagnabit" calls I mentioned above, but if you are moving methods to a subclass, or perhaps adding a parameter to a method, the search and replace gets a lot harder to write without introducing errors. Further, computers tend to be good at repetitive tasks like adding a default value to every use of a method. Scott
Post Follow-up to this message"Scott Ellsworth" <scott@alodar.com> wrote in message news:scott-7B2302.13445527072004@news.west.cox.net... > What makes it better than glorified cut and paste is the understanding > your IDE can have of your code. I agree that a good IDE makes Refactoring alot easier and safer but the precondition to refactoring is a suite of solid tests. Shane -- http://www.jetbrains.com/idea/custo...stimonials.html
Post Follow-up to this messageOn Wed, 28 Jul 2004, Shane Mingins wrote: > "Scott Ellsworth" <scott@alodar.com> wrote in message > news:scott-7B2302.13445527072004@news.west.cox.net... > > I agree that a good IDE makes Refactoring alot easier and safer but the > precondition to refactoring is a suite of solid tests. > > Shane > > -- > http://www.jetbrains.com/idea/custo...stimonials.html In the filesystem pane Netbeans lets me rename classes and will automatically update at least the class name, which is good, but then I have to click around to fix the comments. It'd almost be easier to use vi and do the /$/whatever search and replace. This goes to what tools you know; blah blah when you have a hammer blah blah something about nails and how everything looks like a .... nail. I can't believe renaming a few classes counts as refactoring. Isn't refactoring inherently painful? doesn't it more often mean re-design and doing away with stuff and adding new stuff and simplifing the API, etc? Thufir Hawat <http://www.shaw.ca/members/hawat/source/>
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.