Sunday, May 31, 2015

computer programming tutorial

computer programming basic

 

Today, most people don't need to know how a computer works.  Most people can simply turn on a computer or a mobile phone and point at some little graphical object on the display, click a button or swipe a finger or two, and the computer does something.  An example would be to get weather information from the net and display it.  How to interact with a computer program is all the average person needs to know.
But, since you are going to learn how to write computer programs, you need to know a little bit about how a computer works.  Your job will be to instruct the computer to do things.

 
  Basically, writing software (computer programs) involves describing processes, procedures; it involves the authoring of algorithms. Computer programming involves developing lists of instructions - the source code representation of software  The stuff that these instructions manipulate are different types of objects, e.g., numbers, words, images, sounds, etc...  Creating a computer program can be like composing music, like designing a house, like creating lots of stuff.  It has been argued that in its current state it is an art, not engineering.
An important reason to consider learning about how to program a computer is that the concepts underlying this will be valuable to you, regardless of whether or not you go on to make a career out of it.  One thing that you will learn quickly is that a computer is very dumb, but obedient.  It does exactly what you tell it to do, which is not necessarily what you wanted.  Programming will help you learn the importance of clarity of expression.

    A deep understanding of programming, in particular the
    notions of successive decomposition as a mode of analysis
    and debugging of trial solutions, results in significant
    educational benefits in many domains of discourse,
    including those unrelated to computers and information
    technology per .
                            
    It has often been said that a person does not really
    understand something until he teaches it to someone else.
    Actually a person does not really understand something
    until after teaching it to a computer, i.e., express it
    as an algorithm.
           

    Computers have proven immensely effective as aids to clear
    thinking.  Muddled and half-baked ideas have sometimes
    survived for centuries because luminaries have deluded
    themselves as much as their followers or because lesser
    lights, fearing ridicule, couldn't summon up the nerve to
    admit that they didn't know what the Master was talking
    about. A test as near foolproof as one could get of whether
    you understand something as well as you think is to express
    it as a computer program and then see if the program does
    what it is supposed to. Computers are not sycophants and
    won't make enthusiastic noises to ensure their promotion
    or camouflage what they don't know.  What you get is what
    you said.
              
           
But, most of all, it can be lots of fun!  An associate once said to me "I can't believe I'm paid so well for something I love to do."
Just what do instructions a computer understands look like?  And, what kinds of objects do the instructions manipulate?  By the end of this lesson you will be able to answer these questions.  But first let's try to write a program in the English language.
PROGRAMMING USING THE ENGLISH LANGUAGE
Remember what I said in the Introduction to this lesson?
           
      Writing software, computer programs, is a lot like
      writing down the steps it takes to do something.
                 
Before we see what a computer programming language looks like, let's use the English language to describe how to do something as a series of steps.  A common exercise that really gets you thinking about what computer programming can be like is to describe a process you are familiar with.
      Describe how to make a peanut butter and jelly sandwich.
           
Rather than write my own version of this exercise, I searched the Internet for the words "computer programming sandwich" using Google.  One of the hits returned was http://teachers.net/lessons/posts/2166.html.  At the link, Deb Sweeney  described the problem as:

      Objective: Students will write specific and sequential steps
         on how to make a peanut butter and jelly sandwich.

      Procedure: Students will write a very detailed and step-by-step
         paragraph on how to make a peanut butter and jelly
         sandwich for homework. The next day, the students will
         then input (read) their instructions to the computer
         (teacher). The teacher will then "make" the programs,
         being sure to do exactly what the students said...
           
When this exercise is directed by an experienced teacher or mentor it is excellent for demonstrating how careful you need to be, how detailed you need to be, when writing a computer program.  Here is teacher/mentor support material.
Programming in a natural language, say the full scope of the English language, seems like a very difficult task.  But, before moving on to languages we can write programs in today, I want to leave on a high note.  Click here to read about how Stephen Wolfram sees programming in a natural language happening.

computer software

computer software

 

Software means computer instructions or data. Anything that can be stored electronically is software, in contrast to storage devices and display devices which are called hardware.
The Difference Between Software and Hardware
The terms software and hardware are used as both nouns and adjectives. For example, you can say: "The problem lies in the software," meaning that there is a problem with the program or data, not with the computer itself. You can also say: "It is a software problem."
The distinction between software and hardware is sometimes confusing because they are so integrally linked. Clearly, when you purchase a program, you are buying software. But to buy the software, you need to buy the disk (hardware) on which the software is recorded.

Software is a generic term for organized collections of computer data and instructions, often broken into two major categories: system software that provides the basic non-task-specific functions of the computer, and application software which is used by users to accomplish specific tasks.

System software is responsible for controlling, integrating, and managing the individual hardware components of a computer system so that other software and the users of the system see it as a functional unit without having to be concerned with the low-level details such as transferring data from memory to disk, or rendering text onto a display. Generally, system software consists of an operating system and some fundamental utilities such as disk , file managers, display managers, text editors, user authentication  and management tools, and networking and device control software.

