[BangPypers] refactoring

Dhananjay Nene dhananjay.nene at gmail.com
Mon Dec 6 14:43:03 CET 2010


On Wed, Dec 1, 2010 at 4:33 PM, Kenneth Gonsalves <lawgon at au-kbc.org> wrote:

> hi,
>
> I know that this has cropped up in a parallel thread, but anyway I would
> like a new thread on this. In a LUG list a ruby guy made a statement
> that 'No self respecting developer could function without having read
> the refactoring book'. How relevant is this to python? I do not see much
> except years ago something called bicycle repair man - is that still
> used? or is this whole thing buzz?
>

This thread seems to have gone all over the place. So I would add my
thoughts on the original question and slink away.

Refactoring is often performed by most developers independently of whether
or not they have read the book.
Yes a self respecting developer can function without reading the refactoring
book.
Yes the self respecting developer just might develop a little bit more of
self respect if he read the refactoring book.

Restricting to my own experience in java and python

a. I used to refactor like crazy in java. I tend to do it less often in
python.
b. The likely reason is that I find eclipse refactoring capabilities in java
very very strong. OTOH, with python automated refactoring, one can never be
too sure.
c. Generally speaking in java, I've found myself refactoring - in python
I've found myself rewriting. Should I need to refactor, I usually rearrange
the code to decompose it better at a higher level, and then rewrite the
lower level functions entirely. Part of the reason why I find myself doing
that would be that in most cases my python functions are quite small - so
rewriting them is often no big deal.
d. Refactoring without having test cases is a strong test for bravery.
Usually I classify myself as timid in such situations and either write some
tests or back off.

Dhananjay

--
> regards
> Kenneth Gonsalves
>
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
--------------------------------------------------------
blog: http://blog.dhananjaynene.com
twitter: http://twitter.com/dnene


More information about the BangPypers mailing list