473,772 Members | 3,712 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Refactoring in Python.


I am trying to write Master Thesis on refactoring Python code.

Where should I look for information?

--
http://www.dembiński.prv.pl
Jul 19 '05 #1
9 2030

Peter> I am trying to write Master Thesis on refactoring Python code.

Peter> Where should I look for information?

I'm not sure, but one piece of code to check out would probably be Bicycle
Repair Man, a early-stage prototype refactoring tool for Python. I don't
recall where it's hosted. Google will know.

Skip

Jul 19 '05 #2
djw
Skip Montanaro wrote:
Peter> I am trying to write Master Thesis on refactoring Python code.

Peter> Where should I look for information?

I'm not sure, but one piece of code to check out would probably be Bicycle
Repair Man, a early-stage prototype refactoring tool for Python. I don't
recall where it's hosted. Google will know.

Skip

If you install Eric3, its included.

-Don
Jul 19 '05 #3
Skip Montanaro <sk**@pobox.com > writes:
Peter> I am trying to write Master Thesis on refactoring Python
Peter> code. Where should I look for information?

I'm not sure, but one piece of code to check out would probably
be Bicycle Repair Man, a early-stage prototype refactoring tool
for Python. I don't recall where it's hosted. Google will know.


Well, I can't simply describe Bicycle Repairing Man in my thesis :)

The idea is to define some 'mechanics' for refactoring Python code
without specialized refactoring browser. In other words, I want
to convert Fowler's refactorization s to Python.

Similar work (or its seeds) is here:
http://hiper.com.br/python/refactor/index.html

--
http://www.dembiński.prv.pl
Jul 19 '05 #4

"Peter Dembinski" <pd***@gazeta.p l> wrote in message
news:87******** ****@hector.dom ek...
Peter> I am trying to write Master Thesis on refactoring Python
Peter> code. Where should I look for information?
As best I remember, there has been little posted here over several years
other than general comments like 'Python makes it easier to refactor'. So
there is room for you to do something new ;-).

Where to look: if you have not already, read the tutorial, at least chap 2
of the Library Ref, and at least skim the FAQ. Use Google or whatever for
web searches. Specifically use Google for searching its archives of
comp.lang.pytho n. Then ask specific questions here.
The idea is to define some 'mechanics' for refactoring Python code
without specialized refactoring browser. In other words, I want
to convert Fowler's refactorization s to Python. Similar work (or its seeds) is here:
http://hiper.com.br/python/refactor/index.html


I have not seen this before. Since he only did chapter 1, I think 'seed'
is the word.

Another specifically helpful reference might be Beck's (author?) book on
Test-Driven Development. Part 1 uses an example in Java, I believe. Part
2, I know, uses an example in Python. There at least used to be a copy
online.

Wishing you an 'A' and hoping to see the result online...
Terry J. Reedy


Jul 19 '05 #5
Terry Reedy wrote:
Another specifically helpful reference might be Beck's (author?) book on
Test-Driven Development. Part 1 uses an example in Java, I believe. Part
2, I know, uses an example in Python. There at least used to be a copy
online.


The online copy was merely a draft, never brought up
to the final state of the paper version and, if I
recall correctly, entirely missing the Python sections.

For anyone interested in checking this out further:
it was in the "Files" section of the Yahoo Groups
group called "testdrivendeve lopment", along with
several earlier versions. (The book was developed
in a pseudo-test-driven-development fashion, with
drafts published for feedback from the group readers.)

-Peter
Jul 19 '05 #6
Investigate the CVS histories of the few 1000s python projects
available at www.sourceforge.net

enjoy

Jul 19 '05 #7

"Peter Hansen" <pe***@engcorp. com> wrote in message
news:0O******** ************@po wergate.ca...
Terry Reedy wrote:
Another specifically helpful reference might be Beck's (author?) book on
Test-Driven Development. Part 1 uses an example in Java, I believe.
Part 2, I know, uses an example in Python. There at least used to be a
copy online.


The online copy was merely a draft, never brought up
to the final state of the paper version and, if I
recall correctly, entirely missing the Python sections.


It was the online copy that I read *with* a Python section. Have no idea
if there was more in the book.

tjr

Jul 19 '05 #8
Hello

Jul 19 '05 #9
Qu**********@gm ail.com writes:
Investigate the CVS histories of the few 1000s python projects
available at www.sourceforge.net


I don't work with these guys :>

--
http://www.pdemb.prv.pl
Jul 19 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1253
by: kent sin | last post by:
Please help: I was really blocked here. without goto I really do not known how to do it. The problem is to use PyZ3950 to consult a lists of hosts and for each of them to search for a list of targets. Since the network is undetermined, there were always some exceptions: I would like to allow it to retry for 3 times. Moreover, during the query process,
15
1605
by: Frans Englich | last post by:
As continuation to a previous thread, "PyChecker messages", I have a question regarding code refactoring which the following snippet leads to: > > runner.py:200: Function (detectMimeType) has too many returns (11) > > > > The function is simply a long "else-if" clause, branching out to > > different return statements. What's wrong? It's simply a "probably ugly > > code" advice? > > That is also advice. Generally you use a dict of...
1
1406
by: Dave Rose | last post by:
Hello all I've been learning Python for the past few months, reading tutorials and postings here. I've bought the personal Komodo then downloaded Eclipse with Pydev. IDLE also is a staple of everyday use. ~10 years ago, I had CS as a minor in college. I learned some C and modula-2 to name the relevent languages. Back then I was compiling on a VAX. Much different than today. I was hoping someone could guide me a bit with...
10
1516
by: Chinook | last post by:
OO refactoring trial ==================== Following is a simple trial structure of a refactoring (top-down to OO) learning exercise I'm doing. Whether you call it a Factory pattern, COR pattern, or some hinze 57, I don't know what class to use till run time and I'm trying to avoid a lengthy "if" sequence, the test sequence is important, and to avoid code duplication I'll be using code objects in the "doit" methods. You've already...
8
2016
by: Frank Rizzo | last post by:
I keep hearing this term thrown around. What does it mean in the context of code? Can someone provide a definition and example using concrete code? Thanks.
15
4413
by: Simon Cooke | last post by:
Does anyone know of any tools for refactoring header files? We're using a third party codebase at work, and pretty much every file includes a 50Mb precompiled header file. I'm looking for a tool that will let us figure out which header files are actually needed by each .cpp, and allow us to break this up so that we're not including the world in each one. Ideally, the same tool would also recognize where #includes can be replaced with...
0
977
by: bryan rasmussen | last post by:
Hi, I'm doing a sort of symbolic linking app in Windows for my own enjoyment, and figured I would do it in python for the same reason + learning the language. The following functions could obviously do with some refactoring. One obvious thing would be to make wordsetter and wordsforfolder more generic, and just pass a few extra parameters. But that seems sort of stupid. Any suggestions on refactoring here? other improvements?
21
7268
by: Martin Geisler | last post by:
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkjlQNwACgkQ6nfwy35F3Tj8ywCgox+XdmeDTAKdN9Q8KZAvfNe4 0/4AmwZGClr8zmonPAFnFsAOtHn4JhfY =hTwE -----END PGP SIGNATURE-----
3
1992
by: r0g | last post by:
Hi There, I'm refactoring some old code that uses global variables and was originally written in one big flat file with a view to nicening it up and then extending it. The problem I have though is when I move the various classes out to their own separate files and reimport them back in they can't see the globals in the main program. Most of the globals were just constants and so I have been able to factor them out but there's one that's...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10104
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9912
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8934
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6715
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.