You are on page 1of 9

ChBE 303

Introduction to Programming

Robert A Pinnick
Fall 2006
Outline
„ Why do I care?
„ Language Characteristics
„ Language Advantages & Disadvantages
„ Matlab
„ Excel / Visual Basic

„ FORTRAN

„ Variable Notation
„ Programming Practices
Why do I care?

„ Life is not simple …


No analytical solutions
„ Bigger Faster Longer …
Uncut, like South Park!
„ LAZY …
Computers can do the work.
Language Characteristics
„ Syntax
„ Computational Time
„ Developmental Time
„ Cost of Development
„ Platform Friendly
„ Available Libraries
„ User Base

„ PURPOSE OF PROGRAM !!!


Matlab
„ Advantages
„ Syntax
„ Developmental Time … Interpreted
„ Libraries for …
„ Linear Algebra
„ Graphical Data Visualization
„ Statistical Analysis
„ … & MORE MATHEMATICAL PROCESSING
„ Platform Friendly
„ Disadvantages
„ Computational Time … Interpreted
„ Cost of Development … Software is $$$
„ Lacks Libraries to …
„ Numerical Integration
Excel / Visual Basic
„ Advantages
„ Developmental Time … Interpreted
„ Cost of Development
„ Platform Friendly
„ Libraries for …
„ Nonlinear Equations
„ Optimization
„ User Base
„ Disadvantages
„ Syntax … MICROSOFT ‘NUFF SAID
„ Computational Time … Interpreted
FORTRAN
„ Advantages
„ Computational Time … Compiled
„ Platform Friendly
„ Libraries for …
„ Linear Algebra
„ Numerical Analysis
„ … & MORE MATHEMATICAL PROCESSING
„ Disadvantages
„ Syntax … GOTO & Compiled
„ Developmental Time … Compiled
„ Cost of Development … TIME = $$$
„ No Object Oriented Programming in F90
Variable Notation
„ Label Appropriately
„ EXAMPLE
„ color
„ iterations
„ NOT
„ A
„ X
„ Indicate Variable Type
„ EXAMPLE
„ str_title
„ int_counter
„ Common Variables NOT to Redefine
„ i & j … IMAGINARY NUMBERS
„ pi … 3.14159
„ ii, jj, kk … COUNTERS
„ e … Natural Base
Programming Practices

„ Comment OFTEN
„ ALWAYS Declare Variables
„ Use Indentations Appropriately
„ NEVER Use GOTO Statements

You might also like