Programming?
Are you currently learning to program in C++ or JAVA? Check out the members area for beginners, intermediate, or advanced. Also, there is source code posted throughout the rest of this website, check the pages for the respected language.
Forum Area 
For current and active topics check here:
Active Topics.
Become a member, it's free, registration is here:
Registration.
For a live feed that is parsed into an HTML page:
New Posts (HTML) For a live feed that you can save in your browser:
New Posts (RSS)
Other C++ source code examples - Check the
C++ source code examples page for:
for loops,
while loops,
<fstream> (inFile and outFile), arrays,
switch control structures,
if,
else if,
else statements, functions(), and more. Also, other language source code will be uploaded including JAVA application examples.
Source Code - Programs
In computer science,
source code is any collection of statements or
declarations written in some human-readable computer programming language.
Source code is the means most often used by programmers to specify the actions to be
performed by a computer. Source code can also be a working program.
C++ Program: While loop counter
Compiler (Visual Studio) showing C++ Source Code:
// While loop.
#include <iostream>
using namespace std;
int main()
{
int num = 1; // Initialize counter starting at 1.
while (num <= 7) // Loop - number controls how many times.
{
cout << num; // Show the number as it increments.
num++; // Increment by adding 1 each iteration.
cout << " - Hello world!\n";
}
cout << "\n";
return 0;
}
/*==================[output]===============================
1 - Hello world!
2 - Hello world!
3 - Hello world!
4 - Hello world!
5 - Hello world!
6 - Hello world!
7 - Hello world!
Press any key to continue . . .
===========================================================*/
The above source code is C++, using a
while loop.
Here is the
Source Code:
while loop
Debugging Source Code
Debugging is a very important task in the software development process, because an
incorrect program can have significant consequences for its users. Some languages
are more prone to some kinds of faults because their specification does not require
compilers to perform as much checking as other languages. Use of a static analysis tool
can help detect some possible problems. Debugging is often done with IDEs like
Visual Studio (Microsoft),
NetBeans, and
Eclipse.
Standalone debuggers like GDB are also used, and these often provide less of a visual
environment, usually using a command line.
Computer Programming
Computer programming (often shortened to programming or coding) is the process of
writing, testing, debugging/troubleshooting, and maintaining the source code of
computer programs. This source code is written in a programming language.
The code may be a modification of an existing source or something completely new.
The purpose of programming is to create a program that exhibits a certain desired
behavior (customization). The process of writing source code often requires
expertise in many different subjects, including knowledge of the application domain,
specialized algorithms and formal logic.
Source Code style and visual appearance
The issues usually considered as part of programming style include the layout of the source
code, including indentation, the use of white space around operators and keywords,
the style and spelling of user-defined identifiers, variable names, and the use of comments.
Source code quality
Coding style:
A computer has no concept of "well-written" source code. However, from a human
point of view source code can be written in a way that has an effect on the effort
needed to comprehend its behavior. Many source code programming style guides,
which often stress readability and usually language-specific conventions are aimed at
reducing the cost of source code maintenance.
Understandability
Are variable names descriptive of the physical or functional property represented?
Do uniquely recognizable functions contain adequate comments so that their purpose is clear?
Are deviations from forward logical flow adequately commented? Are all elements of an array
functionally related?
Source Code VS. ambiguous?
Thousands of different programming languages have been created, mainly in the computing
field. Programming languages differ from most other forms of human expression in that
they require a greater degree of precision and completeness. When using a natural language
to communicate with other people, human authors and speakers can be ambiguous and make small
errors, and still expect their intent to be understood. However, figuratively speaking,
computers "do exactly what they are told to do", and cannot "understand" what code the
programmer intended to write. The combination of the language definition, a program, and the
program's inputs must fully specify the external behavior that occurs when the program is
executed, within the domain of control of that program.
Which language is most widely used?
Combining and averaging information from various Internet sites, langpop.com claims that in
2008 the 10 most cited programming languages are (alphabetical order): C, C++, C#, Java, JavaScript, Perl, PHP,
Python, Ruby, and SQL.
JAVA VS. C++
How similar are they?
Similarities and Differences
Visual Basic
Easier or harder than C++?
C++
- Variables
- strings
- Arrays
- Functions
- Return values
- While loop
- Do-while
- For loops
Source Code
Programming Languages
A programming language is an artificial language designed to express computations that can be
performed by a machine, particularly a computer. Programming languages can be used to create programs
that control the behavior of a machine, to express algorithms precisely, or as a mode of human
communication. Many programming languages have some form of written specification of their syntax (form)
and semantics (meaning). Some languages are defined by a specification document.
For example, the
C programming language is specified by an ISO Standard.
Other languages, such as Perl, have a dominant implementation that is used as a reference.
The earliest programming languages predate the invention of the computer, and were used to direct
the behavior of machines such as Jacquard looms and player pianos. Thousands of different programming
languages have been created, mainly in the computer field, with many more being created every year.
Most programming languages describe computation in an imperative style, i.e., as a sequence of commands,
although some languages, such as those that support functional programming or logic programming,
use alternative forms of description.
Programming
The history of computer programming language development can often be best understood in the
light of attempts to master the complexity of computer programs, which otherwise becomes more
difficult to understand in proportion (perhaps exponentially) to the size of the programs.
(Another way of looking at the evolution of programming languages is simply as a way of getting
the computer to do more and more of the work, but this may be a different way of saying the same thing.)
Lack of understanding of a program's overall structure and functionality is a sure way to fail to detect
errors in the program, and thus the use of better languages should, conversely, reduce the number of
errors by enabling a better understanding.
Syntax
In linguistics, syntax (from Ancient Greek) is the study of the principles and rules for constructing
sentences in natural languages. In addition to referring to the discipline, the term syntax is also
used to refer directly to the rules and principles that govern the sentence structure of any individual
language, as in "The syntax of Modern Irish." Modern research in syntax attempts to describe languages
in terms of such rules. Many professionals in this discipline attempt to find general rules that apply
to all natural languages. The term syntax is also sometimes used to refer to the rules governing the
behavior of mathematical systems, such as logic, artificial formal languages, and computer programming
languages.