Jump to content

Talk:Magic string

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by SineBot (talk | contribs) at 15:55, 31 July 2009 (Signing comment by 66.196.25.254 - ""). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
WikiProject iconComputing C‑class Low‑importance
WikiProject iconThis article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
CThis article has been rated as C-class on Wikipedia's content assessment scale.
LowThis article has been rated as Low-importance on the project's importance scale.
WikiProject iconComputer science C‑class Low‑importance
WikiProject iconThis article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
CThis article has been rated as C-class on Wikipedia's content assessment scale.
LowThis article has been rated as Low-importance on the project's importance scale.
Things you can help WikiProject Computer science with:

Other Meanings/Examples of the "magic string"

ISTM another plausible meaning of "magic string" is just like a magic number but a string instead. This would be a string used to store information that would be better stored using symbolic constants or possibly a boolean variable.

And the string could be purely internal, or it could be in a UI component. The latter is a bit like the kind of magic string that the article talks about, except that rather than being in a text input control, it might be in the text label of a button or the like (this is a form in which I have recently encountered it). That said, maybe this is just one case of a more general kind of anti-pattern for which there ought to be a name: storing state information in GUI controls for later retrieval.

Comments? -- Smjg (talk) 19:38, 16 December 2008 (UTC)[reply]

Mention it in the article. I've actually found another example I hadn't considered previously myself. I'll add when I'm ready to dive back into this thing. --Daydreamer302000 (talk) 07:57, 7 May 2009 (UTC)[reply]

Article needs to be rewritten

This article seems to be the result of someone just making up what they believe magic strings to be. Magic strings are analogous to magic numbers and generally refer to the use of strings as a token for some state or entity. I would submit they are referred to as “magic” more as a carry over from its derivation from the concept of magic numbers. The term “magic” here refers to the vagueness in meaning of the token used, or the lack of clarity that exists in how a process enters into the state. —Preceding unsigned comment added by 66.196.25.254 (talk) 15:54, 31 July 2009 (UTC)[reply]