Softcoding: Difference between revisions

Content deleted Content added
Corrected grammar: "in to" -> "into".
?
Line 5:
Avoiding hard-coding of commonly altered values is good programming practice. Users of the software should be able to customize it to their needs, within reason, without having to edit the program's source code. Similarly, careful programmers avoid [[Magic number (programming)#Unnamed numerical constants|magic numbers]] in their code, to improve its readability, and assist maintenance. These practices are generally not referred to as 'softcoding'.
 
The term is generally used where softcoding becomes an [[anti-pattern]]. Abstracting too many values and features can introduce more complexity and maintenance issues than would be experienced with changing the code when required. Softcoding, in this sense, was featured in an article on [[The Daily WTF]].<ref>[http://worsethanfailure.com/Articles/Soft_Coding.aspx Softcoding] from [[The Daily WTF]]</ref>.
 
At the extreme end, soft-coded programs develop their own poorly-designed and implemented scripting languages, and configuration files that require advanced programming skills to edit. This can lead to the production of utilities to assist in configuring the original program, and these utilities often end up being 'softcoded' themselves.