SlideShare a Scribd company logo
Introduction to Programming
Class 1
Paul Brebner
Paul.Brebner@nicta.com.au
CTO Performance Assurance Pty Ltd
Notes
• Slides, exercises, example programs, etc for an Introductory
High School Programming Elective (Years 9 and 10)
• No prior experience assumed
• Ran for 2 school terms
• Required 1 computer per 2 students, a computer and
projector for the presenter
• Based on the language Processing, www.processing.org
• Each class was about 1.5 hours long, included talk and
supervised exercises, there was also another 45 minute
class per week which was just for practical exercises
• Assumes that there is reasonable IT support, that students
can download and run things from the internet, and that
they can save, share, and load programs
Who am I?
• Computer Scientist
– Study of computers and computing
– The theory of computing
• What is a
– Programmer? Software Architect? Software
Engineer? IT person?
• History of computers (mine)
Colossus – 70 years old, 1st programmable
electronic (valve) computer
“My” computers
• 1978, Burroughs B6700, > $1M
• Mainframe Bank computer with “punch cards”
2 = Card reader
First home made
• Mini-scamp microcomputer – 1979, $200
• Microprocessor (Computer on a single chip)
• 256 Bytes RAM, 1MHz CPU, Input = switches,
output = LEDs
VAX 11/780 (1980)
VAX specs
• 1MByte RAM (Core memory)
• 1MHz CPU, $250,000, lots of circuit boards
Home designed & made
• 1984
• $1,000, 64KBytes RAM
• 6809 CPU (2 MHz)
• 8” floppy disc
• Programmed for
– music synthesiser
Amiga 500
• Game machine!
– 1987, $1,000
– 0.5MByte RAM
– 7MHz CPU
– Colour graphics and sound
– Mouse
– 3.5 inch floppy disk
Introduction to programming - class 1
Intel 486
• 1993, homebuilt, 50MHz CPU, $3,000
Basic computer architecture
Address 0
Address 1
Address 2
Address 3
MEMORY
CPU
BUS
Address 100
Address 101
DISPLAY
1 FETCH
PC
IR 2 DECODE
3 EXECUTE
LOADR1
LOADR2
STORE
ADDER
END
Registers
R1
R2
Simulation game
• Everyone has a role:
– Fetch
– Decode
– Execute
• LOADR1, LOADR2, STORE, ADDER, END
– BUS
– MEMORY
– DISPLAY
• Explain Registers and roles
Simulation
• Here’s the program in “binary”
– 0101
– 1000
– 0110
– 100
– 1010
– 0101
– 1001
– 1101
– 1010
– 1111
Simulation: What will it do? Displays
two characters...
• Here’s the program in “English” (some hidden)
– LOADR1
– ?
– LOADR2
– 100
– STORE
– LOADR1
– ?
– INCR2
– STORE
– END
Introduction to programming - class 1
Problem!
• Machine code programs
– In binary – too hard to read/write
– Hard to write large (> 1000 lines?) programs
– Only processes binary numbers – what about decimals?
text? Images?
– Error prone
– Not portable – every CPU type has a different instruction
set, have to rewrite the program for every CPU type.
– Solution
• High level programming languages
– E.g. Fortran, COBOL, LISP, Prolog, Pascal, C, C++, C#, Java, Javascript,
Processing
High level languages
• High level programming language
– e.g. Print(“hi”)
– Translated (Compiled) into machine code
– Or run on a “Virtual machine”
– Java “write once, run everywhere”
• Runs on a JVM (Java Virtual Machine).
• Can run on anything from a mobile phone to a super-
computer
– “Processing” – a high level graphics language
running on top of Java!
Processing layers
• Processing
– Runs on
• Java
– Runs on
• JVM
– Runs on
• Actual CPU
Lines of Code
• How big are programs? 1 LOC – 100M LOC
• How many lines of code a day is normal?
– 10 LOC a day per programmer (famous figure)
– As programs get bigger it gets harder to get them to work correctly
• Programming includes other critical tasks
– Management (planning for what needs doing when by who)
– Specification (what should the program do?)
– Design (how should the program do it?)
– Programming (writing the program)
– Reviewing (reading the program – often someone else’s program – to check it)
– Integration (getting your part of the program working with other parts)
– Testing (does the program do what is should do? Does it have bugs?)
– Debugging (getting rid of the bugs – no program is ever bug free)
– Deployment (putting the program where it needs to be to run)
– Maintenance (keeping it running, upgrading it)
– Retirement (removing the program once it is no longer needed)
– Documentation (describing how the program works so someone else can understand it)
Introduction to programming - class 1
Introduction to programming - class 1
Introduction to programming - class 1
Introduction to programming - class 1
Introduction to programming - class 1
Processing Example: Patterns
// Move the mouse around. The faster you go the bigger the ellipse
// This is a COMMENT
// Primitive processing function: setup() is called once to create screen size and colour
void setup() {
size(640, 360);
background(102);
}
// Primitive processing function: draw() repeats forever
void draw() {
variableEllipse(mouseX, mouseY, pmouseX, pmouseY);
}
// a new function! draws a LARGER ellipse the fasterrrrrrrrrrrrrrrr the mouse speed
// speed is computed as the distance between current and previous positions
void variableEllipse(int x, int y, int px, int py) {
float speed = abs(x-px) + abs(y-py);
stroke(speed); // primitive – sets the drawing colour (float type = white to black)
ellipse(x, y, speed, speed); // primitive – draws an oval at position x, y, and height and width
}
Ad

