Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Giving a program priority briefly



On 6/11/07, Darren Cook <darren@example.com> wrote:
Changing code to make it faster (or use less of any resource), without
changing functionality, is called optimization. In contrast refactoring
is something you do for the programmer's sake, not the program's sake.

I did misunderstand because so far in this thread, we are talking
about stuffs like: gcc -O, nice -9 etc. I thought you were optimizing
your program while refactoring it .

[quote]
"The goal of refactoring is to improve the quality of the software
system, such as
its understandability, extensibility and maintainability, without affecting
its overall functionality and behavior."
[quote] [1]

Usually you expect to lose a bit of performance when refactoring, e.g.
when you add another level of redirection. I was running the benchmark
after each change because in this case losing performance would be bad
(e.g. instantly kill interest in my patches). But I wasn't optimizing.

I got it. I need a lot of resouce to do the regression test.

I think the biggest thing I got from Martin Fowler's Refactoring book
was that refactoring, adding features, and optimization should be
distinct steps (*). I tend to blur all three together if I don't think
about it.

Pls refer to the "definition" of software refactoring above. After refactoring the program, you deepen your undertanding on it. You understand the design of the program and its issues. Adding features and optimization should be done after refractoring, in that order.

[1] Refactoring Practice: How it is and How it Should be Supported â
An Eclipse Case Study, Zhenchang Xing and Eleni Stroulia Computing
Science Department University of Alberta Edmonton AB, T6G 2H1, Canada
{xing,stroulia}@example.com

--
Best Regards,
Nguyen Hung Vu
vuhung16plus{remove}@example.com
An inquisitive look at Harajuku
http://www.flickr.com/photos/vuhung/sets/72157600109218238/

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links