Why do some students find programming in C, so difficult? It involves thinking. We have been programmed by our respective school boards not to think.

Similar documents
CS 240 Fall 2015 Section 004. Alvin Chao, Professor

CSE 142. Lecture 1 Course Introduction; Basic Java. Portions Copyright 2008 by Pearson Education

CS 378 (Spring 2003) Linux Kernel Programming. Yongguang Zhang. Copyright 2003, Yongguang Zhang

Java Programming. Zheng-Liang Lu. Java 308 Spring Department of Computer Science & Information Engineering National Taiwan University

CS240: Programming in C

CSE 332: Data Abstractions. Ruth Anderson Spring 2014 Lecture 1

Outline. CIS 110: Introduction to Computer Programming. What is Computer Science? What is computer programming? What is computer science?

Introduction to Web Design & Computer Principles

Welcome to... CS113: Introduction to C

Lecture 7. Instructor: Craig Duckett OUTPUT

Object-Oriented Principles and Practice / C++

Lesson 2 page 1. ipad # 17 Font Size for Notepad (and other apps) Task: Program your default text to be smaller or larger for Notepad

CS 241 Data Organization. August 21, 2018

(0) introduction to the course. how to learn a programming language. (0) course structure

Think Java: How to Think Like a Computer Scientist, written by

C Programming for Engineers Introduction

Introduction to Computing using C++ Biomedical applications WELCOME TO CIS 1.5. Introduction to the course. Course structure

Eclipse CDT Tutorial. Eclipse CDT Homepage: Tutorial written by: James D Aniello

CS 102 Lecture 1. Syllabus, history, intro

CSC 172 Data Structures and Algorithms. Fall 2017 TuTh 3:25 pm 4:40 pm Aug 30- Dec 22 Hoyt Auditorium

Object-Oriented Programming CSCI-UA

CS 113: Introduction to

Introduc+on. General Information. General Information. General Information. General Information. General Information

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

LEARN JAVASCRIPT VISUALLY BY IVELIN DEMIROV DOWNLOAD EBOOK : LEARN JAVASCRIPT VISUALLY BY IVELIN DEMIROV PDF

The Oracle Academy Supports 1.5 million students in 95 countries

Java Programming. Zheng-Liang Lu. Java 301 Summer Department of Computer Science & Information Engineering National Taiwan University

CS 101: Computer Programming and Utilization. Abhiram Ranade

In this course, you need to use Pearson etext. Go to "Pearson etext and Video Notes".

Introduction to Computer Systems

Welcome. Orientation to online CPS102 Computer Science 2 (Java 2)

Welcome to Solving Problems with Computers I

Spring 2018 El Camino College E. Ambrosio. Course Syllabus

CS535: Interactive Computer Graphics

Computer Science 210: Data Structures

AP Computer Science A: Java Programming

CS 253: Intro to Systems Programming 1/21

CSC116: Introduction to Computing - Java

CS 3270 Mobile Development for Android Syllabus

WELCOME TO CS 16! Enrollment status: 117/ Problem Solving with Computers-I

CSC Operating Systems Fall Lecture - I Introduction. Tevfik Ko!ar. Louisiana State University. August 25 th, Contact Information

CS 240 Fall Mike Lam, Professor. Just-for-fun survey:

Menu. Class 1: Introduction. Staff. Course Structure and Expectations. Contacting Us. Contacting You

CSE 240 Introduction to Computer Architecture

Object-Oriented Programming Fall Robert Grimm, New York University

Introduction to Security

CSE341: Programming Languages Lecture 26 Course Victory Lap. Dan Grossman Spring 2016

378: Machine Organization and Assembly Language

CS103 Lecture 1 Slides. Introduction Mark Redekopp

contain a geometry package, and so on). All Java classes should belong to a package, and you specify that package by typing:

Oregon State University School of Electrical Engineering and Computer Science. CS 261 Recitation 1. Spring 2011

