Re: Bicycle Repair Man usability
- From: "Kay Schluehr" <kay.schluehr@xxxxxxx>
- Date: 31 Aug 2005 05:52:40 -0700
Sybren Stuvel wrote:
> > -Get rid of extra variables by shifting them inline (e.g.:
> > a=1;b=2;c=a+b --> c=1+2)
>
> This is already excess functionality IMO.
I don't think that Rex talked about his programming style but about
three and only three refactoring methods survived in BRM from ~30
Fowler described in his book. By the way I can't remember the one you
picked up but I remember the reverse i.e. introducing intermediate
variable names for readability and debugging purposes.
Instead of writing f(g(h(...))) it is sometimes adaequate to write
x = h(...)
f(g(x))
I use this a lot in particular in C++. Optimzing compilers eliminate
runtime penalties. This is of course different in CPython.
In case of BRM I'm not sure why it is particular hard to implement
"Move Method" for instance? BRM is shipped with a lot of testcases
which is good but neither defines requirements nor leads a discussion
about refactoring methods in Python. Needless to say that the code is
not well documented.
Kay
.
- Follow-Ups:
- Re: Bicycle Repair Man usability
- From: Fredrik Lundh
- Re: Bicycle Repair Man usability
- References:
- Bicycle Repair Man usability
- From: Rex Eastbourne
- Re: Bicycle Repair Man usability
- From: Sybren Stuvel
- Bicycle Repair Man usability
- Prev by Date: Re: Code run from IDLE but not via double-clicking on its *.py
- Next by Date: Re: Code run from IDLE but not via double-clicking on its *.py
- Previous by thread: Re: Bicycle Repair Man usability
- Next by thread: Re: Bicycle Repair Man usability
- Index(es):