More Related Content

What's hot (8)

Computer Virus
Computer VirusComputer Virus
Computer Virus
PravinGhosekar
 
Introduction to Computers Lecture # 5
Introduction to Computers Lecture # 5Introduction to Computers Lecture # 5
Introduction to Computers Lecture # 5
Sehrish Rafiq
 
C Programming Language Lesson 1 Intro
C Programming Language Lesson 1 IntroC Programming Language Lesson 1 Intro
C Programming Language Lesson 1 Intro
Mizanul Hasan
 
Computer system
Computer systemComputer system
Computer system
Meenu Ahlawat
 
computer Assigment
 computer  Assigment computer  Assigment
computer Assigment
Shubha Mazumder
 
Computer software and operating system
Computer software and operating systemComputer software and operating system
Computer software and operating system
sonykhan3
 
R001 Understanding Computer Systems
R001 Understanding Computer SystemsR001 Understanding Computer Systems
R001 Understanding Computer Systems
Mrjonesit
 
computer programing and utilization
computer programing and utilizationcomputer programing and utilization
computer programing and utilization
Tushar Limbasiya
 
Introduction to Computers Lecture # 5
Introduction to Computers Lecture # 5Introduction to Computers Lecture # 5
Introduction to Computers Lecture # 5
Sehrish Rafiq
 
C Programming Language Lesson 1 Intro
C Programming Language Lesson 1 IntroC Programming Language Lesson 1 Intro
C Programming Language Lesson 1 Intro
Mizanul Hasan
 
Computer software and operating system
Computer software and operating systemComputer software and operating system
Computer software and operating system
sonykhan3
 
R001 Understanding Computer Systems
R001 Understanding Computer SystemsR001 Understanding Computer Systems
R001 Understanding Computer Systems
Mrjonesit
 
computer programing and utilization
computer programing and utilizationcomputer programing and utilization
computer programing and utilization
Tushar Limbasiya
 

Similar to Introduction to programming - class 1 (20)

Assembly Langauge Assembly Langauge Assembly Langauge
Assembly Langauge Assembly Langauge Assembly LangaugeAssembly Langauge Assembly Langauge Assembly Langauge
Assembly Langauge Assembly Langauge Assembly Langauge
mustafkhalid
 
Basics of Computation and Modeling - Lecture 2 in Introduction to Computation...
Basics of Computation and Modeling - Lecture 2 in Introduction to Computation...Basics of Computation and Modeling - Lecture 2 in Introduction to Computation...
Basics of Computation and Modeling - Lecture 2 in Introduction to Computation...
Lauri Eloranta
 
Introduction to the Programing Fundamentals Course.ppt
Introduction to the Programing Fundamentals Course.pptIntroduction to the Programing Fundamentals Course.ppt
Introduction to the Programing Fundamentals Course.ppt
season12id
 
Unit 1 computer concepts
Unit 1   computer conceptsUnit 1   computer concepts
Unit 1 computer concepts
Mithun DSouza
 
01CHAP_1.PPT
01CHAP_1.PPT01CHAP_1.PPT
01CHAP_1.PPT
ManoRanjani30
 
