Should data be descriptive of itself? In what cases should it preferably be or not be? -


i not sure how put simple question.

i going use example.

say sending parameter web browser server. javascript know it. setting page element have 4 different values. make 0-3, or make "bright", "dark", "transparent", "none". see mean? in 1 case data descriptive.

now step outside of realm of web development. in fact, step away facet of programming not require 1 method or other, , think of prefer 1 on other. meaning beneficial on goals if done in descriptive manner, or beneficial if done in cryptic manner.

can think of examples want 1 on other?

ps: may need tags on 1 guys.

benefit of number variant smaller data size. can useful if communicating lot of data or communicating on restricted bandwidth channel. comparing numbers faster comparing strings.

the alternative meaningful names beneficial when need easy extensibility , maintainability. can see value means without using other translation table. can enable others add new values defining naming rules.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -