<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 28, 2011, at 5:47 PM, Kevin Horn wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">On Fri, Jan 28, 2011 at 1:33 PM, Glyph Lefkowitz <span dir="ltr">&lt;<a href="mailto:glyph@twistedmatrix.com">glyph@twistedmatrix.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div style="word-wrap: break-word;"><div><div></div><div class="h5"><br><div><div>On Jan 28, 2011, at 10:38 AM, Kevin Horn wrote:</div><br><blockquote type="cite"><br><br><div class="gmail_quote">On Fri, Jan 28, 2011 at 7:25 AM, Itamar Turner-Trauring <span dir="ltr">&lt;<a href="mailto:itamar@itamarst.org" target="_blank">itamar@itamarst.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br><div>
A service is supposed<br>
to be something you can start and stop, and encapsulates a<br>
self-contained piece of business logic.
</div><font color="#888888"><br>
-Itamar<br>
</font><div><div></div><div><br>
<br></div></div></blockquote><div><br>This or something very much like it should be in the Twisted Glossary.<br><br>Kevin Horn <br></div></div></blockquote></div><br></div></div><div>The whole idea of a glossary concerns me a little bit. &nbsp;</div>
</div></blockquote><div><br>You're just saying that because you don't want anyone else to understand what you're saying ;)<br></div></div></blockquote><div><br></div><div>I am aggrieved that you would insinuate any premeditated obfuscatory animus appertaining to my person or those of my associates. &nbsp;I maintain an amaranthine focus on limpid exposition and&nbsp;efficacious intercommunication.</div><div><br></div><blockquote type="cite"><div class="gmail_quote"><div>Seriously though.&nbsp; When I first started thinking about ways to improve the documentation.&nbsp; The _first_ thing I thought was missing was decent explanations of some of these things.&nbsp; Whether it's in a glossary or someplace else, clear definitions need to exist for all the major Twisted concepts (people may disagree on what is or is not major, and that's fine).&nbsp; Putting these definitions (or links to them) in a glossary keeps them all together and easy to find and refer to.&nbsp; One of the first thing I look for in any software documentation is a glossary or some set of definitions that I can refer to while I'm _reading_ the API docs or whatever.</div></div></blockquote><div><br></div><div>If you need a glossary open while you're reading the API docs, that means that the docs you're reading are insufficiently marked up. &nbsp;The word 'service' (in this context) should _always_ itself be a hyperlink to the IService interface. &nbsp;We do this pretty consistently in all new documentation. &nbsp;Similarly 'deferred' should always be a link to twisted.internet.defer.Deferred. &nbsp;&lt;<a href="http://epydoc.sourceforge.net/epytext.html">http://epydoc.sourceforge.net/epytext.html</a>&gt; has more detail on how to format these if you want to do clever stuff like have a lower-case word like 'service' link to the IService docs.</div><div><br></div><div>I'm totally on board with making a&nbsp;<i>list</i>&nbsp;of these common abstractions outside the API docs, but 99% of what that list should do is provide a definitive index of links into the API docs to call out the top important interfaces you need to read about.</div><div><br></div><div>Also, the existing API docs for many of the core concepts are terrible, or even (cringe) non-existent in places, so they could certainly stand to be improved. &nbsp;I'm not saying our existing docs are great, just that we should have one great index of terms and not five mediocre ones.</div><div><br></div><blockquote type="cite"><div class="gmail_quote"><div>Solving problems through software requires finding the right abstractions, which IMO depends a great deal on finding the right vocabulary for those abstractions.&nbsp; I know the Twisted devs spend a lot of time and energy trying to find exactly the right word for a class, or a method, or whatever.&nbsp; Let's communicate that to new people!&nbsp; If you don't want a "glossary", then we'll do something else, but I think it's important to have all of the really critical concepts described in one place somewhere.<br></div></div></blockquote><div><br></div><div>I should have qualified my discomfort with the term 'glossary' a bit more. &nbsp;We do need the thing you're talking about. &nbsp;My only concern is redundancy. &nbsp;Even if we had awesome API documentation for all of these things, there's still a bootstrapping phase where people are not sure which classes are one-off utilities and which things are core abstractions they'll be using every day.</div><br><blockquote type="cite"><div class="gmail_quote"><div>Also consider the problem of reverse human lookup:&nbsp; "Oh man, what was that thing called that stops and starts Twisted code at the appropriate times?"<br><br>If you stick that into a search engine, you probably won't find it for a loooong time.&nbsp; But if there's a glossary, you just look there, and you find it pretty easily.<br></div></div></blockquote><div><br></div><div>Well, that exact phrase, no; but "start and stop twisted application", and "start and stop twisted service" both point at the right API doc. &nbsp;We should probably work a bit harder to make 'start stop twisted' find that page first :).</div><br><blockquote type="cite"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex; position: static; z-index: auto; "><div style="word-wrap: break-word;"><div>One way I frequently see it done is vague little snippets of text like this, and I don't like that. &nbsp;</div>
</div></blockquote><div><br>Well, I consider it much more meaningful than what is currently there.&nbsp; Not saying it's really sufficient, but it is succinct.&nbsp; I think what I'd like to see is a "glossary" entry with:<br>
<br>- an API link (e.g. "An object which implements the IService Interface" -- and yes, it should be a proper English sentence.)<br></div></div></blockquote><div><br></div><div>This I certainly agree with.</div><br><blockquote type="cite"><div class="gmail_quote"><div>- A succinct definition (like Itamar's quip above)<br>- a paragraph or two of discussion (not too long though!)<br></div></div></blockquote><div><br></div><div>Why can't this just be in the API doc?</div><br><blockquote type="cite"><div class="gmail_quote"><div>
- "see also" links to HOWTO's etc.<br></div></div></blockquote><div><br></div><div>Again - why not in the API doc? &nbsp;If someone were to find the concept via some other documentation that described the term in question as a return type or argument rather than a generic word, presumably that person might also want to read the narrative documentation.</div><div><br></div><blockquote type="cite"><div class="gmail_quote"><div>I'm not sure how much of a problem maintaining it would be, especially as I agree that linking to the API docs is probably a good idea (though I think a lot of the docstrings in there could be greatly improved).&nbsp; For one thing, how often has the _intent_ of the IProtocol interface(which has no docstring, btw) changed?</div></div></blockquote><div><br></div><div>So, first: aaaaaauuugh. &nbsp;Is there a doc bug for that? &nbsp;That is an interface which really, really needs a docstring. &nbsp;Can you submit a patch, like, right now? :)</div><div><br></div><div>Second: the intent hasn't changed often. &nbsp;But clearly we need to update the documentation to document that intent better, and I hope that happens more often than it does. &nbsp;Narrative vs. reference documentation is already a split, albeit a necessary one in my opinion. &nbsp;Narrative vs. code-reference vs. language-reference seems like we're just splitting hairs.</div><br><blockquote type="cite"><div class="gmail_quote"><div>And how often does someone show up on IRC who doesn't understand what a Protocol object is show up?<br></div></div></blockquote><div><br></div><div>Actually... I don't remember IProtocol being a big problem. &nbsp;Which is slightly surprising, given that it has no docstring. &nbsp;Maybe everyone who has run into a confusion at this basic stage has just given up, or maybe the method docstrings are good enough, or maybe the learn about it from a tutorial.</div><br><blockquote type="cite"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex; position: static; z-index: auto; "><div style="word-wrap: break-word;"><div></div><div>Thoughts?</div><div><br></div></div>
</blockquote></div><br>I think we've totally hijacked this thread :)<br></blockquote></div><br><div>Yes, retitled appropriately.</div><div><br></div></body></html>