[Top][All Lists]

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

Re: [patch] cr-handling patch for get/write phonebook, updated

From: Len Trigg
Subject: Re: [patch] cr-handling patch for get/write phonebook, updated
Date: Thu, 01 Aug 2002 14:12:03 +1200
User-agent: Wanderlust/2.8.1 (Something) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (UnebigoryĆ²mae) APEL/10.3 MULE XEmacs/21.4 (patch 6) (Common Lisp) (i386-redhat-linux)

> I'm afraid it's not a good idea to put it into the source files, as we =
> should add
> vi(m) magic line as well, and probably some other.

It's your call, but in my opinion anything as simple as one (or two if
such a line does exist for vi) lines at the top of each file, that
makes external contributors more likely to submit quality patches, is
a no-brainer decision.

> My xemacs automatically
> uses this coding style :-).

Yes, I imagine there is quite a high correlation between the coding
guidelines for a project and the editor configuration of its primary
developers ;-). Casual contributors are much more likely to have
editor configurations that differ.

> > The patch also includes unit tests for the escaping and unescaping
> > functions. To call these, compile with debugging turned on and change
> > the "if (0)" line in main to "if (1)".
> I don't think we need these tests functions. Do we?

Again, it's your call. I personally think unit tests are a truly great
thing -- it gives you a lot of confidence if you need to refactor code
or add new features that you don't break existing functionality. If,
for example, we wanted to add escaping so that ; is escaped to \;, we
can be sure that handling of \n and \\ is not broken and can add tests
for the new functionality.  It's probably not appropriate to have the
tests triggered from the main like I did -- perhaps add a
command-line-option called --runtests that only appears when compiled
with debugging turned on. You could gradually add unit tests for the
other code, and ensure they all pass before making a release.


reply via email to

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