Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lesson 1:Introduction to Programming (Python/Java) Computer Science 1 Mr. Bernstein.

Similar presentations

Presentation on theme: "Lesson 1:Introduction to Programming (Python/Java) Computer Science 1 Mr. Bernstein."— Presentation transcript:

1 Lesson 1:Introduction to Programming (Python/Java) Computer Science 1 Mr. Bernstein

2 Hardware Vs Software Whats the difference? Hardware: Software:

3 Some Examples Hardware: Software:

4 The problem with Binary… Machine Code to the Rescue! As simple as Binary is, its very difficult for Hardware to use Machine CodeInstead…Hardware uses Machine Code - which translates into binary

5 The problem with Machine Code… Programming Languages to the Rescue! Ok, so Machine code is understood by hardware… But very difficult for humans to understand and write… So programming languages were created (semi-English) that translate into Machine Code! ZOMG!, now, code-monkeys like u and me can tell hardware what to do without having to learn Machine Code or Binary!!!

6 Quick History of Programming 1950s – Chaos Grammin! –No real structure very buggy and expensive –Cheaper to do stuff by hand(less expensive) –Not dependable locked away in big rooms with AC and lots of programmers to make sure they worked – Functional Grammin ! –Allowed programmers to create functions –Can write Bigger Programs Faster –Still difficult to find bugs –Example : Fortran

7 Quick History of Programming (continued) – Structured Grammin ! –Programmers finally figured out that they needed a lang that would be easier to debug –Instead of having random bits of info flying everywhere they structured it such that all data about a certain thing was all in one place. –So like, 4Eg, all info for a Car (year,color,model) would be stored in one place –If something went wrong with the car data, the grammers would know where to go –Example : C

8 Quick History of Programming (continued) 1990-present – OOP !(no its not the singular form of oops, its object oriented programming ) –Expanded the concept of Structured Programming into something called a class –Instead of just storing data, this class can actually do certain actions. 4Eg: A car can accelerate, break, turn, honk etc. –Ex: C++, Java, Python, Pascal

9 Some Terms Source Code –The Source Code is the actual code the programmer writes – Our source code will be in Python and Java Interpreter –A software program converts the source code to object code –Will only do so if there are no language errors in the source code Executable file –A software program that executes the commands you wrote in your source code

10 How Python/Java Works 1.Programmer types Source Code 2.Programmer runs Source code through a Compiler 3.Compiler/Interpreter checks for errors, if none, will produce Object Code 4.Programmer will run Object Code Through a Linker 5.Linker will create an Executable 6.Programmer can now run the Executable Software!

11 Python – Snake or Circus? Python comes from Monty Python Python has a lot of hidden references from Monty Python Flying Circus

12 Warmup from yesterday How does Python Work ?

13 Summary Not too long ago software was not that dependable Went from Chaos, to Functional, to Structured to OOP OOP is soo hott now. Now almost everything we do depends on reliable software. Java/Python is a lang that uses OOP SrcCode interpreter ObjectCode Linker Executable

Download ppt "Lesson 1:Introduction to Programming (Python/Java) Computer Science 1 Mr. Bernstein."

Similar presentations

Ads by Google