I'm new to programming and I've discovered something that causes me confusion and frustration: Translating business logic into actual code. I'm trying to develop a set of questions I can ask myself that will help me get to the level of detail I'm going to need to meet the logic requirement.
Do programmers have a set of questions they ask themselves when they're given business logic?
For example, in a test exercise:
- There must be at least two weeks of paid time between assignments.
Questions I've come up with so far.
- What specifc piece(s) of data must you know?
- Is calculation needed?
- Should this be stored as a variable?
In the above example, the answers are below.
- I must know at least the begin date, and a second date.
- A calculation is needed between the dates to see if it's less than 14 days.
- The total days can be stored as a variable and used in an error for those less than 14 days, etc.
Does my goal make sense? I'm trying to make it easier to see what's needed programatically by having a template of questions I can ask myself once a business rule is given to me.
Thanks for your help.