computer fundamentals.pptx
computer fundamentals.pptxcomputer fundamentals.pptx
computer fundamentals.pptx
ZaidKhan530164
 
Introduction to Computer, Programming languages , Networks and Internet.pptx
Introduction to Computer, Programming languages , Networks and Internet.pptxIntroduction to Computer, Programming languages , Networks and Internet.pptx
Introduction to Computer, Programming languages , Networks and Internet.pptx
SheharBano86
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
Amity University | FMS - DU | IMT | Stratford University | KKMI International Institute | AIMA | DTU
 
ch01_overview computer science and engineering.pdf
ch01_overview computer science and engineering.pdfch01_overview computer science and engineering.pdf
ch01_overview computer science and engineering.pdf
nazibulnabil
 
lecture Slides - Week 1.programming fundamentals
lecture Slides - Week 1.programming fundamentalslecture Slides - Week 1.programming fundamentals
lecture Slides - Week 1.programming fundamentals
fazayn927
 
Introduction To Dart.pptx
Introduction To Dart.pptxIntroduction To Dart.pptx
Introduction To Dart.pptx
AhmedAshraf25941
 
It seminar 1.0
It seminar 1.0It seminar 1.0
It seminar 1.0
GiulianoVesci
 
C++ programming languages lectures
C++ programming languages lectures C++ programming languages lectures
C++ programming languages lectures
jabirMemon
 
Introduction to computers and programming languages
Introduction to computers and programming languages Introduction to computers and programming languages
Introduction to computers and programming languages
binoysatheesh
 
Lecture-1-Introduction-Sep02-2018 (1).pptx
Lecture-1-Introduction-Sep02-2018 (1).pptxLecture-1-Introduction-Sep02-2018 (1).pptx
Lecture-1-Introduction-Sep02-2018 (1).pptx
jamesaaronguevarra1
 
Lecture-1-Introduction-Sep02-2018 (1).pptx
Lecture-1-Introduction-Sep02-2018 (1).pptxLecture-1-Introduction-Sep02-2018 (1).pptx
Lecture-1-Introduction-Sep02-2018 (1).pptx
jamesaaronguevarra1
 
System softare
System softareSystem softare
System softare
Dr. C.V. Suresh Babu
 
Computer Programming By Prof.(Dr.) Anand K. Tripathi ,Mrs Monika Tripathi
Computer Programming By Prof.(Dr.) Anand K. Tripathi ,Mrs Monika TripathiComputer Programming By Prof.(Dr.) Anand K. Tripathi ,Mrs Monika Tripathi
Computer Programming By Prof.(Dr.) Anand K. Tripathi ,Mrs Monika Tripathi
Prof. (Dr.) Anand K. Tripathi
 
chapter _3.pptx Programming Language in DSS
chapter _3.pptx Programming Language in DSSchapter _3.pptx Programming Language in DSS
chapter _3.pptx Programming Language in DSS
KeenboonAsaffaa
 
Ic lecture8
Ic lecture8 Ic lecture8
Ic lecture8
AttaullahRahimoon
 
Assembly Langauge Assembly Langauge Assembly Langauge
Assembly Langauge Assembly Langauge Assembly LangaugeAssembly Langauge Assembly Langauge Assembly Langauge
Assembly Langauge Assembly Langauge Assembly Langauge
mustafkhalid
 
Basics of Computation and Modeling - Lecture 2 in Introduction to Computation...
Basics of Computation and Modeling - Lecture 2 in Introduction to Computation...Basics of Computation and Modeling - Lecture 2 in Introduction to Computation...
Basics of Computation and Modeling - Lecture 2 in Introduction to Computation...
Lauri Eloranta
 
Introduction to the Programing Fundamentals Course.ppt
Introduction to the Programing Fundamentals Course.pptIntroduction to the Programing Fundamentals Course.ppt
Introduction to the Programing Fundamentals Course.ppt
season12id
 
Unit 1 computer concepts
Unit 1   computer conceptsUnit 1   computer concepts
Unit 1 computer concepts
Mithun DSouza
 
computer fundamentals.pptx
computer fundamentals.pptxcomputer fundamentals.pptx
computer fundamentals.pptx
ZaidKhan530164
 
