0% found this document useful (0 votes)
30 views

Programming Notes 2

Names of programming elements should be easily understandable, not confusing, descriptive and avoid special characters. Hungarian notation prefixes the element name with letters indicating its type, while CamelCase strings words together capitalizing the first letter of each word. Organizations may have their own naming convention styles guides that programmers should follow.

Uploaded by

Long Le
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Programming Notes 2

Names of programming elements should be easily understandable, not confusing, descriptive and avoid special characters. Hungarian notation prefixes the element name with letters indicating its type, while CamelCase strings words together capitalizing the first letter of each word. Organizations may have their own naming convention styles guides that programmers should follow.

Uploaded by

Long Le
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

What’s in a name?

Name of elements (variables, subprograms, function, tables, fields, queries, reports etc)
should:
- Easily be understand
- Not to be confused with other elements
- Not be meaninglessly short (e.g. N)
- Be self-descriptive
- Avoid special punctuation (which may choke some compliers)
- Avoid spaces
Remember, your source code may be used in more than one complier with different
behaviour.

Hungarian Notation
- Hungarian notation is a naming convention for program elements such as variables
and objects.
- The convention is that the first two or three letters of the element’s name indicate
the type of element.
- The rest of the name indicates its purpose, and starts with a capital letter.
- Example a text box containing a first name could be called txtFname.

CamelCase
The practise of writing multiple words as one string without spaces using capital letters to
mark the beginnings of individual words.

Styles Guides
- Naming conventions vary from programmer to programmer, and from organisation
to organisation
- Organisations often dictate local naming conventions which must be obeyed

You might also like