Before you open your editor and begin writing code you need to clearly define your problem. Answering a few questions can
help you do this:
11.1.1 Defining the Problem
The last question is as important as the others -- if there is already a PyPedal routine that does similar calculations
you can use it as a starting point. Code reuse is a great idea.
- What output do I want from my routine?
- What calculations do I need to perform?
- What input do I need to give my routine in order to perform those calculations?
- Are there any PyPedal routines that already do something similar?
The problem that will motivate the rest of this section sounds very tricky, but is not really so bad because we are going to
reuse a lot of code. I want to create a routine for drawing pedigrees that color nodes (animals) based on their importance as
measured by their connectedness to other animals in the pedigree. After a brief review of the contents of the Module Template
in Section 11.2, I will present a detailed solution to this problem in Section
See About this document... for information on suggesting changes.