Introduction to Computer, Programming languages , Networks and Internet.pptx
Introduction to Computer, Programming languages , Networks and Internet.pptxIntroduction to Computer, Programming languages , Networks and Internet.pptx
Introduction to Computer, Programming languages , Networks and Internet.pptx
SheharBano86
 
ch01_overview computer science and engineering.pdf
ch01_overview computer science and engineering.pdfch01_overview computer science and engineering.pdf
ch01_overview computer science and engineering.pdf
nazibulnabil
 
lecture Slides - Week 1.programming fundamentals
lecture Slides - Week 1.programming fundamentalslecture Slides - Week 1.programming fundamentals
lecture Slides - Week 1.programming fundamentals
fazayn927
 
C++ programming languages lectures
C++ programming languages lectures C++ programming languages lectures
C++ programming languages lectures
jabirMemon
 
Introduction to computers and programming languages
Introduction to computers and programming languages Introduction to computers and programming languages
Introduction to computers and programming languages
binoysatheesh
 
Lecture-1-Introduction-Sep02-2018 (1).pptx
Lecture-1-Introduction-Sep02-2018 (1).pptxLecture-1-Introduction-Sep02-2018 (1).pptx
Lecture-1-Introduction-Sep02-2018 (1).pptx
jamesaaronguevarra1
 
Lecture-1-Introduction-Sep02-2018 (1).pptx
Lecture-1-Introduction-Sep02-2018 (1).pptxLecture-1-Introduction-Sep02-2018 (1).pptx
Lecture-1-Introduction-Sep02-2018 (1).pptx
jamesaaronguevarra1
 
Computer Programming By Prof.(Dr.) Anand K. Tripathi ,Mrs Monika Tripathi
Computer Programming By Prof.(Dr.) Anand K. Tripathi ,Mrs Monika TripathiComputer Programming By Prof.(Dr.) Anand K. Tripathi ,Mrs Monika Tripathi
Computer Programming By Prof.(Dr.) Anand K. Tripathi ,Mrs Monika Tripathi
Prof. (Dr.) Anand K. Tripathi
 
chapter _3.pptx Programming Language in DSS
chapter _3.pptx Programming Language in DSSchapter _3.pptx Programming Language in DSS
chapter _3.pptx Programming Language in DSS
KeenboonAsaffaa
 
Ad

More from Paul Brebner (20)

Streaming More For Less With Apache Kafka Tiered Storage
Streaming More For Less With Apache Kafka Tiered StorageStreaming More For Less With Apache Kafka Tiered Storage
Streaming More For Less With Apache Kafka Tiered Storage
Paul Brebner
 
30 Of My Favourite Open Source Technologies In 30 Minutes
30 Of My Favourite Open Source Technologies In 30 Minutes30 Of My Favourite Open Source Technologies In 30 Minutes
30 Of My Favourite Open Source Technologies In 30 Minutes
Paul Brebner
 
Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...
Paul Brebner
 
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Paul Brebner
 
Architecting Applications With Multiple Open Source Big Data Technologies
Architecting Applications With Multiple Open Source Big Data TechnologiesArchitecting Applications With Multiple Open Source Big Data Technologies
Architecting Applications With Multiple Open Source Big Data Technologies
Paul Brebner
 
The Impact of Hardware and Software Version Changes on Apache Kafka Performan...
The Impact of Hardware and Software Version Changes on Apache Kafka Performan...The Impact of Hardware and Software Version Changes on Apache Kafka Performan...
The Impact of Hardware and Software Version Changes on Apache Kafka Performan...
Paul Brebner
 
Apache ZooKeeper and Apache Curator: Meet the Dining Philosophers
Apache ZooKeeper and Apache Curator: Meet the Dining PhilosophersApache ZooKeeper and Apache Curator: Meet the Dining Philosophers
Apache ZooKeeper and Apache Curator: Meet the Dining Philosophers
Paul Brebner
 
Spinning your Drones with Cadence Workflows and Apache Kafka
Spinning your Drones with Cadence Workflows and Apache KafkaSpinning your Drones with Cadence Workflows and Apache Kafka
Spinning your Drones with Cadence Workflows and Apache Kafka
Paul Brebner
 
