Hard coding: Difference between revisions

Content deleted Content added
more specific links
No edit summary
Line 3:
 
{{More citations needed|date=May 2021}}
'''Hard coding''' (also '''hard-coding''' or '''hardcoding''') is the software development practice of embedding data directly into the [[source code]] of a [[computer program|program]] or other executable object, as opposed to obtaining the data from external sources or generating it at [[Run time (program lifecycle phase)|runtime]].

Hard-coded data typically can only be modified by editing the source code and [[Compiling|recompiling]] the executable, although it can be changed in [[Volatile memory|memory]] or on disk using a [[debugger]] or [[hex editor]].

Data that areis hard-coded is best suited for unchanging pieces of information, such as [[physical constant|physical constants]], [[Version number|version numbers]], and static text elements.

[[Softcoding|Softcoded data]], on the other hand, encodeencodes arbitrary information through [[user input]], [[text files]], [[INI file]]s, HTTP server responses, configuration files, preprocessor macros, external constants, databases, [[command-line argument]]s, and areis determined at runtime.
 
==Overview==