User talk:Average/Conquer

From HackerspaceWiki
Jump to: navigation, search

Correctness is an ally on the path of How to Code. It`s two parts are TightCoupling and Brevity.

"Tight-coupling" here strictly refers to the connections between code <--> documentation <--> tests, not between different modules/units of your program. The first rule of documentation is Proper Naming, so be sure to utilize Crucibles 1 & 3.

Let you're ReadyForWork objects have comments or DocStrings underneath their definition header to form a self-encapsulated and documented, re-usable object.

By encapsulating your documentation with the code, you help ensure it stays up-to-date. Languages like Python define this into the language with DocStrings. Python DocTests go further and facilitate testing by allowing test code in your documentation. Read the Python DocTest module source by Tim Peters for some very good reasons why it's good.

You don't want your code to be sloppy, hence Brevity.

This ally will make a data ecosystem fun and complete. Good tests are instructive to everyone who uses your object and ensures that it stay correct over time. Good object/module documentation makes it easier and feels safer for others to re-use your code.

End result: You have some sweet code that can be trusted by the community, where they feel comfortable extending it, because your tests document the constraints. Welcome to participating in the value-generation from peta-bytes of data amassed by humanity!