Why Use Graphs? Test Grade. Time Sleeping (Hrs) Time Sleeping (Hrs) Test Grade

KOMAR UNIVERSITY OF SCIENCE AND TECHNOLOGY (KUST)

EECS 282 Information Systems Design and Programming. Atul Prakash Professor, Computer Science and Engineering University of Michigan

Structured programming

Summer Assignment for AP Computer Science. Room 302

An Introduction To Programming With Visual Basic 2012 Ebooks Free

Object-Oriented Programming CSCI-UA

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

EECS 282 Information Systems Design and Programming. Atul Prakash Professor, Computer Science and Engineering University of Michigan

Multimedia-Programmierung Übung 3

Computer Programming First Year Lab Manual READ ONLINE

CSE 417 Practical Algorithms. (a.k.a. Algorithms & Computational Complexity)

Yup, left blank on purpose. You can use it to draw whatever you want :-)

COMP-202 Unit 0: Course Details

CSE 336. Introduction to Programming. for Electronic Commerce. Why You Need CSE336

In this course, you need to use Pearson etext. Go to "Pearson etext and Video Notes".

Database Programming - Section 16. Instructor Guide

CSE 114, Computer Science 1 Course Information. Spring 2017 Stony Brook University Instructor: Dr. Paul Fodor

Course Intro. CET360 Microprocessor Engineering: Course Intro. J. Sumey Spring Welcome to '360!

CS 6371: Advanced Programming Languages

CMSC201 Computer Science I for Majors

CS 111: Programming Fundamentals II

Administration Computers Software Algorithms Programming Languages

Computing and Programming

Computing and Programming. Notes for CSC The Beauty and Joy of Computing The University of North Carolina at Greensboro

Laboratory Assignment #3 Eclipse CDT

CS 241 Data Organization using C

Designing for humans

CS 3230 Object Oriented UI Development With Java Syllabus

Lecture 1 - Introduction (Class Notes)

CSC 015: FUNDAMENTALS OF COMPUTER SCIENCE I

COMP3221: Microprocessors and. Embedded Systems

Welcome to Introduction to Computer Science I

CIS Operating Systems Introduction. Professor Qiang Zeng

CS 101 : Introduction to Programming. Lecture 1 22/January/2018 Ashish Sureka

HOW TO USE CODE::BLOCKS IDE FOR COMPUTER PROGRAMMING LABORATORY SESSIONS

CSE 131B Compiler Construction II

Information Retrieval

Lecture 1: Introduction to Java

E40M. An Introduction to Making: What is EE?

Pseudo Code and Flow Charts. Chapter 1 Lesson 2

Lesson 1A - First Java Program HELLO WORLD With DEBUGGING examples. By John B. Owen All rights reserved 2011, revised 2015

Parameters and Objects

Database Management System Implementation. Who am I? Who is the teaching assistant? TR, 10:00am-11:20am NTRP B 140 Instructor: Dr.

Helping the Compiler Help You. Thomas Dy

CS 211 Programming I for Engineers

Basics Of Web Design: HTML5 And CSS3 Ebooks Gratuit

Introduction to C. CS 2060 Week 1. Prof. Jonathan Ventura. Outline Introduction Introduction to C Homework 1 C Coding Style Wrap-up

COMP Summer 2015 (A01) Jim (James) Young jimyoung.ca

Transcription:

In June 2018, I asked to a group of 18,738 students, Why do some students find programming in C, so difficult? The first answer was, It involves thinking. We have been programmed by our respective school boards not to think. Beautiful Computer Science! Venkatesh Vinayakarao

Also known as CS101, Introduction to Programming, Computer Programming, Computational Thinking, and Programming in C Computer Programming in C Venkatesh Vinayakarao Department of Computer Science and Engineering IIIT Sri City, Chittoor. venkatesh.v@iiits.in

