CamelCase

Navigation: Engineering and Technology » Computer Science » Computer Programming » CamelCase

CamelCase (or camelCase) is a style of writing in which the writer avoids using spaces between consecutive words. CamelCase is one of two ways that are frequently used in professional programming. CamelCase is used in most modern programming languages, including several popular languages such as C, C++, Visual Basic(VB), and JavaScript to name just a few.

Introduction

CamelCase is a very easy concept to pick up. It should only take about 20-30 minutes at most. If you have any issues or need any help please contact me on my Wikipedia User Talk Page by Clicking Here. I will be more than happy to help anyone who is willing to put some honest effort into this.

What you should learn out of this Lesson

This lesson will teach you basic CamelCase the way I learned it from my experience as a student in Information Technology. The lesson covers basically everything that you really need to know about CamelCase.

Introductory Example

The best way to learn, I always say, is "learning by doing", so below I have listed a sentence in regular plain old English, then that same sentence in CamelCase.

Regular sentence: The quick brown fox jumps over the lazy dog.
Sentence in CamelCase: theQuickBrownFoxJumpsOverTheLazyDog

Now, after reading those two sentences take a look at the sentence in CamelCase bellow:

theQuickBrownFoxJumpsOverTheLazyDog

As you can see, I have marked words in a pattern of alternating red and blue text to show you where each word is located. I have also underlined and bolded the first character of every word after the first word. The first character or letter of each word excluding the first word should be capitalized.

Notice that The first letter of the first word in the CamelCase sentence is not capitalized. This is because the capitalization of the first letter of each word is meant to distinguish the words from one another. The first word in a CamelCase sentence is already clearly marked out as the first word which means that you do not have to capitalize it. If you are looking to go into professional programming or a job in programming, you MUST follow these rules.

Example of CamelCase in programming

Here are some examples of CamelCase in programming languages with the CamelCase in red text.


if this were for the purpose of teaching you programming I would have abbreviated or prefixed label for lbl

Feel free to add example in other languages following my format.

CamelCase Rules Cheat sheet

Dont get it? Need Help?

If you need help, contact me on my Wikipedia User Talk Page by Clicking Here. I am more than willing to help anyone who is willing to give an honest shot and effort at learning this.

External Links

Having to Do with Hungarian Notation

Hungarian Notation Wikipedia Article

Having to Do with things Mentioned in this Lesson

This article is issued from Wikiversity - version of the Thursday, July 03, 2014. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.