Application software, on the other hand, is used to accomplish specific tasks other than just running the computer system. Application software may consist of a single program, such as an image viewer; a small collection of programs (often called a software package) that work closely together to accomplish a task, such as a spreadsheet or text processing system; a larger collection (often called a software suite) of related but independent programs and packages that have a common user interface or shared data format, such as Microsoft Office, which consists of closely integrated word processor, spreadsheet, database, etc.; or a software system, such as a database management system, which is a collection of fundamental programs that may provide some service to a variety of other independent applications.

Software is created with programming languages and related utilities, which may come in several of the above forms: single programs like script interpreters, packages containing a compiler, linker, and other tools; and large suites (often called Integrated Development Environments) that include editors, debuggers, and other tools for multiple languages.

php

PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.

Nice, but what does that mean? An example:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>Example</title>
    </head>
    <body>

        <?php
            echo "Hi, I'm a PHP script!";
        ?>

    </body>
</html>

What distinguishes PHP from something like client-side JavaScript is that the code is executed on the server, generating HTML which is then sent to the client. The client would receive the results of running that script, but would not know what the underlying code was. You can even configure your web server to process all your HTML files with PHP, and then there's really no way that users can tell what you have up your sleeve.

The best things in using PHP are that it is extremely simple for a newcomer, but offers many advanced features for a professional programmer. Don't be afraid reading the long list of PHP's features. You can jump in, in a short time, and start writing simple scripts in a few hours.

dreamweaver

A comprehensive Web site authoring program for Windows and Mac from Adobe. Dreamweaver is a sophisticated authoring package that enables the HTML programmer to build complex interactive Web sites using HTML, JavaScript and server-side programming languages. It is not a program, allowing the user to drag and drop images on any part of the page. In fact, many common Web elements are best coded in HTML, and Dreamweaver immediately renders the code in a design window. templates provide rudimentary foundations for creating Web pages. Dreamweaver was originally developed by Macromedia, which was acquired by Adobe in 2005.
dreamweaver


Remote folder is where you store your files, depending on your environment, for testing, production, collaboration, and so on. Dreamweaver refers to this folder as your "remote site." The remote folder will be a folder on the computer running your web server.

Folder for dynamic pages (Testing Server folder) is the folder where Dreamweaver processes dynamic pages. This folder is often the same folder as the remote folder.

Note: Macromedia and Macromedia ColdFusion Studio users can think of a Dreamweaver site as a or Studio project.

There are two ways you can set up a Dreamweaver site: use the Site Definition Wizard, which steps you through the setup process; use the Site Definition Advanced settings, which enable you to set up local, remote, and testing folders individually, as necessary.

This tutorial shows you how to use the Site Definition Advanced settings. For instructions on how to use the Site Definition Wizard (recommended for users who are new to Dreamweaver), see Dreamweaver Help (Help > Using Dreamweaver > Dreamweaver Basics > Planning and Setting Up Your Site > Using the Site Definition Wizard).

html5 new elements

New Elements in HTML5:-
Below is a list of the new HTML5 elements. and a description of what they are used for,

html5 new features


   Tag                                     Description
<article>                Defines an article in the document
<aside>                 Defines content aside from the page content

                             Defines a part of text that might be formatted in a different direction from other text
<details>               Defines additional details that the user can view or hide
<dialog>                Defines a dialog box or window

                            Defines a caption for a <figure> element
<figure>                 Defines self-contained content, like illustrations, diagrams, photos, code listings, etc.
<footer>               Defines a footer for the document or a section
<header>             Defines a header for the document or a section
<main>               Defines the main content of a document
<mark>               Defines marked or highlighted text

                          Defines a command/menu item that the user can invoke from a popup menu
<meter>              Defines a scalar measurement within a known range (a gauge)

                          Defines navigation links in the document
<progress>        Defines the progress of a task

                         Defines what to show in browsers that do not support ruby annotations
<rt>                    Defines an explanation/pronunciation of characters (for East Asian typography)
<ruby>                Defines a ruby annotation (for East Asian typography)
<section>             Defines a section in the document
<summary>          Defines a visible heading for a <details> element
<time>                 Defines a date/time

                        Defines a possible line-break

html5 tags

HTML 5 is a revision of the Hypertext Markup Language HTML, the standard programming language for describing the contents and appearance of Web pages.HTML5 was developed to solve compatibility problems that affect the current standard, HTML5. One of the biggest differences between HTML5 and previous versions of the standard is that older versions of HTML require proprietary plugins and APIs. This is why a Web page that was built and tested in one browser may not load correctly in another browser.HTML5 provides one common interface to make loading elements easier. For example, there is no need to install a Flash plugin in HTML5 because the element will run by itself.

HTML5

 


HTML5 TAGS:-

