programming
Download
Skip this Video
Download Presentation
Programming

Loading in 2 Seconds...

play fullscreen
1 / 12

Programming - PowerPoint PPT Presentation


  • 82 Views
  • Uploaded on

Programming. Robert Love, Venkat Jayaraman July 22, 2008 SSTP Seminar – Lecture 9. Overview. Presentation Engineering Programs The Puzzle Pieces (of Code) The Puzzle/Big Picture Object Oriented Procedural The Missing Pieces: Debugging and Process Control Visual Interfaces Discussion

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Programming' - farrah-melendez


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
programming

Programming

Robert Love, Venkat Jayaraman

July 22, 2008

SSTP Seminar – Lecture 9

overview
Overview
  • Presentation
    • Engineering Programs
    • The Puzzle Pieces (of Code)
    • The Puzzle/Big Picture
      • Object Oriented
      • Procedural
    • The Missing Pieces: Debugging and Process Control
    • Visual Interfaces
  • Discussion
  • Activity

UF Flight Controls Lab

engineering programs
Engineering Programs
  • Commonly Used Engineering Programming Software
    • Matlab
    • C, C++, C#
    • Java
    • Fortran, Visual Basic, Excel (old school)
    • Maple. Mathematica (more for physics and math)
    • Visual Based Codes
      • Simulink, Labview, Lego Mindstorms

UF Flight Controls Lab

the pieces some types
The Pieces: Some Types
  • Think of a puzzle, putting together pieces
    • Menus and user inputs
    • The “if” statement
    • The “for/do/while” loop
    • Variables: Matrices vs. Strings
      • Note: Be careful with Row vs. Columns (specify indices)
    • Pause, return
    • Basic Logic: On/off switching, true/false: 1 vs. 0
    • Counters
    • Timers

UF Flight Controls Lab

the pieces comprehensible code
The Pieces: Comprehensible Code
  • Keep overall structure as organized and efficient as possible!
  • Comments
    • Others may use your code, so keep things organized with comment blocks and subsections
  • Variable Names
    • Engineers like names with physical meanings
    • Don’t just label aaa28 if possible!

UF Flight Controls Lab

the pieces be lazy
The Pieces: Be Lazy!
  • Don’t do the same work twice if possible
    • Save data and figures (often, not always)
  • Record what you did
    • Often codes have a “command history” that keeps track for you
  • Balance time to build automation into the code vs. the times will have to repeat process

UF Flight Controls Lab

the puzzle planning
The Puzzle: Planning
  • Try to write out basic flow of solution to puzzle (like looking at the box top)
  • Visual Codes (Labview vs. Simulink)
  • UML: Anyone can code if designed well
    • This is more a software engineering tool
    • Learn to speak other engineer’s language and how to use their tools so you can work with them!
  • Ignorance is your enemy!
    • Look at working codes as if you were learning a language, study the vocabulary and grammar

UF Flight Controls Lab

the puzzle basic structure
The Puzzle: Basic Structure
  • User Inputs? Final Outputs? Find the flow…
  • Working Directories
  • Script vs. function files
    • Visual Representation: use script to call function files
    • Try to break small steps into recyclable function files
    • Inputs and outputs

UF Flight Controls Lab

slide9
The unit in procedural programming is a function, and unit in object-oriented programming is a class

Procedural programming concentrates on creating functions, while object-oriented programming starts from isolating the classes, and then look for the methods inside them.

Procedural programming separates the data of the program from the operations that manipulate the data, while object-oriented programming focus on both of them

Procedural Programming vs Object Oriented Programming

trouble shoot debugging
Trouble Shoot (Debugging)
  • Syntax vs. Logic errors
    • Syntax: missing parenthesis or capital letter somewhere…
    • Logic errors: you dropped out data, you are turning the light on when you wanted to be turning it off
  • Version Control: Go back in time
    • Working as a team (on a code)
    • Ex: Subversion, Allway Sync

UF Flight Controls Lab

make it look pretty
Make it look pretty…
  • Graphical User Interfaces (GUI’s)
    • May obtain input or display output
  • Some components
    • Titles, triggers, check boxes, radio boxes, entry boxes, sliders, graphs
  • Graphing Data
    • 2D plot, 3D plot, surface plot, grid/mesh plot
    • Show what is required!

UF Flight Controls Lab

activity
Activity
  • Looking at basic code

UF Flight Controls Lab

ad