COSC 2P95. Introduction. Week 1. Brock University. Brock University (Week 1) Introduction 1 / 18

Similar documents
CSC209. Software Tools and Systems Programming.

CSC209. Software Tools and Systems Programming.

COSC 2P91. Introduction Part Deux. Week 1b. Brock University. Brock University (Week 1b) Introduction Part Deux 1 / 14

Advanced Programming Concepts. CIS 15 : Spring 2007

Week - 01 Lecture - 04 Downloading and installing Python

COSC 2P95. Procedural Abstraction. Week 3. Brock University. Brock University (Week 3) Procedural Abstraction 1 / 26

CS240: Programming in C

CS120 Computer Science I. Instructor: Jia Song

Windows Script Host Fundamentals

Spring 2018 NENG 202 Introduction to Computer Programming

Chapter01.fm Page 1 Monday, August 23, :52 PM. Part I of Change. The Mechanics. of Change

Introduction to Computer Systems

SEER AKADEMI LINUX PROGRAMMING AND SCRIPTINGPERL 7

Spring Modern Computer Science in a Unix Like Environment CIS c

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Sorting lower bound and Linear-time sorting Date: 9/19/17

CS 241 Data Organization. August 21, 2018

CS1 Lecture 13 Feb. 13, 2019

Administration Computers Software Algorithms Programming Languages

Project 1 Balanced binary

Starting to Program in C++ (Basics & I/O)

Programming and Data Structure

Chapter 1 Getting Started

VoIP INTERNET-BASED PHONE SYSTEMS CHOCK FULL OF FEATURES

Outlook is easier to use than you might think; it also does a lot more than. Fundamental Features: How Did You Ever Do without Outlook?

CSC209H Lecture 1. Dan Zingaro. January 7, 2015

Lecture Topics. Announcements. Today: Operating System Overview (Stallings, chapter , ) Next: Processes (Stallings, chapter

ENCM 339 Fall 2017: Editing and Running Programs in the Lab

Instructor: Craig Duckett. Lecture 04: Thursday, April 5, Relationships

Introduction to Computer Systems

(Refer Slide Time: 06:01)

COSC 2P91. Bringing it all together... Week 4b. Brock University. Brock University (Week 4b) Bringing it all together... 1 / 22

Foundations, Reasoning About Algorithms, and Design By Contract CMPSC 122

Administrivia. Minute Essay From 4/11

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet.

CS 326: Operating Systems. Lecture 1

Programming Data Structures and Algorithms Prof. Shankar Balachandran Department of Computer Science Indian Institute of Technology, Madras

Computer Science 210: Data Structures

C++ for Java Programmers

Getting your department account

Adding content to your Blackboard 9.1 class

Operating System Interaction via bash

Chapter 1 Introduction

Unix Tutorial Haverford Astronomy 2014/2015

Lecture 8: Structs & File I/O

CIS*1500 Introduction to Programming

COURSE OUTLINE. UNIX Programming 2014 Fall by Euiseong Seo

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG

CS 113: Introduction to

Pointers in C/C++ 1 Memory Addresses 2

Lecture 19 CSE August You taught me Language, and my profit on t is I know how to curse. William Shakspere, The Tempest, I, ii.

Design and Analysis of Algorithms Prof. Madhavan Mukund Chennai Mathematical Institute. Week 02 Module 06 Lecture - 14 Merge Sort: Analysis

EPORTFOLIO CHECK-IN & FINAL ASSIGNMENTS

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Lab #2 Physics 91SI Spring 2013

1 Installation (briefly)

CS 4349 Lecture August 21st, 2017

Announcements. CSCI 334: Principles of Programming Languages. Lecture 18: C/C++ Announcements. Announcements. Instructor: Dan Barowy

Lesson Share TEACHER'S NOTES LESSON SHARE. ing by Olya Sergeeva. Overview. Preparation. Procedure

COMP2100/2500 Lecture 17: Shell Programming II

CS 241 Data Organization using C

Manual Shell Scripting Linux Examples Pdf Tutorial

4. Java Project Design, Input Methods

Introduction to Linux

Embedded Linux Day 2

High Performance Computing Prof. Matthew Jacob Department of Computer Science and Automation Indian Institute of Science, Bangalore

Key questions to ask before commissioning any web designer to build your website.

LECTURE/ STUDY NOTES ON C

Lab 4: On Lists and Light Sabers

Semester 2, 2018: Lab 1

NOTE: All references to Python on this exam mean Python 3, so you should answer accordingly.

6.S096 Lecture 10 Course Recap, Interviews, Advanced Topics

Lecture 34 SDLC Phases and UML Diagrams

Lecture 09. Ada to Software Engineering. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

Final Examination. Preliminaries. Compilers (CS F) Due: 11 a.m., Friday, 20 December 2002

The C Programming Language

Introduction to File Systems

CPS221 Lecture: Operating System Functions

CS 370 The Pseudocode Programming Process D R. M I C H A E L J. R E A L E F A L L

CptS 360 (System Programming) Unit 2: Introduction to UNIX and Linux

Practical Programming Methodology

Comp 11 Lectures. Mike Shah. June 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures June 26, / 57

Review: Using Imported Code. What About the DrawingGizmo? Review: Classes and Object Instances. DrawingGizmo pencil; pencil = new DrawingGizmo();

THE AUDIENCE FOR THIS BOOK. 2 Ajax Construction Kit

CSci 4061 Introduction to Operating Systems. IPC: Basics, Pipes

(Refer Slide Time: 1:40)

9.2 Linux Essentials Exam Objectives

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

MA400: Financial Mathematics

6.001 Notes: Section 6.1

CS 390 Chapter 2 Homework Solutions

Usability Test Report: Bento results interface 1

Lecture Transcript While and Do While Statements in C++

Goals for this lecture. Lecture 4 Getting Started with ITK! Getting help. Assignments. Assignments, cont. Grading of assignments

Taking Civil 3D to the next level. July 14, 2017

Project Report Number Plate Recognition

Computer Science 2500 Computer Organization Rensselaer Polytechnic Institute Spring Topic Notes: C and Unix Overview

Hello World! Computer Programming for Kids and Other Beginners. Chapter 1. by Warren Sande and Carter Sande. Copyright 2009 Manning Publications

CS 300. Data Structures

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read)

