The Process From bare bones to finished product. The Steps Programming Debugging Performance Tuning Optimization.

Slides:



Advertisements
Similar presentations
Dr. Ken Hoganson, © August 2014 Programming in R COURSE NOTES 2 Hoganson Language Translation.
Advertisements

Week 3. Assembly Language Programming  Difficult when starting assembly programming  Have to work at low level  Use processor instructions >Requires.
Snick  snack A Working Computer Slides based on work by Bob Woodham and others.
Programming Creating programs that run on your PC
Snick  snack A Working Computer Slides based on work by Bob Woodham and others.
Chapter 16 Programming and Languages: Telling the Computer What to Do.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
1-1 Embedded Software Development Tools and Processes Hardware & Software Hardware – Host development system Software – Compilers, simulators etc. Target.
Program Development and Programming Languages
Compiler Construction
CS 104 Introduction to Computer Science and Graphics Problems Software and Programming Language (2) Programming Languages 09/26/2008 Yang Song (Prepared.
Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
Source Code Basics. Code For a computer to execute instructions, it needs to be in binary Each instruction is given a number Known as “operation code”
C++ Crash Course Class 1 What is programming?. What’s this course about? Goal: Be able to design, write and run simple programs in C++ on a UNIX machine.
RISC and CISC. Dec. 2008/Dec. and RISC versus CISC The world of microprocessors and CPUs can be divided into two parts:
Tools make jobs easier to do -A computer is a tool used by many professions A computer can do many different jobs because they are programmable - Machine.
Introduction to High-Level Language Programming
Language Evaluation Criteria
Programming Languages – Coding schemes used to write both systems and application software A programming language is an abstraction mechanism. It enables.
Program development & programming languages Chapter 13.
P51UST: Unix and Software Tools Unix and Software Tools (P51UST) Compilers, Interpreters and Debuggers Ruibin Bai (Room AB326) Division of Computer Science.
Programming Languages Generations
THE PROCESS OF WRITING SOFTWARE Python: System Engineering 1.
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
Programming. What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language.
Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers.
Cosc 2150: Computer Organization
CPS Today’s topics Machine Architecture More Low-level Programming Upcoming Language Translation ( G.I. Chapter 9) Reading Great Ideas, Chapters.
CS 1308 Computer Literacy and The Internet Software.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
Operating Systems Lecture No. 2. Basic Elements  At a top level, a computer consists of a processor, memory and I/ O Components.  These components are.
FOUNDATION IN INFORMATION TECHNOLOGY (CS-T-101) TOPIC : INFORMATION SYSTEM – SOFTWARE.
A compiler is a computer program that translate written code (source code) into another computer language Associated with high level languages A well.
Chapter 4 Software. Chapter 4: Software Generations of Languages Each computer is wired to perform certain operations in response to an instruction. An.
The MIPS Processor Computer Organization The MIPS Processor Appendix A.
 Computer Languages Computer Languages  Machine Language Machine Language  Assembly Language Assembly Language  High Level Language High Level Language.
DR. SIMING LIU SPRING 2016 COMPUTER SCIENCE AND ENGINEERING UNIVERSITY OF NEVADA, RENO Session 2 Computer Organization.
The single most important skill for a computer programmer is problem solving Problem solving means the ability to formulate problems, think creatively.
1 Languages and Compilers (SProg og Oversættere) Bent Thomsen Department of Computer Science Aalborg University With acknowledgement to Norm Hutchinson.
Alexandria University Faculty of Science Computer Science Department Introduction to Programming C++
Compilers and Interpreters
CSCI-235 Micro-Computers in Science Algorithms Part II.
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Programming Languages Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
1 The user’s view  A user is a person employing the computer to do useful work  Examples of useful work include spreadsheets word processing developing.
Introduction To Software Development Environment.
Why don’t programmers have to program in machine code?
Component 1.6.
Code Optimization.
GCSE COMPUTER SCIENCE Computers 1.5 Assembly Language.
14 Compilers, Interpreters and Debuggers
High or Low Level Programming Language? Justify your decision.
Introduction to programming
CSCI-235 Micro-Computer Applications
Introduction
Microprocessor and Assembly Language
Software Design and Development
A451 Theory – 7 Programming 7A, B - Algorithms.
CSCI/CMPE 3334 Systems Programming
TRANSLATORS AND IDEs Key Revision Points.
Translators & Facilities of Languages
Mobile Development Workshop
High Level Programming Languages
Programming.
Programming Language Basics
Introduction to Computer Science
Algoritmos y Programacion
Presentation transcript:

The Process From bare bones to finished product

The Steps Programming Debugging Performance Tuning Optimization

Programming To create a set of instructions for a piece of hardware to follow Two broad categories:  Low-level languages  High-level languages

Low Level Languages Have a limited amount of abstraction between the hardware and the programmer Deal with registers, memory addresses, etc Are often limited to a small set of platforms due to this Examples:  Machine Code  Assembly  C

High Level Languages Are “abstract”  Human readable  Use objects, variables, arrays, etc Suffer from “abstraction penalty” Execution types:  Interpreted (Java, Python, Ruby)  Compiled (C, C++, practically everything else)  Translated (Often translated to C)

Debugging The act of taking something broken and trying desperately to make it work Where the significant time in any project is spent Necessary for both hardware and software sides

Hardware Debugging FIGURE 17.1 Platform Debug Process

Software Debugging Can the problem be lived with? Attempt to reproduce the problem Narrow the suspects down  Divide-and-conquer Use specific debugging tools in the right place  Can lead to “false positives”  Not capable of catching everything

Debugging Techniques Path tracing – printf (or equivalent) Breakpoints Stepping through Memory/core dumps

Performance Tuning Assess the problem Measure the performance Identify bottlenecks Modify that part Measure the new performance Do not get caught up in minutiae!!

Tuning May take one of several forms  Code optimization  Caching  Load balancing  Parallelization All are bottlenecks

Optimization More important for embedded systems Focus on the limitations of the platform  Speed  Power consumption  Memory usage Exist as tradeoffs  Greater speed, higher memory usage  Lower power consumption, slower processing

Problems Tuning and optimization are in themselves bottlenecks – though in production, not performance  May introduce new bugs  Often not “human readable”  May affect ease of upgrading

Programming, Tuning and Optimization Code first, then tune and optimize Unoptimized code is often easier to code and debug than optimized code  Get the major flaws out of the reasoning first Be specific  Power consumption needs to be limited Be reasonable  Idealized reality rarely exists