Warmup Write a function to add two integer parameters and return the result.

Slides:



Advertisements
Similar presentations
Module R2 CS450. Next Week R1 is due next Friday ▫Bring manuals in a binder - make sure to have a cover page with group number, module, and date. You.
Advertisements

COMPUTER PROGRAMMING I Essential Standard 5.02 Understand Breakpoint, Watch Window, and Try And Catch to Find Errors.
Debugging Techniques1. 2 Introduction Bugs How to debug Using of debugger provided by the IDE Exception Handling Techniques.
ATS Programming Short Course I INTRODUCTORY CONCEPTS Tuesday, Jan. 20 th, 2009.
Lecture Roger Sutton CO331 Visual programming 15: Debugging 1.
General Computer Science for Engineers CISC 106 Lecture 21 Dr. John Cavazos Computer and Information Sciences 04/10/2009.
June 13, Introduction to CS II Data Structures Hongwei Xi Comp. Sci. Dept. Boston University.
CMSC 132: Object-Oriented Programming II
CMSC 132: Object-Oriented Programming II Nelson Padua-Perez William Pugh Department of Computer Science University of Maryland, College Park.
Java Review 2 – Errors, Exceptions, Debugging Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
ECE122 L17: Method Development and Testing April 5, 2007 ECE 122 Engineering Problem Solving with Java Lecture 17 Method Development and Testing.
July 16, Introduction to CS II Data Structures Hongwei Xi Comp. Sci. Dept. Boston University.
1 Chapter Two Introduction to the Programming Language C.
COP4020/CGS5426 Programming languages Syllabus. Instructor Xin Yuan Office: 168 LOV Office hours: T, H 10:00am – 11:30am Class website:
 Knowledge and use of tools and resources in a system: standard libraries, system calls, debuggers, the shell environment, system programs and scripting.
WEEK 1 CS 361: ADVANCED DATA STRUCTURES AND ALGORITHMS Dong Si Dept. of Computer Science 1.
P51UST: Unix and Software Tools Unix and Software Tools (P51UST) Compilers, Interpreters and Debuggers Ruibin Bai (Room AB326) Division of Computer Science.
Homework Reading Programming Assignments
Trying to like a boss… REVERSE ENGINEERING. WHAT EVEN IS… REVERSE ENGINEERING?? Reverse engineering is the process of disassembling and analyzing a particular.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
Integrated Development Environments (IDEs) CS 21a: Introduction to Computing I First Semester,
หลักการโปรแกรม เพื่อแก้ปัญหาโดยใช้คอมพิวเตอร์
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
Chapter 3: Completing the Problem- Solving Process and Getting Started with C++ Introduction to Programming with C++ Fourth Edition.
1 ENERGY 211 / CME 211 Lecture 13 October 20, 2008.
Careers in Computer Science What is computer science? Who should major in computer science? What do computer scientists really do? Research Paper Alice.
Some Basics && GDB overview Ram Sheshadri –
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 1- 1 October 20, October 20, 2015October 20, 2015October 20,
1 Debugging: Catching Bugs ( II ) Ying Wu Electrical Engineering & Computer Science Northwestern University EECS 230 Lectures.
Testing. 2 Overview Testing and debugging are important activities in software development. Techniques and tools are introduced. Material borrowed here.
1 CISC181 Introduction to Computer Science Dr. McCoy Lecture 1 February 8, 2005.
CMSC 2021 CMSC 202 Computer Science II for Majors Fall 2002 Mr. Frey (0101 – 0104) Mr. Raouf (0201 – 0204)
Software Engineering. Software Engineering is… Design Coding Testing Debugging Documentation Maintenance …of new software.
Course Information Andy Wang Operating Systems COP 4610 / CGS 5765.
CS Data Structures I Chapter 2 Principles of Programming & Software Engineering.
CSE 232: C++ Programming in Visual Studio Graphical Development Environments for C++ Eclipse –Widely available open-source debugging environment Available.
CSE 232: C++ debugging in Visual Studio and emacs C++ Debugging (in Visual Studio and emacs) We’ve looked at programs from a text-based mode –Shell commands.
C++ and Ubuntu Linux Review and Practice CS 244 Brent M. Dingle, Ph.D. Game Design and Development Program Department of Mathematics, Statistics, and.
Debugging Visual Basic.NET Programs ► ► Use debugging tools ► ► Set breakpoints and correct mistakes. ► ► Use a Watch and Local window to examine variables.
CSE 332: C++ debugging Why Debug a Program? When your program crashes –Finding out where it crashed –Examining program memory at that point When a bug.
Debugging 1/6/2016. Debugging 1/6/2016 Debugging  Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a program.
CMSC 2021 CMSC 202 Computer Science II for Majors Spring 2002 Sections Ms. Susan Mitchell.
CMSC 2021 CMSC 202 Computer Science II for Majors Spring 2003 Mr. Frey (0101 – 0104) Mr. Raouf (0201 – 0204)
Integrated Development Environments (IDEs) CS 21a: Introduction to Computing I Department of Information Systems and Computer Science Ateneo de Manila.
CMSC 202 Lesson 15 Debugging. Warmup  What is the bug in the following code? int* foo(int a) { return &a; }
Higher Computing Science 2016 Prelim Revision. Topics to revise Computational Constructs parameter passing (value and reference, formal and actual) sub-programs/routines,
CMSC 104, Version 8/061L14AssignmentOps.ppt Assignment Operators Topics Increment and Decrement Operators Assignment Operators Debugging Tips Reading Section.
Pgm #1 Infix to Postfix Common Problems/Issues/Mistakes.
CSE 332: C++ expressions Expressions: Operators and Operands Operators obey arity, associativity, and precedence int result = 2 * 3 + 5; // assigns 11.
CSCI 161 Lecture 3 Martin van Bommel. Operating System Program that acts as interface to other software and the underlying hardware Operating System Utilities.
COMPUTER PROGRAMMING I SUMMER Understand Different Types of Programming Errors.
Chapter 1: Introduction to Computers and Programming.
CHAPTER 3 COMPLETING THE PROBLEM- SOLVING PROCESS AND GETTING STARTED WITH C++ An Introduction to Programming with C++ Fifth Edition.
Software Engineering Algorithms, Compilers, & Lifecycle.
Debuggers. Errors in Computer Code Errors in computer programs are commonly known as bugs. Three types of errors in computer programs –Syntax errors –Runtime.
C++ Programming Basics C++ Lecture 1 Stacy MacAllister.
1 CMSC104 Problem Solving and Computer Programming Fall 2008 Section 0101 John Y. Park.
Microprocessor and Assembly Language
Testing and Debugging.
Course Information Mark Stanovich Principles of Operating Systems
Software Design and Development
Using Visual Studio with C#
Andy Wang Operating Systems COP 4610 / CGS 5765
Debugging CSCE 121 J. Michael Moore.
Debugging at Scale.
When your program crashes
Accelerated Introduction to Computer Science
Problem Solving and Computer Programming
Welcome to the CMSC 104 Class!!!
Warmup Write a function to add two integer parameters and return the result.
Presentation transcript:

Warmup Write a function to add two integer parameters and return the result

CMSC 202 Lesson 1 Introduction

Welcome! Who am I? – Dana Wortman, Instructor What is this class? – CMSC 202: Computer Science 2 – Design and Development of Software – C++ by Torture (…I mean…no, that’s what I mean) Why should you care? – The “Gateway”

Tips for Success 1. Attend Class 2. Keep your Text handy 3. Read Carefully 4. Memorize the Coding Standard 5. Start EARLY (>= 15 hours per project!) 6. Learn a Linux editor 7. Ditch Visual C++ 8. Review the Resources page 9. Read the Blackboard discussion 10. Ask Questions

MOST IMPORTANT Save Early, Save Often Modular Composition – Write no more than 5 lines – Save – Compile – Test (optional) – Repeat

Submitting Work Use GL machines Log into: – linux.gl.umbc.edu Project 0 will: – Ensure the submit system is setup for you – Help you learn the submit system

Need Help? Teaching Assistants: – 2.5 Graduate Instructor – Me! Help Center – Open M-F 10-4 (ish?) TBA

What is Computer Science? The systematic study of computing systems and computation. The body of knowledge resulting from this discipline contains – theories for understanding computing systems and methods; – design methodology, algorithms, and tools; – methods for the testing of concepts; – methods of analysis and verification; and – knowledge representation and implementation.

Where does this class fit? CMSC 202 is primarily focused on: – Design methodology – Algorithms – Tools Why C++? – C++ is a superset of C – Objects: greater organization & easier maintenance – More than 50% of jobs in CS request C++

Debugging What is a bug? – Application does the unexpected – May not cause a failure (core dump, crash, etc.) Three primary types: – Syntax – caught by compiler – Modular – caught by the linker – Logic – caught by….uh oh…the developer!!!

Logic Bugs – Where’s the Bug? int a = 7; int b = 6; int c = 2; float d = a + b + c / 3.0;

Debugging Two basic strategies – Print each variable during run… quick for some bugs, but tedious – Use a debugging tool Preferred method! – GDB – Visual C++ Debugger – Eclipse CDT and other opensource C++ IDE/Debuggers

Essential Debugger Features Line by line code execution Stacktrace of previously called functions View variable values at any line View POINTER values at any line Stop the code at a certain point (breakpoint) Show line where program core-dumps

Challenge For next class: – Write a function that sorts an array that is passed as a parameter (your function can also accept the size of the array) – Use the FEWEST lines of code Can you do it in less than 10? Less than 5?