473,394 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

refactoring, unit testing, ant, etc.

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 current-day practices. I've
been pythoning along, but I hear about things I don't know about (re-factoring,
unit-testing, debugging, ant build tools) and I don't know how they're
applicable to make my life easier. Tutorials didn't shed too much light --
they make it seem to be more work than I need now.

To be clear, I've used debuggers in the past, but it seems when I set break-
points, the Eclipse just skips merrily past them, or steps at every line, and
for wxPython, that's annoying given all the support libraries. I also use
wxPython and wxGlade, so those seem to ignore debug mode completely for some
reason.

Can someone please shed some light onto how I should really use my IDE to
make my life more enjoyable? I feel I just don't know how to use the tools
that are available, and that's frustrating.

Thanks so much!
Dave

Jul 19 '05 #1
1 1391
"Dave Rose" <s_**********@hotmail.com> wrote in message
news:ma**************************************@pyth on.org...
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 current-day practices.
I've
been pythoning along, but I hear about things I don't know about
(re-factoring,
unit-testing, debugging, ant build tools) and I don't know how they're
applicable to make my life easier. Tutorials didn't shed too much
light --
they make it seem to be more work than I need now.

To be clear, I've used debuggers in the past, but it seems when I set
break-
points, the Eclipse just skips merrily past them, or steps at every line,
and
for wxPython, that's annoying given all the support libraries. I also use
wxPython and wxGlade, so those seem to ignore debug mode completely for
some
reason.

Can someone please shed some light onto how I should really use my IDE to
make my life more enjoyable? I feel I just don't know how to use the
tools
that are available, and that's frustrating.
It's actually not an IDE issue (well, not much of one). I never use
the debugger. The next thing to learn is probably Test Driven Development.
Kent Beck's book (Test Driven Development by Example) has an extended
example in Python as the second section.

TDD is simply the practice of writing a test, then writing the code to make
it pass, then writing another test and so forth. As long as you make sure
all the tests keep passing, whenever one of them breaks it's probably the
last edit you made, which makes it real easy to figure out what the problem
is and fix it.

The easiest way to ease into refactoring is to ruthlessly eliminate
duplication
in your programs. One of the really interesting things about this is that
you
can frequently see the right abstractions and design patterns just emerge
without having to design them up front. Doesn't always happen, but it does
often enough to be really gratifying.

The Python library contains a module named unittest which is the Python
equivalent of JUnit etc. I normally run my test suite out of a command line
that I keep open while I'm working. I think PyDev in Eclipse has support
for it, but since I don't use that I'm not at all sure.

John Roth

Thanks so much!
Dave


Jul 19 '05 #2

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

Similar topics

14
by: | last post by:
Hi! I'm looking for unit-testing tools for .NET. Somthing like Java has --> http://www.junit.org regards, gicio
72
by: Jacob | last post by:
I have compiled a set og unit testing recommendations based on my own experience on the concept. Feedback and suggestions for improvements are appreciated: ...
15
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...
0
by: Virgil Dupras | last post by:
This is not strictly python related, but it's not strictly TDD related either. Anyway, here it goes. There's something that I was never quite sure how to handle with test units: How to handle...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.