Change Data Capture (CDC) With Kafka Connect® and the Debezium PostgreSQL Sou...
Change Data Capture (CDC) With Kafka Connect® and the Debezium PostgreSQL Sou...Change Data Capture (CDC) With Kafka Connect® and the Debezium PostgreSQL Sou...
Change Data Capture (CDC) With Kafka Connect® and the Debezium PostgreSQL Sou...
Paul Brebner
 
Scaling Open Source Big Data Cloud Applications is Easy/Hard
Scaling Open Source Big Data Cloud Applications is Easy/HardScaling Open Source Big Data Cloud Applications is Easy/Hard
Scaling Open Source Big Data Cloud Applications is Easy/Hard
Paul Brebner
 
OPEN Talk: Scaling Open Source Big Data Cloud Applications is Easy/Hard
OPEN Talk: Scaling Open Source Big Data Cloud Applications is Easy/HardOPEN Talk: Scaling Open Source Big Data Cloud Applications is Easy/Hard
OPEN Talk: Scaling Open Source Big Data Cloud Applications is Easy/Hard
Paul Brebner
 
A Visual Introduction to Apache Kafka
A Visual Introduction to Apache KafkaA Visual Introduction to Apache Kafka
A Visual Introduction to Apache Kafka
Paul Brebner
 
Massively Scalable Real-time Geospatial Anomaly Detection with Apache Kafka a...
Massively Scalable Real-time Geospatial Anomaly Detection with Apache Kafka a...Massively Scalable Real-time Geospatial Anomaly Detection with Apache Kafka a...
Massively Scalable Real-time Geospatial Anomaly Detection with Apache Kafka a...
Paul Brebner
 
Building a real-time data processing pipeline using Apache Kafka, Kafka Conne...
Building a real-time data processing pipeline using Apache Kafka, Kafka Conne...Building a real-time data processing pipeline using Apache Kafka, Kafka Conne...
Building a real-time data processing pipeline using Apache Kafka, Kafka Conne...
Paul Brebner
 
Grid Middleware – Principles, Practice and Potential
Grid Middleware – Principles, Practice and PotentialGrid Middleware – Principles, Practice and Potential
Grid Middleware – Principles, Practice and Potential
Paul Brebner
 
Grid middleware is easy to install, configure, secure, debug and manage acros...
Grid middleware is easy to install, configure, secure, debug and manage acros...Grid middleware is easy to install, configure, secure, debug and manage acros...
Grid middleware is easy to install, configure, secure, debug and manage acros...
Paul Brebner
 
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Paul Brebner
 
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Paul Brebner
 
Melbourne Big Data Meetup Talk: Scaling a Real-Time Anomaly Detection Applica...
Melbourne Big Data Meetup Talk: Scaling a Real-Time Anomaly Detection Applica...Melbourne Big Data Meetup Talk: Scaling a Real-Time Anomaly Detection Applica...
Melbourne Big Data Meetup Talk: Scaling a Real-Time Anomaly Detection Applica...
Paul Brebner
 
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Paul Brebner
 
Streaming More For Less With Apache Kafka Tiered Storage
Streaming More For Less With Apache Kafka Tiered StorageStreaming More For Less With Apache Kafka Tiered Storage
Streaming More For Less With Apache Kafka Tiered Storage
Paul Brebner
 
30 Of My Favourite Open Source Technologies In 30 Minutes
30 Of My Favourite Open Source Technologies In 30 Minutes30 Of My Favourite Open Source Technologies In 30 Minutes
30 Of My Favourite Open Source Technologies In 30 Minutes
Paul Brebner
 
Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...
Paul Brebner
 
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Paul Brebner
 
Architecting Applications With Multiple Open Source Big Data Technologies
Architecting Applications With Multiple Open Source Big Data TechnologiesArchitecting Applications With Multiple Open Source Big Data Technologies
Architecting Applications With Multiple Open Source Big Data Technologies
Paul Brebner
 
The Impact of Hardware and Software Version Changes on Apache Kafka Performan...
The Impact of Hardware and Software Version Changes on Apache Kafka Performan...The Impact of Hardware and Software Version Changes on Apache Kafka Performan...
The Impact of Hardware and Software Version Changes on Apache Kafka Performan...
Paul Brebner
 
Apache ZooKeeper and Apache Curator: Meet the Dining Philosophers
Apache ZooKeeper and Apache Curator: Meet the Dining PhilosophersApache ZooKeeper and Apache Curator: Meet the Dining Philosophers
Apache ZooKeeper and Apache Curator: Meet the Dining Philosophers
Paul Brebner
 
