Softcoding
Appearance
![]() | This article may be confusing or unclear to readers. (February 2009) |
Softcoding is a computer coding term that means abstracting a current or planned hard coded value or function into a container that is controllable external to the main function, that could be changed without affecting the main function if required (may involve recompile but no change to the main code set).
Softcoding can also be an anti-pattern if abstracting the values introduces more complexity in maintenance than just changing the code. Softcoding was featured in an article on The Daily WTF.[1]
In feature design, softcoding has other meanings.
- Hardcoding: feature is coded to the system not allowing for configuration
- Parametric: feature is configurable via table driven, or properties files with limited parametric values
- Softcoding: feature uses “engines” that derive results based on any number of parametric values (i.e. business rules in BRE); rules are coded but exist as parameters in system,written in script form
References
- ^ Softcoding from The Daily WTF