Hard coding: Difference between revisions

Content deleted Content added
unexplained malformed change - Undid revision 1229759855 by 2405:201:2013:D05C:1F02:175D:66ED:7919 (talk)
m unpiped links using script
Line 7:
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 is hard-coded is best suited for unchanging pieces of information, such as [[physical constant|physical constants]]s, [[Version number|version numbers]], and static text elements.
 
Softcoded data, on the other hand, encodes 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 is determined at runtime.
Line 20:
 
== Hardcoding and backdoors ==
Hardcoding credentials is a popular way of creating a [[Backdoor (computing)|backdoor]]. Hardcoded credentials are usually not visible in configuration files or the output of account-enumeration commands and cannot be easily changed or bypassed by users. If discovered, a user might be able to disable such a backdoor by modifying and rebuilding the program from its [[source code]] ([[FLOSS|if source is publicly available]]), [[decompiler|decompiling]], or [[reverse-engineering]] [[software]], [[hex editor|directly editing]] the program's [[binary code]], or instituting an integrity check (such as digital signatures, anti-tamper, and [[anti-cheat]]) to prevent the unexpected access, but such actions are often prohibited by an [[end-user license agreement]].
 
==Hardcoding and DRM==
Line 62:
 
==Softcoding==
'''Softcoding''' is a [[computer programming|computer coding]] term that refers to obtaining a value or function from some external resource, such as [[text files]], [[INI file]]s, [[preprocessor]] [[Macro (computer science)|macros]], external constants, [[configuration file]]s, [[command-line argument]]s, databases, user input, HTTP server responses. It is the opposite of [[hardcoding]], which refers to coding values and functions in the source code.
 
===Programming practice===