refactoring : Java Glossary

go to home page R words local find full screen, hide local find menu Google search web for more information on this topic jump to foot of page translate this page with Babelfish punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all) ©1996-2009 2009-05-03 Roedy Green, Canadian Mind Products
logorefactoring
Cleaning up code, perhaps by moving a field from one class to another, pushing some code up or down a hierarchy. Most often it is the process of splitting out repetitive code to turn it into its own separate method. An automated tool such as a SCIDs to help you do might work like this:
  1. I have a method which has some code that I would like to pull out into its own method.
  2. I highlight the offending code.
  3. I select Extract Method from a popup menu
  4. The Refactoring Browser asks me to name the method and automatically creates it and inserts the highlighted code.
  5. In the current method, the highlighted code is replace by an invocation to the newly created method.

Ideally, in a perfectly written computer program, with a perfectly designed computer language, with a perfect SCID/ IDE, it should be possible to change any line/element of the program in isolation without having to make any supporting changes elsewhere. The program should still function in a reasonable way. For example, you should be able to change the allowable bounds on a field variable in one line of code (which might result in it internally being promoted from int to long), without having to manually adjust any other code. The basic principle is you should have to tell a computer any one fact, or decision in only one place. For example, you should have to tell a program which colour scheme to use in precisely one and only one place, and by ‘one place’ I mean one line of code. Real life computer languages and IDEs put up huge roadblocks to getting anywhere close to perfection.

IntelliJ

I use Jetbrains IntelliJ IDEA as my IDE, which supports many canned refactorings with a few mouseclicks. Some of the most useful are: It is a whole new way of programming. By letting the computer handle the details of the transformations, you can rapidly rearrange code without breaking it. You tend then to hold yourself to an ever higher standard. It is a step on the road to a SCID where you don’t transform its deep structure to view it in alternate ways.

Books

book cover recommend book⇒Refactoring : Improving the Design of Existing Code
 hardcoverkindle
ISBN13:978-0-201-48567-7impressioncounterB000OZ0N4Yclickcounter
publisher:Addison-Wesley
published:1999-07-08
by:Martin Fowler, Kent Beck (Contributor), John Brant (Contributor), William Opdyke, Don Roberts.
UK flag abe books.co.uk abe books.ca Canadian flag
UK flag amazon.co.uk. amazon.ca. Canadian flag
German flag abe books.de chapters.indigo.ca. Canadian flag
German flag amazon.de. abe books.com American flag
French flag abe books.fr amazon.com. American flag
French flag amazon.fr. barnes and noble.com American flag
Italian flag abe books.it powells.com American flag
Spanish flag iberlibro.com sony e-books American flag
Australian flag abe books anz

book cover recommend book⇒Code Complete : A Practical Handbook of Software Construction
 paperback
ISBN13:978-1-55615-484-3impressioncounter
publisher:Microsoft Press
published:1993-05-14
by:Steve McConnell
Gives lots of practical advice on optimising. He talks mostly about C with examples in Fortran, Pascal, Basic and Ada. He doesn’t talk about Java. It didn’t exist when the book was written.
UK flag abe books.co.uk abe books.ca Canadian flag
UK flag amazon.co.uk. amazon.ca. Canadian flag
German flag abe books.de chapters.indigo.ca. Canadian flag
German flag amazon.de. abe books.com American flag
French flag abe books.fr amazon.com. American flag
French flag amazon.fr. barnes and noble.com American flag
Italian flag abe books.it powells.com American flag
Spanish flag iberlibro.com sony e-books American flag
Australian flag abe books anz

book cover recommend book⇒Refactoring Workbook
 paperback
ISBN13:978-0-321-10929-3impressioncounter
publisher:Addison-Wesley
published:2003-09-06
by:William C. Wake
has exercises and real world examples. An emminently practical book.
UK flag abe books.co.uk abe books.ca Canadian flag
UK flag amazon.co.uk. amazon.ca. Canadian flag
German flag abe books.de chapters.indigo.ca. Canadian flag
German flag amazon.de. abe books.com American flag
French flag abe books.fr amazon.com. American flag
French flag amazon.fr. barnes and noble.com American flag
Italian flag abe books.it powells.com American flag
Spanish flag iberlibro.com sony e-books American flag
Australian flag abe books anz

CMP homejump to top You can get the freshest copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/refactoring.html J:\mindprod\jgloss\refactoring.html
CMP logofeedback Please email your feedback for publication, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.191.109]
You are visitor number 46,307.