On Dec 4, 11:52 am, Jonathan Lundell <jlund...@pobox.com> wrote: > On Dec 4, 2009, at 9:45 AM, Thadeus Burgess wrote: > > > There are many parts of gluon that I look at and go... wtf. > > > And read it again, and go... wtf. > > > Only to find out the wtf comes from another module that has another > > wtf in it that comes from another module.. > > > If the chain of cohesion was commented, gluon would be much much > > easier to learn. > > Amen, Brother Thadeus. > > Sometimes a live debug session helps, but that's generally overkill, and not > always possible. Readable code, especially with comments as to *intent*, is > hard to beat. > >
Good comments are golden, and provide a level of abstraction higher than the code - that is, they provide a more compact representation of what's intended, and thus is easier to digest and see (even for the original author) comments like: # save the total: total = my.getsometotal() are totally useless noise - the goal is to write comments / outline FIRST, then fill them in with details, e.g. code. In some ways, writing good comments is harder than writing good code. And the point is, if you can't put the comments together, then a HIGHER abstraction is needed, e.g. some model of what you are trying to do at a higher level... And that, my friends, is what software engineering is: up and down that abstraction ladder, keeping it coherent. No comments, lots, lots of fixes, often is .... not a good sign. There is only so much complexity we can "hold in our head" before we need some more compact representation in order to correctly "keep it together". *sigh* - I am more than a little amazed (and quite frustrated) that this seems to have such resistance... - Yarko > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.