1 / 14

ATS Programming Short Course I

ATS Programming Short Course I. INTRODUCTORY CONCEPTS. Tuesday, Jan. 20 th , 2009. PREFACE. ASSUMED – Little to no experience with Unix and/or scientific computing

clay
Download Presentation

ATS Programming Short Course I

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ATS Programming Short Course I INTRODUCTORY CONCEPTS Tuesday, Jan. 20th, 2009

  2. PREFACE ASSUMED – Little to no experience with Unix and/or scientific computing GOAL – Establish a foundation to start working in a UNIX environment immediately, and provide the tools and knowledge to quickly gain proficiency. PHILOSOPHY – Provide breadth to (hopefully) illustrate the big picture and interconnection of the different topics covered. Provide the necessary depthin topics most relevant.

  3. PRELIMINARIES Instructor: • Matt Masarik, mmasarik@atmos.colostate.edu Website: • http://www.atmos.colostate.edu/gradprog/programming Class Structure: • 3:00-3:50 - Lecture 1 • 3:50-4:00 - Break • 4:00-4:50 - Lecture 2 • 4:50-5:00 - Summary/Questions • 5:00-5:30 - Office hours [optional]

  4. SYLLABUS WEEK 1 • Lec 1: Introduction to Unix • Lec 2: Programming Basics WEEK 2 • General computing topics – hardware, precision, languages, scripting, programming tools (compiler, text editors, etc.), boolean logic WEEK 3 • Introduction to CS – background, problem solving model, functions, algorithm design, good programming practices, debugging WEEK 4 • Networks & related topics – background, hierarchy, tunneling, vpn, ssh, ftp, scp, http, html/css, security

  5. LAST OF THE DETAILS… • Syllabus vs. Syllabus • Matlab, C • A word about speakers • Student background • Student requests

  6. BASIC PROGRAMMING • Data Structures • constant • scalar • array • exotic • Core Statements/Expressions • declaration/assignment • branches • loops • Operators (relational/logical)

  7. DATA STRUCTURES • Scalar Variables • integer: 3 • float, double: 3.9999 • character: ‘a’ • boolean: True, 1 • string: “jan202009”

  8. DATA STRUCTURES • Constants • By definition do not (should not) change during execution of the program. • Example: Fortran – PARAMETER, any data type (int, float, char). • Example: Matlab – only predefined, pi = 3.14… • Matlab and the declaration global

  9. DATA STRUCTURES • Arrays • multi-dimensional • can be composed of any of the scalar variable types • comment on dimensions (Matlab vs. Fortran)

  10. DATA STRUCTURES • Pointers • a variable that holds the ‘address’ of another variable (any type). It ‘points’ to the location of a variable. • can be ‘dereferrenced’, giving the value of the variable it points to • won’t discuss much

  11. DATA STRUCTURES • Exotic • see example: Linked List of Observation objects

  12. RELATIONAL OPERATORS • Less than • Less than or equal • Greater than • Greater than or equal • Equal • Not equal

  13. LOGICAL OPERATORS • and • or • not • exclusive or (xor)

  14. STATEMENTS / EXPRESSIONS [See Matlab examples] Assignment (declaration/initialization) • Branches • if • case (not here) • Loops • for • while • do while (not here)

More Related