[wp-hackers] Re: 1.5.2 or on to 1.6?

Martin Geisler mgeisler at mgeisler.net
Mon May 23 12:14:46 GMT 2005

Matthew Mullenweg <m at mullenweg.com> writes:

Hi Matt,

Thanks for your reply --- I hope you don't take it too personally that
I want to move your "furniture" and "books" around :-)

> I'm as aware as inconsistencies as anyone, like post.php not using
> the wp_insert_post function, but the highest priorities in
> development are focused at our two primary audiences, end-users (who
> never look at core code) and plugin authors (who use the documented
> APIs).

Okay, I can understand that.

> Commenting is tricky. Some "well-commented" code I've seen had a
> bunch of lines of repetitive filler that "documented" what you could
> easily see by just looking at the code itself and doubled the size
> of the program.

Yes, I've seen that kind of code too and that's just stupid.

> I also believe that well-written code usually doesn't need comments
> unless it's doing some sort of voodoo or workaround. (See
> gettext.php.)

Is this not a rather bad example?  I mean, that file comes from an
external project, who obviously know how to write proper doccomments.

And the idea that there can be such a thing as well-written code
containing no comments is bogus: it is only in small toy examples that
the function and argument names are enough to determine what a
function does.

Comments are *very* important in a weakly-typed language like PHP
where you cannot tell anything at all from looking at the function.

> I think if we surveyed our users, very few (if any) would bring up
> the "coding standard" as an issue they care about. We need to focus
> more on things like the excellent issues Mark J. raised in his
> response.

Sure, that's classical features --- but having a well-commented code
is also a feature, and for attracting developers and plugin authors I
believe that clean code is a very attractive feature.

Martin Geisler                                     GnuPG Key: 0x7E45DD38

PHP EXIF Library      |  PHP Weather             |  PHP Shell
http://pel.sf.net/    |  http://phpweather.net/  |  http://mgeisler.net/
Read/write EXIF data  |  Show current weather    |  A shell in a browser
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://comox.textdrive.com/pipermail/wp-hackers/attachments/20050523/50c7e5df/attachment.bin

More information about the wp-hackers mailing list