RSS/Atom feed Twitter
Site is read-only, email is disabled

Code Comments

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

Code Comments Christopher Howard 17 Aug 21:41
  Code Comments Sven Neumann 17 Aug 21:56
Christopher Howard
2009-08-17 21:41:24 UTC (over 15 years ago)

Code Comments

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

I know I'm new around here, so I'd ask that you be patient with me. Of the two dozen or so source code files I've looked through so far in trying to learn how the GIMP code works, it seems like most of the app code is not even moderately commented. There is the rare snippet here and there explaining a block or a variable, but little that really narrates the code. (From what I've seen, the plug-in code is generally better commented than the app code.)

So, two main questions here: first, what is the working philosophy around here about code comments? Are we preferring more of a "well written code should explain itself" approach? Are we inclined to accept patch submissions that simply add comments to code? Are there guidelines for what code comments should be like?

Second, if new developers can't figure out what a piece of code does, or where some functionality is, should we ask on this list? (That's actually not a hypothetical question in my case...)

- -- Christopher Howard
http://indicium.us
http://theologia.indicium.us
I digitally sign /all/ my e-mails via PGP. If you receive any e-mail supposedly from me without my valid PGP digital signature, please take additional steps to verify the authenticity of the message. -----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqJsmQACgkQQ5FLNdi0BcU2jACfUXymdVs7HEVq9I7j1V6EUu74 1XwAoIVDqfIZIjft27Ws/lmHmkLn6dci
=pl84
-----END PGP SIGNATURE-----

Sven Neumann
2009-08-17 21:56:21 UTC (over 15 years ago)

Code Comments

Hi,

On Mon, 2009-08-17 at 11:41 -0800, Christopher Howard wrote:

So, two main questions here: first, what is the working philosophy around here about code comments? Are we preferring more of a "well written code should explain itself" approach?

Exactly. But comments are of course welcome.

Are we inclined to accept
patch submissions that simply add comments to code? Are there guidelines for what code comments should be like?

Of course patches that add comments are appreciated and we have accepted such patches in the past. Comments should be in gtk-doc syntax, so that they end up in the API reference manual.

Second, if new developers can't figure out what a piece of code does, or where some functionality is, should we ask on this list? (That's actually not a hypothetical question in my case...)

Sure. This is the right place to ask.

Sven