5D: developing standard subroutines for reuse Flashcards
what to think about when designing
is the code generic?
- generic solutions: requires minimal changes for new projects
three common subroutines to consider
- data validation
- login processes
- conversion between date formats
data validation
a process which will conduct an analysis on user inputs according to validation rules appropriate to the particular variable and context
- if data invalid, correction action required
- for software without this: often causes runtime errors
login processes
a process which authenticates users
- authentication: the process of identifying a user using known information
conversion between date/time format
date/time formats: usually stored as double precision floats
- whole number part: number of days since 30/12/1899
- decimal portion: represents fraction of a day that has elapsed