Spinning your Drones with Cadence Workflows and Apache Kafka
Spinning your Drones with Cadence Workflows and Apache KafkaSpinning your Drones with Cadence Workflows and Apache Kafka
Spinning your Drones with Cadence Workflows and Apache Kafka
Paul Brebner
 
Change Data Capture (CDC) With Kafka Connect® and the Debezium PostgreSQL Sou...
Change Data Capture (CDC) With Kafka Connect® and the Debezium PostgreSQL Sou...Change Data Capture (CDC) With Kafka Connect® and the Debezium PostgreSQL Sou...
Change Data Capture (CDC) With Kafka Connect® and the Debezium PostgreSQL Sou...
Paul Brebner
 
Scaling Open Source Big Data Cloud Applications is Easy/Hard
Scaling Open Source Big Data Cloud Applications is Easy/HardScaling Open Source Big Data Cloud Applications is Easy/Hard
Scaling Open Source Big Data Cloud Applications is Easy/Hard
Paul Brebner
 
OPEN Talk: Scaling Open Source Big Data Cloud Applications is Easy/Hard
OPEN Talk: Scaling Open Source Big Data Cloud Applications is Easy/HardOPEN Talk: Scaling Open Source Big Data Cloud Applications is Easy/Hard
OPEN Talk: Scaling Open Source Big Data Cloud Applications is Easy/Hard
Paul Brebner
 
A Visual Introduction to Apache Kafka
A Visual Introduction to Apache KafkaA Visual Introduction to Apache Kafka
A Visual Introduction to Apache Kafka
Paul Brebner
 
Massively Scalable Real-time Geospatial Anomaly Detection with Apache Kafka a...
Massively Scalable Real-time Geospatial Anomaly Detection with Apache Kafka a...Massively Scalable Real-time Geospatial Anomaly Detection with Apache Kafka a...
Massively Scalable Real-time Geospatial Anomaly Detection with Apache Kafka a...
Paul Brebner
 
Building a real-time data processing pipeline using Apache Kafka, Kafka Conne...
Building a real-time data processing pipeline using Apache Kafka, Kafka Conne...Building a real-time data processing pipeline using Apache Kafka, Kafka Conne...
Building a real-time data processing pipeline using Apache Kafka, Kafka Conne...
Paul Brebner
 
Grid Middleware – Principles, Practice and Potential
Grid Middleware – Principles, Practice and PotentialGrid Middleware – Principles, Practice and Potential
Grid Middleware – Principles, Practice and Potential
Paul Brebner
 
Grid middleware is easy to install, configure, secure, debug and manage acros...
Grid middleware is easy to install, configure, secure, debug and manage acros...Grid middleware is easy to install, configure, secure, debug and manage acros...
Grid middleware is easy to install, configure, secure, debug and manage acros...
Paul Brebner
 
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Paul Brebner
 
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Paul Brebner
 
Melbourne Big Data Meetup Talk: Scaling a Real-Time Anomaly Detection Applica...
Melbourne Big Data Meetup Talk: Scaling a Real-Time Anomaly Detection Applica...Melbourne Big Data Meetup Talk: Scaling a Real-Time Anomaly Detection Applica...
Melbourne Big Data Meetup Talk: Scaling a Real-Time Anomaly Detection Applica...
Paul Brebner
 
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Paul Brebner
 
Ad

Recently uploaded (20)

P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 

