CSC/ECE 517 Summer 2008/wiki2 2 ar

From Expertiza_Wiki
Jump to navigation Jump to search

Introduction

Background

Source Code

The source code is a set of computer instructions written mostly in ASCII text following some specific high level computer language syntaxes. They are human readable and need some special programs (Compilers and Interpreters) to convert it into machine languages. They actually represent the logic of the program.

Problems face by source code

  1. Organization of code - Organization of code is a difficult job. As amount and complexity increases it become harder to do that.
  2. Source code comprehension - Source code readability is actually associated with source code comprehension. It is foundation through which a developer make sense of source code. There are some other techniques/tools available that support program comprehension but nothing could match with batter readable source code.
  3. Complex computer language syntaxes - Some time computer languages design with complex notations, that make those languages very powerful but it also forces programmer to stop first to understand the language constructs then follow the actual program logic.

Naming conventions

Naming conventions is standard way of making names of things to embed additional information. This technique is very effectively used in normal life to remove irregularities. Numbering houses even and odd numbers across street to represent there direction on the road is an example of simple naming conventions.

In computer languages naming convention mostly represent rules for defining different identifiers in the program. Class names, variable names, and source file names are good examples of such rules. Good naming rules increase the source code comprehension. In some modern languages (Ruby and Ruby-on-Rails) these convention even also used as configuration information.

Benefits of standardize Naming conventions

General Naming conventions

Hungarian notations

Positional Notations

Composite word scheme

Language Specific Naming Conventions

Java

Ruby

Tools

Conclusion

Links

Coding conventions for languages