Computational Thinking You Can Call Me Venkatesh Venky Venkat Vv Sir Mails addressing me as sir may not get a response Venkatesh Vinayakarao 3

About Me 2012 2013 Microsoft Yahoo PhD Nokia 2004 2007 IT Services Start Up 2002 MS (Info. Technology) Year 2000 IT Service Industry BE Computer Science (Y2K) Venkatesh Vinayakarao 4

Agenda About the Course Know the Course Know Your Instructor Your First C Program Hello World! Editing, Compiling and Executing the Program More C Programs Computational Thinking Venkatesh Vinayakarao 5

House Rules Put your phones in silent mode. Raise your hand if you have a question. For clarifications, you may interrupt anytime. If your question can wait, hold on to it till the end of the section. Maintain Silence. Venkatesh Vinayakarao 6

About the Course Course Objectives At the end of this course, you should be able to understand and write C programs up to 100 lines. Be able to think step-by-step, so as to write a computer program. Get proficient in developing and debugging programs written in C programming language Improve your problem solving skills Venkatesh Vinayakarao 7

About the Course Why Learn to Code? Venkatesh Vinayakarao 8

About the Course Why Learn to Code? Venkatesh Vinayakarao 9

About the Course Why Learn C? As on June 2018, 13828 jobs in 122 featured companies are asking for C programming skills! Venkatesh Vinayakarao 10

About the Course Researchers and Scientists Care for C! How to extend C so that programmers can write more secure and reliable C programs? Venkatesh Vinayakarao 11

About the Course Course Details Website: http://vvtesh.co.in/teaching/cp.html There are no pre-requisite courses for this course. Evaluation Instrument Max Marks Midterm 1 15% Midterm 2 15% Final Exam 30% Assignments (5 * 8% each) 40% Bonus Project (optional) 0% Venkatesh Vinayakarao 12

About the Course Project Optional. If you do it, You will not get any marks. It does not affect your grade. Then, why do it? Gives you an opportunity to interact more with your instructor. C is best learned by doing. More work More problems More knowledge More fun. Venkatesh Vinayakarao 13

About the Course Exams Nature of Exams All exams are of open-book type. Carry your own copy. Exams test your understanding (and aptitude) of C. To be successful Do not spend time memorizing definitions. Understand ideas and concepts. Practice. Practice. Practice. Venkatesh Vinayakarao 14

About the Course After the Class Slides will be available at the course website. Keep a watch for course schedule, assignments, and announcements. Venkatesh Vinayakarao 15

About the Course Books Venkatesh Vinayakarao 16

So, what did we discuss in Part I? House Rules About your Instructor Course Objectives Why Learn C? Course Details Project Exams Books Part II Write your first C program. Venkatesh Vinayakarao 17

Your First C Program Communicating with the Computer English, Hindi, Telugu, C, C++, Java, C#, Venkatesh Vinayakarao 18

Your First C Program What is C? A way to communicate to the computer Creator, C Programming Language C program with instructions to print Hello Dennis Ritchie 1941 2011 Turing Award (1983) Venkatesh Vinayakarao 19

Your First C Program Let us write a real C program Next Question: How to execute this program on a computer? Demo Venkatesh Vinayakarao 20

Your First C Program Editors You may use Notepad Code::Blocks Visual Studio Eclipse and many more editors We will use Code::Blocks in this course. Venkatesh Vinayakarao 21

Your First C Program Code::Blocks Installation Download the mingwsetup.exe version. It comes with the compiler. Venkatesh Vinayakarao 22

Your First C Program Our First Program and Its Output! Venkatesh Vinayakarao 23

Live Demo Venkatesh Vinayakarao 24

So, what did we discuss in Part II? What is C? Writing a C Program Compiling & Executing the Program Part III Computational Thinking: How to get good at writing programs? Venkatesh Vinayakarao 25

Computational Thinking A Game You can only issue one of the four commands: right, left, up, down. The robot here will follow your command. Take the robot from source to destination. Give Instructions. Answer: down, right, down, left, down, right, up, right, down, left, down, right, down. Venkatesh Vinayakarao 26

