What is hardcode?

in programmer •  7 years ago  (edited)

hardcode-750x429.jpg
In the world of programming, hardcode is to use an explicit rather than a symbolic name for something that is likely to change at a later time. Such coding is sometimes known as hardcode and it is more difficult to change if it later becomes necessary. In most programming languages, it is possible to equate a symbol with a particular name (which may also represent a number) value. If the name changes, the symbol stays the same and only the equate line of code needs to be changed to reflect the new name. When the program is recompiled, the new name is picked up wherever the symbol occurs in the code. Although there are search-and-replace tools that can change all occurrences of a given name, program code is very unforgiving in case a small error is introduced, and it is safer to have a single place in which such a change can be made. For this reason, hardcoding is usually a practice to be avoided.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Congratulations @diegoburlando! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!