[jdev] Re: Re: The State of Our Code-bases

Lucas Nussbaum lucas at lucas-nussbaum.net
Thu Sep 2 05:41:07 CDT 2004


On Thu, Sep 02, 2004 at 07:51:48PM +1000, Trejkaz Xaoza <trejkaz at xaoza.net> wrote:
> On Thu, 2 Sep 2004 17:03, Lucas Nussbaum wrote:
> > For a 10 lines advanced "hello world", maybe. For a 50000 lines project,
> > good code is often more difficult to understand than bad code, because
> > it is much more structured.
> 
> But wait.  What if you were the sort of person who wrote good, structured 
> code?  Wouldn't that make the structured code easier to understand than the 
> equivalent spaghetti?  Or are we assuming that the reader here is a spaghetti 
> coder?

Understanding a specific function is usually easier when it is written
using spaghetti code : there's no function calls so you don't have to
look up the function and understand what it does, etc. For structured
code, you have to understand much more logic.

What clearly lacks in the jabberd2 code is not inline comments : it is
well written code, so you don't spend ages understanding the details.
The problem is the global picture. Try to understand the structure, from
a coding point of view, of the session manager (what's necessary for
adding a module). You'll see it's quite difficult.
-- 
| Lucas Nussbaum
| lucas at lucas-nussbaum.net    lnu at gnu.org    GPG: 1024D/023B3F4F |
| jabber: lucas at linux.ensimag.fr   http://www.lucas-nussbaum.net |
| fingerprint: 075D 010B 80C3 AC68 BD4F B328 DA19 6237 023B 3F4F |



More information about the JDev mailing list