1 //: The goal of layers is to make programs more easy to understand and more 2 //: malleable, easy to rewrite in radical ways without accidentally breaking 3 //: some corner case. Tests further both goals. They help understandability by 4 //: letting one make small changes and get feedback. What if I wrote this line 5 //: like so? What if I removed this function call, is it really necessary? 6 //: Just try it, see if the tests pass. Want to explore rewriting this bit in 7 //: this way? Tests put many refactorings on a firmer footing. 8 //: 9 //: But the usual way we write tests seems incomplete. Refactorings tend to 10 //: work in the small, but don't help with changes to function boundaries. If 11 //: you want to extract a new function you have to manually test-drive it to 12 //: create tests for it. If you want to inline a function its tests are no 13 //: longer valid. In both cases you end up having to reorganize code as well as 14 //: tests, an error-prone activity. 15 //: 16 //: In response, this layer introduces the notion of domain-driven *white-box* 17<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><title>Python: module make_doc</title> </head><body bgcolor="#f0f0f8"> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>make_doc</strong></big></big></font></td ><td align=right valign=bottom ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/hut/ranger/make_doc.py">/home/hut/ranger/make_doc.py</a></font></td></tr></table> <p><tt>Generate pydoc documentation and move it to the doc directory.<br> THIS WILL DELETE ALL EXISTING HTML FILES IN THAT DIRECTORY, so don't<br> store important content there.</tt></p> <p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#aa55cc"> <td colspan=3 valign=bottom> <br> <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br> </td><td width="25%" valign=top><a href="pydoc.html">pydoc</a><br> </td><td width="25%" valign=top><a href="sys.html">sys</a><br> </td><td width="25%" valign=top></td></tr></table></td></tr></table> </body></html>