Code Hard and Put away Wet: Replacing Hardcoded SAS Software Quality Checks with Data-Driven Design and Defensive Programming Techniques That Validate Code and Control Data
September 23, 2025: 1:00 PM - 1:30 PM
Foundational Coding Skills (FCS), Breakout Room #8

Authors Abstract
Troy Hughes You wouldn’t ride your pony hard and put her away wet, so why subject your SAS® software to the same ill treatment?! Defensive programming describes a risk management strategy that aims to identify threats to software functionality and/or performance before they occur and, where possible, to identify pathways to programmatically mitigate those risks (or to communicate realized threats to stakeholders). This talk introduces various defensive programming techniques that can be implemented before software executes, such as verifying SAS program file state (i.e., availability, accessibility) and program file metadata (e.g., filename, checksum, create date, version). Data-driven software design further espouses the reality that “software” comprises not only code but also the underlying control data that drive that code’s functionality and flexibility. Thus, defensive data-driven design requires a fuller risk management strategy that evaluates risks not only to code but also to control data, including lookup tables, control tables, configuration files, and other control files. Finally, although not considered to be “software,” domain data sets and other data sources can be no less essential to ensuring software success, so the state and quality of these transactional data can be evaluated as well.