Software Engineering vocabulary · Code Review and Code Quality
Hard-coded
Meaning in software engineering, with examples
/ˌhɑːrd ˈkoʊdɪd/adjectiveCommon term
In software engineering, hard-coded means: Written directly into the source code instead of coming from settings, a database or user input, so it cannot change without editing the code.
In Turkish: koda gömülü, sabit kodlanmış, elle yazılmış
How it is used
Usually a criticism in code review: 'This URL is hard-coded', 'Don't hard-code the API key.' The verb is 'hard-code'. Passwords and keys should never be hard-coded.
Example sentences
The timeout is hard-coded to 30 seconds. Can we move it to the config?
Someone hard-coded a test email address, so all the reports went to one person.
Common collocations
hard-coded value
hard-coded URL
hard-code a password
remove hard-coded values
Related terms
variableA name in a program that stores a value, such as a number, text or list, so that the code can use or change that value later.
code smellA sign in code that suggests a deeper design problem, such as a very long function, duplicated logic or too many parameters, even if the code works.
code reviewThe practice of teammates reading and commenting on each other's code changes before they are merged, to catch problems and share knowledge.
technical debtThe future cost of shortcuts taken in code today: quick solutions that save time now but make later changes slower and riskier.