- 1 Introduction
- 2 What you should learn out of this Lesson
- 3 Introductory Example
- 4 Example of CamelCase in programming
- 5 CamelCase Rules Cheat sheet
- 6 Dont get it? Need Help?
- 7 External Links
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.
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:
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.
- VisualBasic: labelMain.Caption = "Whats up?"
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.
- C: stringName = "Tom";
- Java: String userName = this.name;
CamelCase Rules Cheat sheet
- The First letter of every new word in a sentence written in CamelCase must be capitalized.
- This excludes the first letter of the first word in the sentence.
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.