emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] CONTRIBUTE - writing tests for understanding internals


From: Przemysław Wojnowski
Subject: Re: [PATCH] CONTRIBUTE - writing tests for understanding internals
Date: Wed, 11 Nov 2015 22:08:49 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

W dniu 11.11.2015 o 16:40, Eli Zaretskii pisze:
>> From: Przemysław Wojnowski <address@hidden>
>> Cc: address@hidden
>> Date: Wed, 11 Nov 2015 08:45:23 +0100
>>
>>> Thanks, but I don't think CONTRIBUTE is the right place for
>>> motivation-related text.  We should find some other place for that.
>>
>> This was not for motivational purposes, but to tell how to learn about
>> Emacs Internals - like the old part.
>
> The style is quite different: where CONTRIBUTE is about information
> for contributors, the suggested change, with the exception of its
> first sentence, is a motivational text that has no informational value
> for contributors.
I tend to agree that my style of writing is different than the rest of
the document and is a place to improve. That's why I've sent it here.

> More importantly, I disagree with your posit that writing tests is a
> good way of learning about Emacs internals.
Did you write this based on your experience? I did.

It *is* very good way to learn about a project and, in many companies,
is used to introduce new developers. (I do that every time and after
sometime devs tell me that it is a good introduction, because project
at the beginning were to big and overwhelming to them.)

It's very easy to verify this by writing a few tests to a project you
don't know.

> Best tests are written by looking at the spec alone,
> because looking at the implementation will bias you when
> you write the test.  That's why tests should ideally be
> written by someone who is not the implementor.
Ideally yes. And new contributors are very close to this ideal, because
they didn't implement the code and have docs as specs.

I submitted a couple of tests to Emacs packages and was writing them
based on available docs (even CLTL2, in case of cl-lib) and I've
learned a lot about those parts.

>  I'm sure you are
> familiar with the TDD methodology, whose strong point is precisely
> that you write tests before implementing anything.
"Reality check:" we already have code base. ;-)

Cheers,
Przemysław



reply via email to

[Prev in Thread] Current Thread [Next in Thread]