From: Bruno Desthuilliers on
TomF a �crit :
>
> On 2010-05-04 07:11:08 -0700, alex23 said:
(snip)
>> (I also think there's value to be gained in studying _bad_ code,
>> too...)
>
> True, although whether that's time well spent is another question.

The more bad code (mine or not) I have to maintain (or even just read
and understand), the more I pay attention to my own design and code
quality. Sometimes you only understand why something is bad, why it is
bad and how bad it is when you have to deal with it :(

From: Aahz on
In article <4be132f1$0$20639$426a74cc(a)news.free.fr>,
Bruno Desthuilliers <bruno.42.desthuilliers(a)websiteburo.invalid> wrote:
>
>The more bad code (mine or not) I have to maintain (or even just read
>and understand), the more I pay attention to my own design and code
>quality. Sometimes you only understand why something is bad, why it is
>bad and how bad it is when you have to deal with it :(

....and sometimes it takes several months of living with bad code to
really understand how to rewrite it. I'm currently rewriting a chunk of
bad code that merges three datasources. If I had done the rewriting
five months ago (when I first started feeling that I understood the
codebase well enough to do the job), I would not be doing the complete
rewrite that I'm currently doing, which would have led to suboptimal
code lasting longer.
--
Aahz (aahz(a)pythoncraft.com) <*> http://www.pythoncraft.com/

"It is easier to optimize correct code than to correct optimized code."
--Bill Harlan
From: Patrick Maupin on
On May 4, 5:34 pm, TomF <tomf.sess...(a)gmail.com> wrote:
> On 2010-05-04 07:11:08 -0700, alex23 said:
> > (I also think there's value to be gained in studying _bad_ code,
> > too...)
>
> True, although whether that's time well spent is another question.

I don't know how this applies to reading other peoples' code, but
recent research shows we learn more from success than failure:

http://web.mit.edu/newsoffice/2009/successes-0729.html

Regards,
Pat
From: Albert Hopkins on
On Thu, 2010-05-06 at 16:38 -0700, Patrick Maupin wrote:
> I don't know how this applies to reading other peoples' code, but
> recent research shows we learn more from success than failure

That's good to learn, because for years I have been intentionally
failing in order to learn from it and become successful, and it hasn't
really worked out for me :|

-a


From: MRAB on
Albert Hopkins wrote:
> On Thu, 2010-05-06 at 16:38 -0700, Patrick Maupin wrote:
>> I don't know how this applies to reading other peoples' code, but
>> recent research shows we learn more from success than failure
>
> That's good to learn, because for years I have been intentionally
> failing in order to learn from it and become successful, and it hasn't
> really worked out for me :|
>
Failure just teaches you what you shouldn't do, not what you should...
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4
Prev: long int computations
Next: duplicate temporary file?