daily pastebin goal
43%
SHARE
TWEET

Untitled

edcellwarrior Dec 2nd, 2014 4 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1.  
  2.  
  3. '''CamelCase''' ('''camel case''', '''camel caps''' or '''medial capitals''') is the practice of writing [[Compound (linguistics)|compound words]] or phrases so that each next word or abbreviation begins with a [[capitalization|capital letter]].  CamelCase usually starts with a capital. When used in a [[programming language]], it usually starts with a lowercase letter. Common examples are [[PowerPoint]] or [[iPhone]].
  4.  
  5. == Variations ==
  6. There are many variations of CamelCase. A few important ones are:
  7.  
  8. {{col-begin}}{{col-break}}
  9. * '''BumpyCaps'''<ref name="semicolon">{{cite web | first=Brian | last=Hayes | url=http://www.americanscientist.org/issues/pub/the-semicolon-wars/2 | title=The Semicolon Wars | work=American Scientist Online: The Magazine of Sigma XI | publisher=The Scientific Research Society | date=July–August 2006 | at=art. pg. 2.}}</ref>
  10. * '''camelBack''' (or camel-back) notation<ref>[http://www2.tech.purdue.edu/cit/Courses/CPT355/C_Sharp_Coding_Standards_and_Guidelines.asp C# Coding Standards and Guidelines] at [http://www2.tech.purdue.edu/cit/ Purdue University College of Technology]</ref>
  11. * '''CamelCaps'''<ref>{{cite web|url=http://everything2.com/title/CamelCase |title=CamelCase@Everything2.com |publisher=Everything2.com |date= |accessdate=4 June 2010}}</ref>
  12. * '''CapitalizedWords''' or '''CapWords''' for upper CamelCase in [[Python (programming language)|Python]]<ref name="python">[http://legacy.python.org/dev/peps/pep-0008/ Style Guide for Python Code] at [https://www.python.org www.python.org]</ref> {{nb5}}
  13. * '''compoundNames'''<ref name="compoundNames">{{cite web |  url=http://groups.google.com/group/alt.folklore.computers/browse_thread/thread/6099191f2c4e0984/21f332e5b813313e?#21f332e5b813313e | title=compoundName | work=discussion thread at [http://groups.google.com/group/alt.folklore.computers alt.folklore.computers] | date=29 March 1990}}</ref>
  14. * '''Embedded Caps''' (or Embedded Capitals)<ref>{{cite web|url=http://issues.appfuse.org/browse/APF-1088 |title=[#APF-1088&#93; If class name has embedded capitals, AppGen code fails UI tests and generated hyperlinks are incorrect. – AppFuse JIRA |publisher=Issues.appfuse.org |date= |accessdate=4 June 2010}}</ref>
  15. * '''HumpBack''' (or hump-back) notation<ref>[http://www.shiningstar.net/articles/articles/standards/namingconventions.asp ASP Naming Conventions], by Nannette Thacker (05/01/1999)</ref>
  16. {{col-break}}
  17. * '''InterCaps''' or '''intercapping'''<ref>{{Cite book| last = Iverson | first = Cheryl, et al. (eds) | title = AMA Manual of Style | edition = 10th | publisher = Oxford University Press | location = Oxford, Oxfordshire | year = 2007 | isbn = 978-0-19-517633-9 }}</ref> (abbreviation of ''Internal Capitalization''<ref>{{cite web |url=http://wps.ablongman.com/long_hult_bnch_4/63/16207/4149058.cw/content/index.html |title=The Brief New Century Handbook – Rules for internal capitalization |publisher=Pearson Education |author=Christine A. Hult and Thomas N. Huckin}}</ref>)
  18. * '''mixedCase''' for lower CamelCase in Python<ref name="python"/>
  19. * '''nerdCaps'''<ref name="semicolon"/> or '''headlessCamelCase'''
  20. * '''[[Pascal (programming language)|Pascal]] case''' for upper CamelCase<ref>{{cite web|url=http://blogs.msdn.com/brada/archive/2004/02/03/67024.aspx |title=Brad Abrams : History around Pascal Casing and Camel Casing |publisher=Blogs.msdn.com |date=3 February 2004 |accessdate=4 January 2014}}</ref><ref>{{cite web|url=http://c2.com/cgi/wiki?PascalCase |title=Pascal Case |publisher=C2.com |date=27 September 2012 |accessdate=4 January 2014}}</ref><ref>{{cite web|url=http://msdn2.microsoft.com/en-us/library/x2dbyw72(vs.71).aspx |title=NET Framework General Reference Capitalization Styles |publisher=Msdn2.microsoft.com |date= |accessdate=4 January 2014}}</ref>
  21. * '''WikiWord'''<ref name="WikiWord used by [[TWiki]]">{{cite web|url=http://twiki.org/cgi-bin/view/TWiki/WikiWord |title=WikiWord < TWiki < TWiki |publisher=Twiki.org |date= |accessdate=4 June 2010}}</ref> or '''WikiCase'''<ref name="WikiCase mentioned in [[WikiWikiWeb]]">{{cite web|url=http://c2.com/cgi/wiki?WikiCase |title=Wiki Case |publisher=C2.com |date=8 February 2010 |accessdate=4 June 2010}}</ref> (especially in older [[wiki]]s)
  22. * '''wimpyCaps'''<ref name="wimpyCaps">{{cite web|url=http://sql2java.sourceforge.net/xref/net/sourceforge/sql2java/StringUtilities.html |title=String Utilities |date=13 July 2007}}</ref>
  23. {{col-end}}
  24.  
  25.  
  26. == History ==
  27.  
  28. === [[Chemical formula|Chemical formulae]] ===
  29. The first use of medial capitals was the notation for chemical formulae invented by the [[Swedish people|Swedish]] chemist [[Jöns Jakob Berzelius|Berzelius]] in 1813. He did this to replace the large amount of naming and symbol systems used by chemists at that time. He suggested to show each chemical element by a symbol of one or two letters, the first one being capitalized. The capitalization allowed formulae like 'NaCl' to be written without spaces and still be read without confusion. This system is still in use today.<ref>[[Jöns Jacob Berzelius]] (1813). ''Essay on the Cause of Chemical Proportions and on Some Circumstances Relating to Them: Together with a Short and Easy Method of Expressing Them''. ''[[Annals of Philosophy]] 2, 443-454, 3, 51-52; (1814) 93-106, 244-255, 353-364.</ref><ref>Henry M. Leicester & Herbert S. Klickstein, eds. 1952, ''A Source Book in Chemistry, 1400-1900'' (Cambridge, MA: Harvard)</ref>
  30.  
  31.  
  32. === Early use in trademarks ===
  33. Since the early 20th century, medial capitals have occasionally been used for [[corporation|corporate]] names and product [[trademark]]s, such as
  34. * ''DryIce Corporation'' (1925)<ref name="About Dry ice">{{Cite book| title = The Trade-mark Reporter| publisher = [[International Trademark Association|United States Trademark Association]]| year = 1930| issue = v. 20| isbn = 1-59888-091-8}}</ref>
  35. * [[CinemaScope]] and [[VistaVision]], rival [[widescreen]] [[film|movie]] formats (1953)
  36. * [[ShopKo Stores Inc.|ShopKo]] (1962)
  37. * ''MisterRogers'', the [[Canada|Canadian]] version of ''[[Mister Rogers' Neighborhood]]'' (1962)<ref>{{cite web|url=http://imdb.com/title/tt0250165/ |title="MisteRogers" (1962) |publisher=Imdb.com |date= |accessdate=4 January 2014}}</ref>
  38. * [[AstroTurf]] (1967)<!-- Trademark serial number 72286166 -->
  39. * [[ConAgra Foods Inc.|ConAgra]]
  40.  
  41. === Computer programming ===
  42. {{Original research|section|reason=no citations and internet search shows no original sources, only sources that got it from wikipedia|date=May 2011}}
  43. In the 1970s and 1980s, medial capitals became used as a standard in several [[programming language]]s for pieces of code using multiple words. The origin of this idea has not yet been found. However, a 1954 conference paper shows a program that includes some medial capital identifiers, including "<tt>NextCh</tt>" and "<tt>WriteSymbol</tt>". <ref>{{cite web|url=http://www.bitsavers.org/pdf/mit/summer_session_1954/Digital_Computers_Advanced_Coding_Techniques_Summer_1954.pdf |title="Resume of Session 8". Digital Computers: Advanced Coding Techniques. Summer Session 1954, Massachusetts Institute of Technology, page 8-6. |format=PDF |date= |accessdate=4 January 2014}}</ref>
  44.  
  45. === Spread to mainstream usage ===
  46. Despite its unclear origins inside the computing world, the practice spread in the 1980s and 1990s, when the [[personal computer]] became popular and exposed [[hacker]] culture to the world. CamelCase then became popular for business names. By 1990, it was very common to see CamelCase used in this way:
  47.  
  48. <!-- This is documentation of increasing commercial usage, not a complete list. Two
  49. or three examples per year is plenty. -->
  50. * (1962) [[PolyGram]], formerly one of the [[major label]]s of the [[music industry]].
  51. * (1971) [[AeroVironment]]
  52. * (1976) [[InterCity 125]]
  53. * (1977) [[CompuServe]], [[UnitedHealth Group|UnitedHealthCare]] (now UnitedHealthcare).<ref>{{cite web|url=http://www.unitedhealthgroup.com |title=Unitedhealthgroup.com |publisher=Unitedhealthgroup.com |date= |accessdate=4 January 2014}}</ref>
  54. * (1978) [[WordStar]]
  55. * (1979) [[MasterCard]], [[SportsCenter]], [[VisiCalc]]
  56. * (1980) [[EchoStar Communications Corporation|EchoStar]]
  57. * (1982) [[MicroProse]], [[WordPerfect]]
  58. * (1983) [[Novell NetWare|NetWare]]
  59. * (1984) [[BellSouth]], [[LaserJet]], [[MacWorks]], [[iDEN]]
  60. * (1985) [[Adobe PageMaker|PageMaker]], [[EastEnders]]
  61. * (1986) [[SpaceCamp]]
  62. * (1987) [[ClarisWorks]], [[HyperCard]], [[PowerPoint]]
  63. * (1990) [[HarperCollins Publishers|HarperCollins]], [[SeaTac, Washington|SeaTac]], iconic [[WorldWideWeb]]
  64.  
  65. During the late 1990s when the internet became far more popular and easily available, the lowercase [[prefix]]es "e" (for "[[electronics|electronic]]") and "i" (for "[[Internet]]",<ref>{{Cite news|author=Farhad Manjoo |url=http://www.wired.com/science/discoveries/news/2002/04/52181 |title=Grads Want to Study on EMacs, Too |publisher=Wired.com |date= 30 April 2002|accessdate=4 June 2010}}</ref> "[[information]]", "[[intelligent]]", etc.) became quite common, and we began to see names like [[Apple Inc.|Apple]]'s [[iMac]] and the [[Zentyal|eBox]] computer program.
  66.  
  67. === History of the name "CamelCase" ===
  68. The original name of the practice, used in [[media studies]], [[grammar]]s and the ''[[Oxford English Dictionary]]'', was "medial capitals". The fancier names such as "InterCaps", "CamelCase" and other variations are pretty recent and seem more common in computer-related communities.
  69.  
  70. The earliest known occurrence of the term "InterCaps" on Usenet is in an April 1990 post to the group <tt>alt.folklore.computers</tt> by Avi Rappoport,<ref name="compoundNames" /> with "BiCapitalization" appearing slightly later in a 1991 post by [[Eric S. Raymond]] to the same group.<ref>{{cite web|url=http://groups.google.com/group/misc.misc/msg/f5f25b79cd9026bd |title=The jargon file version 2.5.1 29 January 1991 follows in 15 parts – misc.misc &#124; Google Groups |publisher=Groups.google.com |date= |accessdate=23 May 2009}}</ref> The earliest use of the name "CamelCase" occurs in 1995, in a post by [[Newton Love]].<ref>{{cite web|author=Newton Love&nbsp;View profile&nbsp;&nbsp;More options |url=http://groups.google.com/group/comp.os.os2.advocacy/msg/ab3c8107c6e150fa |title=I'm happy again! – comp.os.os2.advocacy &#124; Google Groups |publisher=Groups.google.com |date= |accessdate=23 May 2009}}</ref> "''With the advent of programming languages having these sorts of constructs, the humpiness of the style made me call it HumpyCase at first, before I settled on CamelCase. I had been calling it CamelCase for years,''" said Love, "''The citation above was just the first time I had used the name on USENET.''"<ref>[http://sluug.org/~newt/ Newton Love]</ref>
  71.  
  72.  
  73. == Current usage in computing ==
  74.  
  75. === Programming and coding ===
  76. {{main|Naming convention (programming)}}
  77. The use of medial caps for [[identifier]]s is recommended by many organizations and software projects. For some languages (such as [[Mesa (programming language)|Mesa]], [[Pascal (programming language)|Pascal]], [[Modula]], [[Java (programming language)|Java]] and [[Microsoft]]'s [[Microsoft .NET|.NET]]) CamelCase is recommended by the language developers or by important manuals and has therefore become part of the language's "culture".
  78.  
  79. Style guidelines often distinguish between upper and lower CamelCase. They usually specify which one should be used for certain kinds of things: [[variable (computer science)|variable]]s, [[field (computer science)|record fields]], [[method (computer science)|method]]s, [[procedure (computer science)|procedures]], [[type (computer science)|types]], etc. This is sometimes supported by [[static code analysis|static analysis]] tools that check source code to make sure it is following these guidelines.
  80.  
  81. === Wiki link markup ===
  82. CamelCase is used in some [[wikitext|wiki markup languages]] for terms that should be automatically linked to other [[wiki]] pages. This convention was originally used in [[Ward Cunningham]]'s original [[wiki software]], [[WikiWikiWeb]], and can be activated in most other wikis. Some wiki engines such as [[TiddlyWiki]], [[Trac]] and [[PMWiki]] use it in the default settings. They also usually provide a option or [[Plug-in (computing)|plugin]] to disable it. [[Wikipedia]] used to use CamelCase linking. However, they have switched to explicit link markup using [[square brackets]] and many other wiki sites have done the same. Some wikis that do not use CamelCase linking may still use the CamelCase as a naming convention, such as [[AboutUs]].
  83.  
  84. === Other uses ===
  85. The [[National Information Exchange Model|NIEM]] registry requires that [[Extensible Markup Language|XML]] data elements use upper CamelCase and XML attributes use lower CamelCase.
  86.  
  87. Most popular [[command-line interface]]s and [[shell script|scripting]] languages usually can't handle file names that contain embedded spaces. Because of this, users of those systems often use to CamelCase (or underscores, hyphens and other "safe" characters) for compound file names like <tt>MyJobResume.pdf</tt>.
  88.  
  89. [[Microblogging]] and [[social networking]] sites that limit the number of characters in a message (most famously [[Twitter]], where the 140-character limit can be quite restrictive in languages that rely on alphabets, including English) are usually outlets for medial capitals. Using CamelCase between words reduces the number of spaces, and thus the number of characters in a given message. This allows more content to fit into the limited space.
  90.  
  91. == Current usage in natural languages ==
  92. CamelCase has been used in languages other than English for several purposes. Some examples are:
  93.  
  94. === Orthographic markings ===
  95. CamelCase is sometimes used in the writing or translation of certain scripts as a way to tell the difference between ceratin letters or markings. An example is the rendering of [[Standard Tibetan|Tibetan]] proper names like ''rLobsang'': the "r" here stands for a prefix glyph in the original script that functions as [[tone (linguistics)|tone]] marker rather than a normal letter. Another example is ''tsIurku'', a Latin transcription of the [[Chechen language|Chechen]] term for the capping stone of the characteristic [[Vainakh medieval towers|Medieval defensive towers]] of [[Chechenia]] and [[Ingushetia]]; the capital letter "I" here showing a [[phoneme]] different from the one transcribed as "i".
  96.  
  97. === Inflection prefixes ===
  98. CamelCase may also be used when writing proper names in languages that add prefixes to words. In some of those languages, the custom is to leave the prefix in lower case and capitalize the root.
  99.  
  100. This convention is used in [[Irish orthography]] as well as [[Scottish Gaelic alphabet|Scots Gaelic orthography]]; e.g., {{lang|ga|''i nGaillimh''}} ("in [[Galway]]"), from {{lang|ga|''Gaillimh''}} ("Galway");  {{lang|ga|''an tAlbanach''}} ("the Scottish person"), from {{lang|ga|''Albanach''}} ("Scottish person"); {{lang|ga|''go hÉireann''}} ("to [[Ireland]]"), from {{lang|ga|''Éire''}} ("Ireland).
  101.  
  102. Similarly, when translating the [[Hebrew language]], ''haIvri'' means "the Hebrew person" and ''biYerushalayim'' means "in Jerusalem".
  103.  
  104. This convention is also used by several [[Bantu languages]] (e.g., ''kiSwahili'' = "[[Swahili language]]", ''isiZulu''  = "[[Zulu language]]") and several indigenous [[languages of Mexico]] (e.g. [[Nahuatl languages|Nahuatl]], [[Totonacan languages|Totonacan]], [[Mixe–Zoque languages|Mixe–Zoque]] and some [[Oto-Manguean languages]]).
  105.  
  106. === In abbreviations and acronyms ===
  107. Abbreviations of some academic qualifications are sometimes presented in CamelCase without punctuation, e.g. [[Doctor of Philosophy|PhD]] or [[Bachelor of Science|BSc]].
  108.  
  109. In French, CamelCase acronyms such as [[Oulipo|OuLiPo]] (1960) were favored for a time as alternatives to initialisms.
  110.  
  111. CamelCase is often used to transliterate initialisms into alphabets where two letters may be required to represent a single character of the original alphabet, e.g., [[DShK]] from [[Cyrillic]] ДШК. <!-- Need a real example for the following: In [[Japan]], CamelCase is sometimes used when translating [[Hiragana]] or [[Katakana]] product names or initialisms into Roman alphabet. -->
  112.  
  113. === Honorifics within compound words ===
  114. In several languages, including English, [[pronoun]]s and [[possessive]]s may be capitalized to show respect. For example: when referring to the reader of a formal letter or to [[God]]. In some of those languages, the capitalization is retained even when those words occur within compound words or [[enclitic|suffixed to a verb]]. For example, in Italian one would write {{lang|it|''porgendoLe distinti saluti''}} ("offering to You respectful salutations") or {{lang|it|''adorarLo''}} ("adore Him").
  115.  
  116. === Other uses ===
  117. In German nouns carry a [[grammatical gender]]—which, for roles or job titles, is felt usually as masculine. Since the [[feminist movement]] of the 1980s, some writers and publishers have been using the feminine title suffixes ''-in'' ([[grammatical number|singular]]) and ''-innen'' (plural) to help boost the inclusion of women; but written with a capital 'I', to indicate that males are not excluded. Example: {{lang|de|''MitarbeiterInnen''}} ("co-workers, <nowiki>male or</nowiki> female") instead of {{lang|de|''Mitarbeiter''}} ("co-workers", masculine grammatical gender) or {{lang|de|''Mitarbeiterinnen''}} ("female co-workers"). This use is analogous to the use of [[parentheses]] in English, for example in the phrase "congress(wo)man."
  118.  
  119. In German, the names to statutes are shortened using embedded capitals. An example would be: StGB (Strafgesetzbuch) for criminal code, PatG (Patentgesetz) for Patent Act or the very common GmbH (Gesellschaft mit beschränkter Haftung) for Company with Limited Liability.
  120.  
  121.  
  122. == See also ==
  123. *[[Snake case]]
  124.  
  125. == References ==
  126. {{Reflist|30em}}
  127.  
  128. == External links ==
  129. {{commonscat|Camel case}}
  130. * [http://c2.com/cgi/wiki?CamelCase Examples and history of CamelCase], also [http://c2.com/cgi/wiki?WordsSmashedTogetherLikeSo WordsSmashedTogetherLikeSo]
  131. * [http://msdn2.microsoft.com/en-us/library/x2dbyw72(vs.71).aspx .NET Framework General Reference Capitalization Styles]
  132. * [http://www.theslot.com/webnames.html What's in a nAME(cq)?], by Bill Walsh, at The Slot
  133. * [http://www.microsoft.com/typography/ctfonts/WordRecognition.aspx The Science of Word Recognition], by Kevin Larson, Advanced Reading Technology, Microsoft Corporation
  134. * [http://xml.coverpages.org/camelCase.html OASIS Cover Pages: CamelCase for Naming XML-Related Components]
  135. * [http://titlecase.com Convert text to CamelCase, Title Case, Uppercase and lowercase]
  136.  
  137. {{Typography terms}}
  138.  
  139. {{Use dmy dates|date=June 2013}}
  140.  
  141. {{DEFAULTSORT:Camelcase}}
  142. [[Category:Typography]]
  143. [[Category:Naming conventions]]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top