A-Z Popular Blog Top Search »
Business Guide


Hardcoding vs Softcoding

 , updated on December 30, 2015
Hardcoding is the practice of writing source code that must be rewritten in order to change its logic. In other words, hardcoded logic isn't configurable. Hardcoding is appropriate when it is reasonable to expect that a change would require the work of a programmer.


The opposite of hardcoding, known as softcoding accepts parameters or looks up values in a configuration file or database that alter the flow of computer logic. A user interface may be provided to allow users to update these values. Softcoding provides limited ability for users to change the functioning of a system without a programmer. It may also be used to improve the general maintainability of code.


Well written code is typically both hardcoded and softcoded. In theory, softcoding is done to improve maintainability of code. However, if taken too far it becomes a mess of complex configuration files and execution code that is wimpy about implementing logic with roundabout approaches that reduce maintainability. Softcoding also has a tendency to shift errors from compile time to run time, making testing more time consuming and expensive.
Overview: Hardcoding
TypeInformation Technology
Hardcoding DefinitionComputer operations that are fully expressed in source code that do not rely on configurations.
Softcoding DefinitionComputer code that is sufficiently configurable or parameterized to meaningfully change its behavior without rewriting it.
Related ConceptsSource Code
If you enjoyed this page, please consider bookmarking Simplicable.