Tag    Description
<!--...-->    Defines a comment     Defines the document type
<a>    Defines a hyperlink
<abbr>    Defines an abbreviation or an acronym
<acronym>    Not supported in HTML5. Use <abbr> instead.
Defines an acronym
<address>    Defines contact information for the author/owner of a document
<applet>    Not supported in HTML5. Use <embed> or <object> instead.
Defines an embedded applet
<area>    Defines an area inside an image-map
<article>    Defines an article
<aside>    Defines content aside from the page content
<audio>    Defines sound content
<b>    Defines bold text
<base>    Specifies the base URL/target for all relative URLs in a document    Not supported in HTML5. Use  instead.
Specifies a default color, size, and font for all text in a document
<bdi>    Isolates a part of text that might be formatted in a different direction from other text outside i    Overrides the current text direction
<big>    Not supported in HTML5. Use  instead.
Defines big text   Defines a section that is quoted from another source
<body>    Defines the document's body    Defines a single line break
<button>    Defines a  button
<canvas>    Used to draw graphics, on the fly, via scripting (usually JavaScript)
<caption>        Defines a table caption
<center>       Not supported in HTML5. Use  instead.
Defines centered text
<cite>      Defines the title of a work
<code>  -  Defines a piece of computer code
<col>  -  Specifies column properties for each column within a  element

Saturday, May 30, 2015

function in C

FUNCTION:-

a piece of code within larger program which is written to perform a specific task is called function.it is independent of the remaining code of the program .functions are the building blocks of C program.

A program may have many functions .each function has a unique name the function is called for executing with the reference of its name .A function can be called for executing by the main() function or any other function of the program.
function in C
functions provide structured programming approach.in structured programming a large program is divided into smaller units.these small units are called functions or modules or subprograms...

database management system


A collection of programs that are used to create,maintain,and access database is called database management system (DBMS).the major component is the software known as database manager.it controls the working of overall database management system.

database management system

 today the most poplar and commonly used DBMS is microsoft Access.the DBMS is used in larges or medium sized organization for database management...

compiler

The language translator program that  translates source program into machine code as a whole is called compile.The C and C++ compilers are best example of compilers.

compiler

the program translated into machine code is called the object program.the source code is translated into object code successfully if it is free of errors.if there are any error in the source code,the compile specifies the error at the end of compilation...

tc editor

in addition to compiler,turbo c or TC provides a complete IDE to create,edit,save,compile and run C programs.it is called the TC editor.the C compiler is linked with TC editor.this type of editor is also called linkage editor.

TC editor

computer programming language

Some commonly used high level languages are as Follows:

best programming languages

1: C/C++:- the C C++ language is mostly used to develop system software such as operating system and application software..

2:FORTRAN:-fortran stand for formula translation.this language is used to develop software for solving mathematical problem.

3:COBOL:-cobol stand for common business oriented language.this language is used to develop software for business and commerce.

4:JAVA:-it is used for network programming and web page designing.

5:PASCAL:-it is used to develop software for scientific and business purposes.

6:BASIC:-basic stand for beginner all purpose symbolic instruction code.

Friday, May 29, 2015

c language

History of C language:-


C is a general purpose high level programming language.it was developed by dennis ritchic at AT&T bell laboratories in 1972.it was derived from an earlier programming language named B.

c programming language

 today C is the most popular programming language.it is preferred by many programming for developing all types of application programs.these programs include: world processing programs,spreadsheet program,database management system,games ETC.it also used to write programs for controlling many other electronic devices....

database

A collection of facts and figures related to an object is called data.An object may be a person or student,an organization, an event or any other thing etc.data may be in the form of text, number ,images,sound,and videos.data can be processed to produce meaningful information...

database


In an organization data is very important.it gives view of past activities or history related to the rise and fall of an organization in making decision for future activities......

high level programming languages

The programming languages that are close to human language are called high level programming languages.the program instruction written in these programming language are similar to English language.unlike low level languages,these languages are easy to learn.

high level programming languages
every high level language has  its own set of rules for writing program . these rules are called the syntax of the language.the program instruction are written according to the syntax of the programming language.

Low level progrraming languages

The programming language that are very close to machine language are called low level programming language.the program instructions written in these language are in binary from 0 in 1 and symbol.the example of  low level programming languages are;


1:Machine language.


2:Assembly language.


low level programming language




1:Machine Language:-

 

the programming language in which instructions of the programming are written in binary form is called machine language.it is a fundamental computer language.it is very difficult to learn and to use.


2:Assembly language:-

 

 In the early computer,it was very difficult to write a program directly in machine code.Assembly language was developed to make the programming task easier.it is low level language.

computer programming

 What is a computer program and programming languages?    

Computer Language:-

computer is an electronic machine.it is used to solve different of problems according to the of instruction given to it. A set instruction given to the computer to to perform a particular task is called a computer program or software.

computer programming language



Programming Language:-

 A programming language provides the way of communication between user and computer.A computer programming language.the programming language provide a set of rules for writing computer programs.the instruction of the program are written in a specific manner and according to the rules of the programming language.there are many programming languages .Each language has its own set of rules to write computer programs...