Programming. Dr Ben Dudson University of York

Transcription:

COSC 2P95 Introduction Week 1 Brock University Brock University (Week 1) Introduction 1 / 18

Lectures and Labs Lectures are Thursdays, from 3pm 5pm (AS/STH 217) There are two lab sections Lab 1 is Mondays, from 3pm 5pm Lab 1 is Tuesdays, from 9am 11am Labs will be conducted in MCD205, booting into Linux. Brock University (Week 1) Introduction 2 / 18

Course Sections Both lecture sections are comprised of the same lecture material, lab content, and exercises. The distinction between COSC and MATH this year was only to potentially guide hiring preferences. Brock University (Week 1) Introduction 3 / 18

Evaluation Labs 10 10% Lab Exercises 10 50% Exam 40% Refer to the course outline for additional rules for the labs and exam. Brock University (Week 1) Introduction 4 / 18

Overview of Topics Across the term, we ll touch on several of the following subjects: An introduction to C/C++ Types, enums, operators, and expressions Flow control Procedures and functions Timing, threading, processes, and interprocess communication Streams and IO Compiling, make, and libraries Data structures and memory allocation Object orientation Templates Brock University (Week 1) Introduction 5 / 18

What is C++? (Surely you saw this question coming) This is actually a very difficult question to jump straight into. Why? Because the answer (arguably) is: A twisted corruption and defilement of C Helpful, eh? Brock University (Week 1) Introduction 6 / 18

What is C++? No, really, let s try to answer this one! C++ was a language created by Bjarne Stroustrup as a modification of the C language. Primarily, it added some basic convenience features, as well as the very obvious addition of Object Orientation*. This, of course, means we need to discuss C a bit. * Note: What one describes as Object Orientation, another could describe as a nonsensical and inconsistent mess of preprocessor directives and structs. You know, tomato-tomato (as if anyone actually pronounces it tomato!) Brock University (Week 1) Introduction 7 / 18

What is C? (Ritchie don t hurt me, don t hurt me, no more) C is often described (inaccurately) as a low-level language. It s true that C is a much lower-level language when compared to C#, Java, Python, Ada, etc. However, it really served as an early example of a portable high-level language. Do we know what portable means? Brock University (Week 1) Introduction 8 / 18