Computational Thinking Can you give me the instructions now? Which of these is the most likely set of instructions to take the robot to its destination (efficiently)? 1. Right, up, right, down, right, up, 2. Right, up, right, up, right, up, 3. Right, up, left, left, down, right, 4. Right, left, right, left, right, left, Venkatesh Vinayakarao 27

Computational Thinking Flowcharts Flowcharts give a step-by-step description of a workflow. For example, what do you do when a lamp doesn t work? Image Source: Wikipedia. Venkatesh Vinayakarao 28

Computational Thinking Another Flowchart Example Should I do my homework now? Start Do you have HW? Yes Do it. Done? Yes Stop No No You are lying. Venkatesh Vinayakarao 29

Computational Thinking Write a C Program to Calculate Simple Interest First, we need to know the formula Simple Interest, SI = P T R 100 Where P is Principal, T is Time, R is Rate Next, Step1: Let us draw the flowchart Step2: Write the C code Start Ask the user for the values of P, T and R Calculate SI Print SI Stop Venkatesh Vinayakarao 30

Computational Thinking Converting Flowchart to C Code Start Ask the user for the values of P, T and R Calculate SI Print SI Stop Venkatesh Vinayakarao 31

Computational Thinking Simple Programs Start Take Input Process Output Stop Venkatesh Vinayakarao 32

Computational Thinking Add Two Numbers Venkatesh Vinayakarao 33

About the Course Lab 1 Refer to course website. Venkatesh Vinayakarao 34

Computational Thinking Why is programming in C, so difficult? Surveyed 18,738 students Most were in final year, or have just completed their BTech in CSE. These are students aspiring to give the GATE exam, to join PSU, MTech or PhD programs. The first response it involves thinking & we have been programmed by our respective school boards to not think. Venkatesh Vinayakarao 35

Computational Thinking Interesting Responses I started coding in my 2nd sem & by the start of 5th sem I was better than most of my friends who were coding since school only because I was honest in learning. teachers are not taking the practical aspects of programming language with importance. the best way to make them understand is by relating it to real life things. One require continuity and a lot of patience to improve in coding skills. Most of us wants to do things that won't take much time. They don't want to struggle in a code which would take 3-4 hrs or more. Venkatesh Vinayakarao 36

Computational Thinking More Responses Everything individually sounds great but the correct use make the short circuit in brain. That is most of my fellowmate and I are bad programmers Some were already good before coming to college, some learnt stuff pretty fast, some like me who were left behind just gave up. most of them are afraid of syntax but not the algo. Venkatesh Vinayakarao 37

Computational Thinking Key Results from the Survey We are afraid of the syntax (instructions), but not the ideas. We should focus on the practical part. Boring to copy syntax from book. We are not trained to think. C programming requires a different way of thinking. It is a very new thing which makes students uncomfortable. Debugging errors is difficult. Patience is an important quality for a coder. Venkatesh Vinayakarao 38

So, what did we discuss in Part III? Instructions Flowcharts Converting flowchart to C code Why is C programming difficult? Questions? Hold on. There is one more slide. Venkatesh Vinayakarao 39

Computational Thinking What Can We Do Is only limited by our imagination Can you guess what this little C program will output? Demo Venkatesh Vinayakarao 40

Annexure Using Eclipse Venkatesh Vinayakarao 41

Your First C Program Install Eclipse CDT and MinGW Linux, Windows and Mac users Install the latest Eclipse IDE for C/C++ Developers Visit https://www.eclipse.org/downloads/packages/ For Windows Users Install the latest Minimalist GNU for Windows Visit http://mingw.org/. Venkatesh Vinayakarao 42

Your First C Program Create a new C Project Venkatesh Vinayakarao 43

Your First C Program Build and Run Venkatesh Vinayakarao 44