You are on page 1of 22

Programming

Information system Design and Implementation

Chapter 6

Outline
What is computer programming
Programming languages Pseudo code Software programming as a career Test your programming ability

Computer programming
Brief definition: Writing instructions for computers to follow and run a program based on those instruction.

Art or engineering?

Computer programming
execute Machine code assembler Assembly language compiler High level language (Third generation)

1010100100101111010101010101

add $5, $7, $8 #comment

x = 5 + 8; String stupid = You are not smart;

Computer programming
Programmer focus on:
How each little pieces run Write lines of code for each functions relatively Write all little lines of code that enable the whole program runs.

Programming languages
Definition:
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely.

Programming language
History:
1983: C++ 1987: Perl 1991: Python 1995: Java (highest demand) 1995: Javascript 1995: PHP 1995: Ruby (lowest demand) 2001: C#

Elements of programming language


Variables / objects: Store the pieces of data that a program is working on Expressions Compute new values from old ones Assignments Store values into variables Conditionals be used to determine whether some condition is true Types (of variables / expression) indicating the nature of the expected values.

Elements of programming language


Statements contain instructions describing what a program actually does Control flow constructs which determine what order statements are performed in Functions An entire set of statements, declarations, and control flow constructs can be lumped together into Program A set of functions, global variables, and other elements.

Which language?

Which language?
PHP
Frameworks: -Prado -QPHP -Symfony -Zend -CakePHP -

Which language?

Which language?
Java
Frameworks: -Wicket (Apache) -Struts2 (Apache) -Spring MVC (SpringSource) -Stripes (Mc4j) -GWT (google) -Java Server Face (Sun Microsystems)

Which language?

Which language?

C++

Which language?

Which language?

C#

Pseudo code
A compact and informal high-level description of the operating principle of a computer program or other algorithm. Uses the structural convention of a programming language, but is intened for human reading rather than machine reading. Omits details that are not essential for human understanding of the algorithm (eg: variable declarations) No standard for pseudocode syntax exists, as a program in pseudocode is not an executable program

Pseudo code
- Variable declarations are typically omitted. - Function calls and blocks of code, for example code contained within a loop, is often replaced by a one-line natural

language sentence.
- Depending on the writer, pseudo code may therefore vary widely in style, from a near-exact imitation of a real programming language at one extreme, to a description approaching formatted prose at the other.

Software programming as a career

Programmer or not?
Video files URL:
http://www.youtube.com/watch?v=H4TqAgAllnk&featur e=related

Positive thing Salary Skills and experiences Work anywhere Comfortable environment Enjoy computer daily

Negative side Global competition Must keep yourself up-to-date

Age bias No fixed spare time

You might also like