Introduction to programming - class 1

  • 1. Introduction to Programming Class 1 Paul Brebner [email protected] CTO Performance Assurance Pty Ltd
  • 2. Notes • Slides, exercises, example programs, etc for an Introductory High School Programming Elective (Years 9 and 10) • No prior experience assumed • Ran for 2 school terms • Required 1 computer per 2 students, a computer and projector for the presenter • Based on the language Processing, www.processing.org • Each class was about 1.5 hours long, included talk and supervised exercises, there was also another 45 minute class per week which was just for practical exercises • Assumes that there is reasonable IT support, that students can download and run things from the internet, and that they can save, share, and load programs
  • 3. Who am I? • Computer Scientist – Study of computers and computing – The theory of computing • What is a – Programmer? Software Architect? Software Engineer? IT person? • History of computers (mine)
  • 4. Colossus – 70 years old, 1st programmable electronic (valve) computer
  • 5. “My” computers • 1978, Burroughs B6700, > $1M • Mainframe Bank computer with “punch cards”
  • 6. 2 = Card reader
  • 7. First home made • Mini-scamp microcomputer – 1979, $200 • Microprocessor (Computer on a single chip) • 256 Bytes RAM, 1MHz CPU, Input = switches, output = LEDs
  • 9. VAX specs • 1MByte RAM (Core memory) • 1MHz CPU, $250,000, lots of circuit boards
  • 10. Home designed & made • 1984 • $1,000, 64KBytes RAM • 6809 CPU (2 MHz) • 8” floppy disc • Programmed for – music synthesiser
  • 11. Amiga 500 • Game machine! – 1987, $1,000 – 0.5MByte RAM – 7MHz CPU – Colour graphics and sound – Mouse – 3.5 inch floppy disk
  • 13. Intel 486 • 1993, homebuilt, 50MHz CPU, $3,000
  • 14. Basic computer architecture Address 0 Address 1 Address 2 Address 3 MEMORY CPU BUS Address 100 Address 101 DISPLAY 1 FETCH PC IR 2 DECODE 3 EXECUTE LOADR1 LOADR2 STORE ADDER END Registers R1 R2
  • 15. Simulation game • Everyone has a role: – Fetch – Decode – Execute • LOADR1, LOADR2, STORE, ADDER, END – BUS – MEMORY – DISPLAY • Explain Registers and roles
  • 16. Simulation • Here’s the program in “binary” – 0101 – 1000 – 0110 – 100 – 1010 – 0101 – 1001 – 1101 – 1010 – 1111
  • 17. Simulation: What will it do? Displays two characters... • Here’s the program in “English” (some hidden) – LOADR1 – ? – LOADR2 – 100 – STORE – LOADR1 – ? – INCR2 – STORE – END
  • 19. Problem! • Machine code programs – In binary – too hard to read/write – Hard to write large (> 1000 lines?) programs – Only processes binary numbers – what about decimals? text? Images? – Error prone – Not portable – every CPU type has a different instruction set, have to rewrite the program for every CPU type. – Solution • High level programming languages – E.g. Fortran, COBOL, LISP, Prolog, Pascal, C, C++, C#, Java, Javascript, Processing
  • 20. High level languages • High level programming language – e.g. Print(“hi”) – Translated (Compiled) into machine code – Or run on a “Virtual machine” – Java “write once, run everywhere” • Runs on a JVM (Java Virtual Machine). • Can run on anything from a mobile phone to a super- computer – “Processing” – a high level graphics language running on top of Java!
  • 21. Processing layers • Processing – Runs on • Java – Runs on • JVM – Runs on • Actual CPU
  • 22. Lines of Code • How big are programs? 1 LOC – 100M LOC • How many lines of code a day is normal? – 10 LOC a day per programmer (famous figure) – As programs get bigger it gets harder to get them to work correctly • Programming includes other critical tasks – Management (planning for what needs doing when by who) – Specification (what should the program do?) – Design (how should the program do it?) – Programming (writing the program) – Reviewing (reading the program – often someone else’s program – to check it) – Integration (getting your part of the program working with other parts) – Testing (does the program do what is should do? Does it have bugs?) – Debugging (getting rid of the bugs – no program is ever bug free) – Deployment (putting the program where it needs to be to run) – Maintenance (keeping it running, upgrading it) – Retirement (removing the program once it is no longer needed) – Documentation (describing how the program works so someone else can understand it)
  • 28. Processing Example: Patterns // Move the mouse around. The faster you go the bigger the ellipse // This is a COMMENT // Primitive processing function: setup() is called once to create screen size and colour void setup() { size(640, 360); background(102); } // Primitive processing function: draw() repeats forever void draw() { variableEllipse(mouseX, mouseY, pmouseX, pmouseY); } // a new function! draws a LARGER ellipse the fasterrrrrrrrrrrrrrrr the mouse speed // speed is computed as the distance between current and previous positions void variableEllipse(int x, int y, int px, int py) { float speed = abs(x-px) + abs(y-py); stroke(speed); // primitive – sets the drawing colour (float type = white to black) ellipse(x, y, speed, speed); // primitive – draws an oval at position x, y, and height and width }