Changes between Version 2 and Version 3 of DocumentationAnalysis/Testing/JonathanLange
- Timestamp:
- 03/15/2006 01:44:29 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DocumentationAnalysis/Testing/JonathanLange
v2 v3 1 2 1 = Review details = 3 2 … … 27 26 = Document review = 28 27 29 ''Have a look at wiki:DocumentationAnalysis/UserReviewTemplate for an alternative review style you might prefer.''30 31 28 == Coverage of subject matter == 32 29 33 ''Documents should demonstrate and recommend only '''best practice''', except in clearly marked examples of bad code which leads to a justification of best practice. Any out-of-date or questionably intelligent ways of doing things shown in our documentation are problems. Best practice should be exhibited even when it makes examples longer.''34 35 '''''Best practice''' includes: code doing what it puports to do; following Twisted coding style; using accepted idioms; and unless the documentation is to demonstrating a lower level feature by reimplementing a higher level one it should use appropriate library functions (eg LineReceiver) instead of doing a half-baked reimplementation. Further, code should be '''easily readable''' at the expense of lines of code -- code is more readable when the number of things it does per line is limited.''36 37 30 This document seems to cover the following subject matter at least acceptably well: 38 ''list here'' 31 * Don't use reactor.start, reactor.stop, reactor.iterate 39 32 40 33 This document seems to be attempting to cover the following subject matter, but its coverage is flawed: 41 * ''example 3 puports to demonstrate a webserver, but does not in fact run'' 42 * ''section 2 says that the design of X solves Y problem when it actually doesn't'' 43 * ''example 7 is using a sequence of functions to get Y result when we actually provide a convienience function Z'' 34 * The timeout description doesn't describe what a timeout does to the test results 35 * The heading "Twisted-specific quirks: ..." shouldn't enumerate the quirks, and probably shouldn't call them quirks 36 * Discusses how to clean up the reactor but doesn't mention that leaving the reactor unclean will fail the test 37 * Should provide examples of how to clean up the reactor 38 * Explains that Trial extends unittest, but doesn't tease out what that means for writing tests 44 39 45 40 This document ought to be covering the following subject matter but is not: 46 * ''the reason why Y is a better design than Z in this case'' 47 * ''Foo useful library function'' 48 * ''the X class of problems for which this approach needs to be modified'' 41 * the todo attribute 42 * its existence 43 * appropriate values to set it to 44 * why one might want to use it 45 * skipping tests 46 * that it is possible 47 * how to do it with the skip attribute 48 * how to do it by raising SkipTest 49 * That calling log.err will fail a test 50 * [although the api surrounding this is still under discussion!] 49 51 50 This document is recommending the following things that it shouldn't be recommending: ''[recall that merely mentioning something in a document often counts as a recommendation, and mentioning something only to denounce it is confusing and should be limited]'': 51 * ''X out-of-date library function'' 52 * ''Y sequence of calls which have been superceded by Z library''52 53 This document is recommending the following things that it shouldn't be recommending: 54 * Maybe mentioning reactor.iterate et al is a bad idea 53 55 54 56 This document could be supplemented by links to these existing pre-requisitie ("you should read this first") documents: 55 ''list here'' 57 * some sort of document on how to write unit tests 58 * Python's unittest documentation? 59 * diveintopython.org has an excellent chapter on test-driven development 60 * The Trial manpage 56 61 57 This document could be supplemented by links to these existing follow-up ("now that you know X you can try Y") documents: 58 ''list here'' 62 This document could be supplemented by links to these existing follow-up ("now that you know X you can try Y") documents: 59 63 60 64 This document could be supplemented by as-yet non-existant pre-requisite ("you should read this first") documents on: 61 ''list here''62 65 63 66 This document could be supplemented by links to these as-yet non-existant follow-up ("now that you know X you can try Y") documents: 64 ''list here'' 67 * How to extend Trial 68 65 69 66 70 == Style == 67 71 The following changes to the style of the document would make it easier to read: 68 72 69 * ''shorter paragraphs in section 4'' 70 * ''less hyperbole about the Twisted Way in the introduction'' 73 * Way more examples 74 * Structure the entire document around how to test code, rather than documenting quirks 75 * Create headings within "Leave the Reactor as you found it" section 76 71 77 72 78 == Overall summary == 73 79 74 This document is: ''excellent / good, with some minor improvements to recommend / reasonable, with some pretty obvious improvements to make / better than having no documentation, but with some glaringly obvious improvements to make / so bad that it would be better to have no documentation on this'' 80 The document seems particularly slanted toward writing tests to be ''contributed'' to Twisted, rather than writing tests for code that ''uses'' Twisted. I recommend that the idiosyncracies of code destined for the Twisted repository be documented in the coding standards. 81 82 This document is: better than having no documentation, but with some glaringly obvious improvements to make