Architectures and Assembly (And why we d like to avoid them!) There are lots of reasons to not want to write programs in assembly. You get comparatively little for the same number of lines of code you write You need to explicitly write nearly everything out It s very difficult to read etc. etc. etc... But there s one thing that assembly started to introduce over writing in machine code: the code was somewhat portable. An instruction, or set of instructions, written once, can then be used to generate machine code for multiple devices, with multiple architectures/instruction sets. Consider something like a simple add statement. Maybe it s 16 bits, maybe it s 32. Who knows what the precise bit pattern is to invoke it? But all you need is to be able to spell add. Brock University (Week 1) Introduction 9 / 18

What does this have to do with C? This same principle extends to C, and quite fantastically. There are multiple standards of C (primarily based on the year in which they were formally released), but beyond that, with the right compiler, code written once can be targeted at numerous different platforms. Compare how this works in Python? In Java? Brock University (Week 1) Introduction 10 / 18

Okay, but what is C? C is a statically typed language created mostly by Dennis Ritchie. Yes, it was the language that came after B (from Bell Labs) Its history is rooted in use for telecommunication switching, and then the development of UNIX Ever wonder why switch statements always seemed so odd? That s why If you re interested in more of the history, your best bet would probably be to look up Ritchie and Stroustrup themselves. Brock University (Week 1) Introduction 11 / 18

So, that helps us understand C++? Kind of? C was a language intended to help control telephone hardware, that was slowly and incrementally adapted to eventually be used for the creation of an entire operating system. As software design progressed, C started to become more and more cumbersome (not to mention mildly unpredictable). Structs and function pointers could help, but that s not enough for a true evolution of software design. Brock University (Week 1) Introduction 12 / 18

So, C++ is a kludge? Again, kind of? A new language was created as a new iteration of the original. An increment of C, you could say. Like C + 1. As mentioned earlier, the most significant addition with C++ is the introduction of (a form of) Object Orientation This allowed developers to model systems with modern design patterns which, of course, also fostered the development of even newer design patterns Yes, it s a kludge. But it s a kludge that largely hides its kludginess (totes a word) from developers. That s enough. Brock University (Week 1) Introduction 13 / 18

So, why are we talking about C so much? Ask any bona fide C++ aficionado about how to use C++, and there s a good chance that the first thing they ll say will be don t think of C++ as C with Object Orientation. And that s the right opinion to have as a seasoned professional. To learn, though? We re going to be treating C++ as an expansion of C. (And, honestly, all popular languages have their own preferred patterns and style guides. Absolutely none of them are particularly useful until after you ve learned the basics) Brock University (Week 1) Introduction 14 / 18

What else? Our development platform for this course will be Linux. The labs have Red Hat installed, though really any Linux environment should really work comparably for our purposes. This includes sandcastle. With the right additional software added, you could also use cygwin or MobaXterm in Windows. Either way, part of this course will include using the Bash shell (Linux/Unix command-line). By the end, you should be at least reasonably comfortable doing basic tasks without a GUI. Brock University (Week 1) Introduction 15 / 18

Final thought on Bash I think we re mostly good to wait until the first lab for this, but are we all at least familiar with the basic appearance/usage of Bash? Do we know how to find help on commands? Do we have any idea what sorts of interesting things we can do with processes and piping? Do we know what ~ is? *??? \? cat? alias? touch? mkfifo? grep? (Actually, I m genuinely asking. If possible, it would be good to get an idea of how familiar you all are, or aren t, with the environment you ll be using. I m happy to fill in any gaps in the first lab) Brock University (Week 1) Introduction 16 / 18

Editor, compiler, IDEs, etc. We ll be using the Gnu compiler (gcc/g++) for this course. That means we ll mostly just be using a plaintext editor of some sort. Feel free to use an IDE s editor as a text editor if you prefer, but when we get to things like libraries and make, you ll definitely need to use the command-line entirely for compiling. Brock University (Week 1) Introduction 17 / 18

Questions? Comments? We ll start actually learning how to write programs next week. But for now, I m thinking we must have questions? Also, this is still a very new course, so if there s anything you d like to see done differently, please don t hesitate to make suggestions. Brock University (Week 1) Introduction 18 / 18