Francis Siu
SCJP, MCDBA
Originally posted by siu chung man:
In many threads this week there have been given many different definitions.
Improving the Design of Existing Code?
But do we design the structure first and then implement the coding?
and I think about that refactor a system over an extended period of time, small program is possible but for large program, it may not be suitable in business situation. So why do you need refactoring? For interest or something else?
Refactoring is the act of recognizing that the current design has a smell you'd like to get rid of and actually getting rid of it by changing the design in a way that improves it without changing/adding/removing any functionality.Originally posted by siu chung man:
Improving the Design of Existing Code?
But do we design the structure first and then implement the coding?
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Originally posted by siu chung man:
hi ranchers,
I know what is OO, pattern and UML but..............
What is refactoring?
Is it a kind of software engineering process to refine program?
thanks for your time to answer
Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Cheers, Sathya Srinivasan - SCJP 1.2, SCWCD 1.2, SCMAD 1.0
Co-Author of Whizlabs SCMAD Certification Exam Simulator and SCMAD Exam Guide Book
Originally posted by siu chung man:
Improving the Design of Existing Code?
But do we design the structure first and then implement the coding?
and I think about that refactor a system over an extended period of time, small program is possible but for large program, it may not be suitable in business situation.
Francis Siu
SCJP, MCDBA
Originally posted by siu chung man:
I consider that the program contains some drawback as it will run a little bit slower than the first one. (may be) :roll:
Francis Siu
SCJP, MCDBA
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Francis Siu
SCJP, MCDBA
Originally posted by Warren Dew:
I would think a good compiler ought to be able to inline the function call, so that the resultant byte code would be the same as that for accessing a public data member (basically a fetch from memory). I'm not that familiar with Java compilers, but that's how it works in other languages.
Originally posted by Daniel Mayer:
In Java, this optimization is not done while compiling the source to byte code, but while compiling the byte code to machine code at runtime: http://java.sun.com/developer/technicalArticles/Networking/HotSpot/inlining.html
Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |