Sunday, September 27, 2009

Computer and Computer Language

Simply put, computers are electronic devices that take in input, calculate and process the input and then outputs information. However what makes that different than a calculator? This limited definition can also be attributed to a calculator because calculators also ask for input, calculate and give outputs. What makes a computer what it is may be the hardware (CPU, memory hard drives) and the software (system software, Microsoft office) that it contains.

Computer language and programming language are often used interchangeably so I am going to assume that the premise of the question is to define programming language. According to Wikipedia a computer language is “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.” Each language is composed of different syntax and is structured differently. A lot of the programming languages use some of the same concepts such as control structures, loops, subroutines, arrays, hashes, regular expressions, classes and much more. There are many languages such as C, C++, Java, Perl, HTML, Visual Basic, etc.

In order to get a visual representation of how a program looks like I’ve included this simple C++ program that I made for one of my C.S classes. This program will calculate total home cost based on the square footage of a house, optional features, discount, and tax.

// File name: lab2fall08.cpp
// Author: Gabriel Acosta
// Date: September 21, 2008
// Course: CS1600
#include
using std::fixed; //ensures that decimal point is displayed
#include
using std::setprecision; //sets numeric output precision
int main()
{
//variable declarations
double houseSquareFootage;
int optionalFeatures;
int discount;
const double STATE_TAX_RATE = .075;
const double PERCENT_PROFIT = .25;
const double COST_PER_SQUARE_FT = 66.67;

//Ask user to input the house square footage
std::cout<< "Input the House Square Footage:" < std::cin >> houseSquareFootage;
double basicHomeCost = houseSquareFootage * COST_PER_SQUARE_FT; //Calculates Basic Home Cost

//Ask user to input the Optional Features Cost
std::cout<< "Input Optional Features Cost:" < std::cin >> optionalFeatures;
double profit = (basicHomeCost + optionalFeatures) * PERCENT_PROFIT; //Caculates Profit

//Ask user to input and discount
std::cout<< "Input any discount:" < std::cin >> discount;
double netHomeCost = basicHomeCost + optionalFeatures + profit - discount; //Calculates Net Home Cost

//Give user Total Home cost
double taxes = netHomeCost * STATE_TAX_RATE; //calculates taxes
double totalHomeCost = netHomeCost + taxes; //calculates Total Home Cost
std::cout << "The total cost is $"
<< setprecision (2) << fixed << totalHomeCost <return 0;

}//end of the program

In addition you can go to this website and actually use another program that I created using PERL: http://storm.cis.fordham.edu/~acosta/cgi-bin/cgitable.pl
This program is a simple version of how businesses conduct e-commerce. This program will collect your information and if you write your correct email address, it will then send you a confirmation page to that email address with all the information you included. It pretty much acts as if you were getting a receipt if you bought a product online.

Programming languages are evolving and getting increasingly more sophisticated, no wonder I.T jobs are in high demand.

4 comments:

  1. What's interesting about Computer Languages, is although the complexity seems to haven risen significantly in the programs being built, the languages they were built on were designed to streamline the process. With C and other modern coding languages, the use of libraries allows certain routines to be implemented in code without having to type out a whole "module" of code again, allowing a faster development progression and cycle, making code in a sense interchangeable for later use.

    Now with the reusing of code all over the place, another thing to consider is if code should be legally patentable. That seems to be the dilemma today in the software business and the emergence of "patent trolls," people or businesses who have a very vague patent/claim on an idea, and sit on it until some big company develops a piece of software and makes millions, only to sue them to oblivion.
    But that's another story in itself.

    ReplyDelete
  2. It's very interesting to read about computer programming language. I have always been fascinated by how programming works, however still have little knowledge on the subject. I think it is simply amazing how a person can essentially communicate with a computer through programming.

    ReplyDelete
  3. Good stuff. Do they still talk about machine language (I recall this from the early days of personal computing) and compiling code? As I recall, a language like Basic was faulted for being too far removed from the functioning of the machine itself, the tension being how close can you get to the essence of binary and electrical impulses, as opposed to how close you can get to natural language and communication

    ReplyDelete
  4. Hi,nice description about computer and computer language.Thanks....

    -Aparna
    Theosoft

    ReplyDelete