Extending classes __init__behavior for newbies
rantingrick at gmail.com
Tue Feb 15 23:16:26 CET 2011
On Feb 14, 9:44 pm, Steven D'Aprano <steve
+comp.lang.pyt... at pearwood.info> wrote:
> On Tue, 15 Feb 2011 09:47:54 +1000, James Mills wrote:
> > On Tue, Feb 15, 2011 at 9:32 AM, rantingrick <rantingr... at gmail.com>
> > wrote:
> >> Those who write code bases should "design-in" practicality, re-
> >> usability, and extendability as a forethought and NOT an afterthought.
> >> Of course i am not suggesting that everyone must be clairvoyant.
> >> However the vast amount of time involved in a coding project should be
> >> spent in the design and testing phases and NOT actually writing code.
> >> If you spend more time writing code you are not being professional, you
> >> are being sloppy -- and it WILL catch up to you.
> > I actually agree with this. :)
> I don't. If you (generic you) have separate "write the code" and "test
> the code" phases, your project is in trouble. You can probably get away
> with it if it's a tiny throw-away script, but for anything more
> substantial, you should be testing *as you are writing*. The two need to
> go in parallel.
My statement made no such mention of "separate phases" or how each
phase should be ordered. Here, l'll paraphrase for the folks who's
attention span cannot last for a full paragraph. *ahem*... "You should
spend more time designing and testing code than writing it"... I hope
that was clear enough for you.
# In Code form.
if (dev.design_time + dev.test_time) < dev.write_time:
print('Good Job Skippy!')
More information about the Python-list