SlideShare a Scribd company logo
1 of 30
COBOL Background
 Released in 1959
 Grace Hopper
 Industry, universities, and government collaboration
 Cold War pressures
 80% of business transactions
 65% of all code is in COBOL
COBOL – Why?
 Software Lifecycle
 Cheaper to maintain
 Y2K
 Self-documenting code
 Verbose
 “IF a < b AND > c …”
 Divisions
COBOL – Why?
 Divisions
 Identification Division
 Environment Division
 Data Division
 Procedure Division
COBOL – Data Division
 Data Division
 Pictures
 9 = digit
 X = any character
 A = alphabetic character
 V = decimal point position
 S = sign
 Repeats
 PIC 9 (4) = 9999
COBOL – Groups and Elementary data
COBOL
 Reliability
 Stood test of time
 Has “ALTER X TO PROCEED TO Y” (a negative)
 Uses GOTO statements (a negative)
 Today
 Cross platform: OpenCOBOL C translation
 IDEs (Net Express)
COBOL - Summary
 Readability
 Writability
 Reliability
 Portability
LISP
 LISt Processing
 List-based language
 2nd High-level language
 1958 – John McCarthy for MIT
LISP - Syntax
 Function call: “(fun arg1 arg2)”
 (+ 1 2 3)
 Lists
 (list ‘3 ‘7 ‘apples)
 (3 7 apples)
 (list ‘13 list(‘3 ‘5))
 (13 (3 5))
LISP – Innovations
 Garbage Collection
 If else statements
 Recursion
LISP – Linked Lists
 Car (first)
 Cdr (rest)
LISP - Examples
 If then else
 (if nil
(list ‘2 ‘3)
(list ‘5 ‘6))
 One line variant:
 (if nil (list ‘2 ‘3) (list ‘5 ‘6))
LISP - Examples
 Factorial
 (defun factorial (n)
(if (<= n 1)
1
(* n (factorial (- n 1)))))
 One line variant:
 (defun factorial (n) (if (<= n 1) 1 (* n (factorial (- n 1)))))
LISP - Examples
 Recursive List Size
 (defun recursiveSize (L)
(if (null L)
0
(1+ (recursiveSize(rest L)))))
LISP - Examples
 Recursive List Sum with “LET”
 (defun sum (L)
(if (null L)
0
(let
((S1 (first L))
(S2 (sum (rest L))))
+ S1 S2)))
LISP- Summary and Comparison
 Readability
 Writability
 Reliability
Python
 Developed early 1990’s
 Guido van Rossum
 ABC language
 Python 2.0
 2000
 Community-supported -> reliability
 Modular; community expandable
 Python 3.0
 2008
Python – Readability is Key
 Design goal
 One way to do things
 Clarity over clever code
 Whitespace over braces
 “pass” for No-Op
Python
 Writability
 Similar to other OO languages
 Verification support
 Interpreted, assert, no statements in conditions
 Clean style
 Few keywords
 Simple grammar -> few ways to do something
Python
 Comparisons
 == tests values, not references
 A < b <= C works properly
 Ternary operator readable
 “a if b else c”
Python
 System Requirements
 Cross platform
 Python Interpreter
 Simplicity
 Small core language
 Large libaraies
Python - Examples
 a = 15
if(a < 10):
print(“input less than 10”)
elif(10 < a < 20):
print(“input between 10 and 20”)
else:
print(“input greater than 20”)
Python - Examples
 Function definition
def greatest(a, b, c):
largest = a if a > b else b
largest = largest if largest > c else c
print(largest)
 Function call
greatest(7, 3, 14)
14
Python - Examples
 Determine if prime
def isPrime(num):
prime = True
for i in range(2, (num / 2) + 1):
if num % i == 0:
prime = False
return prime
def tenPrimes():
list = []
count = 0
current = 2
#store the first 10 primes in a list
while count < 10:
if isPrime(current):
count += 1
list.append(current)
current = current + 1
#print the list
for element in list:
print(element)
Python - Summary and Comparison
 Readability
 Writability
 Reliability

More Related Content

What's hot

Los Angeles R users group - July 12 2011 - Part 2
Los Angeles R users group - July 12 2011 - Part 2Los Angeles R users group - July 12 2011 - Part 2
Los Angeles R users group - July 12 2011 - Part 2
rusersla
 

What's hot (14)

History of c++
History of c++ History of c++
History of c++
 
Pda to cfg h2
Pda to cfg h2Pda to cfg h2
Pda to cfg h2
 
A brief introduction to lisp language
A brief introduction to lisp languageA brief introduction to lisp language
A brief introduction to lisp language
 
presentation on C++ basics by prince kumar kushwaha
presentation on C++ basics by prince kumar kushwahapresentation on C++ basics by prince kumar kushwaha
presentation on C++ basics by prince kumar kushwaha
 
Learn a language : LISP
Learn a language : LISPLearn a language : LISP
Learn a language : LISP
 
3.5 equivalence of pushdown automata and cfl
3.5 equivalence of pushdown automata and cfl3.5 equivalence of pushdown automata and cfl
3.5 equivalence of pushdown automata and cfl
 
Clojure presentation
Clojure presentationClojure presentation
Clojure presentation
 
Lisp
LispLisp
Lisp
 
Pi - System Programming Language
Pi - System Programming LanguagePi - System Programming Language
Pi - System Programming Language
 
Los Angeles R users group - July 12 2011 - Part 2
Los Angeles R users group - July 12 2011 - Part 2Los Angeles R users group - July 12 2011 - Part 2
Los Angeles R users group - July 12 2011 - Part 2
 
[Question Paper] Linux Administration (75:25 Pattern) [November / 2015]
[Question Paper] Linux Administration (75:25 Pattern) [November / 2015][Question Paper] Linux Administration (75:25 Pattern) [November / 2015]
[Question Paper] Linux Administration (75:25 Pattern) [November / 2015]
 
History of c++
History of c++History of c++
History of c++
 
Intro of C
Intro of CIntro of C
Intro of C
 
Rcpp
RcppRcpp
Rcpp
 

Viewers also liked (20)

Prolog resume
Prolog resumeProlog resume
Prolog resume
 
Hashfunction
HashfunctionHashfunction
Hashfunction
 
Czego pragna klienci
Czego pragna klienciCzego pragna klienci
Czego pragna klienci
 
Memory caching
Memory cachingMemory caching
Memory caching
 
Linked list
Linked listLinked list
Linked list
 
Computer security
Computer securityComputer security
Computer security
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
 
Optimizing shared caches in chip multiprocessors
Optimizing shared caches in chip multiprocessorsOptimizing shared caches in chip multiprocessors
Optimizing shared caches in chip multiprocessors
 
Introduction to security_and_crypto
Introduction to security_and_cryptoIntroduction to security_and_crypto
Introduction to security_and_crypto
 
Big data
Big dataBig data
Big data
 
Crypto passport authentication
Crypto passport authenticationCrypto passport authentication
Crypto passport authentication
 
Network
NetworkNetwork
Network
 
Api crash
Api crashApi crash
Api crash
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
 
Cryptography
CryptographyCryptography
Cryptography
 
Hardware managed cache
Hardware managed cacheHardware managed cache
Hardware managed cache
 
Poo java
Poo javaPoo java
Poo java
 
Data preparation
Data preparationData preparation
Data preparation
 
Python language data types
Python language data typesPython language data types
Python language data types
 
Python your new best friend
Python your new best friendPython your new best friend
Python your new best friend
 

Similar to Cobol, lisp, and python

Introduction to phyton , important topic
Introduction to phyton , important topicIntroduction to phyton , important topic
Introduction to phyton , important topic
akpgenious67
 
H2O World - What's New in H2O with Cliff Click
H2O World - What's New in H2O with Cliff ClickH2O World - What's New in H2O with Cliff Click
H2O World - What's New in H2O with Cliff Click
Sri Ambati
 

Similar to Cobol, lisp, and python (20)

LISP: назад в будущее, Микола Мозговий
LISP: назад в будущее, Микола МозговийLISP: назад в будущее, Микола Мозговий
LISP: назад в будущее, Микола Мозговий
 
Open Source .NET
Open Source .NETOpen Source .NET
Open Source .NET
 
CPPDS Slide.pdf
CPPDS Slide.pdfCPPDS Slide.pdf
CPPDS Slide.pdf
 
Prolog & lisp
Prolog & lispProlog & lisp
Prolog & lisp
 
Functional programming
Functional programmingFunctional programming
Functional programming
 
LISP: Introduction to lisp
LISP: Introduction to lispLISP: Introduction to lisp
LISP: Introduction to lisp
 
LISP: Introduction To Lisp
LISP: Introduction To LispLISP: Introduction To Lisp
LISP: Introduction To Lisp
 
Introduction to phyton , important topic
Introduction to phyton , important topicIntroduction to phyton , important topic
Introduction to phyton , important topic
 
Introduction of Python
Introduction of PythonIntroduction of Python
Introduction of Python
 
Programming Basics
Programming BasicsProgramming Basics
Programming Basics
 
LibreOffice Conf 2011 Desktop Publishing
LibreOffice Conf 2011 Desktop PublishingLibreOffice Conf 2011 Desktop Publishing
LibreOffice Conf 2011 Desktop Publishing
 
Restrição == inovação - 17o Encontro Locaweb SP
Restrição == inovação  - 17o Encontro Locaweb SPRestrição == inovação  - 17o Encontro Locaweb SP
Restrição == inovação - 17o Encontro Locaweb SP
 
Programming for Problem Solving
Programming for Problem SolvingProgramming for Problem Solving
Programming for Problem Solving
 
Python Brasil 2010 - Potter vs Voldemort - Lições ofidiglotas da prática Pyth...
Python Brasil 2010 - Potter vs Voldemort - Lições ofidiglotas da prática Pyth...Python Brasil 2010 - Potter vs Voldemort - Lições ofidiglotas da prática Pyth...
Python Brasil 2010 - Potter vs Voldemort - Lições ofidiglotas da prática Pyth...
 
Introduction to D programming language at Weka.IO
Introduction to D programming language at Weka.IOIntroduction to D programming language at Weka.IO
Introduction to D programming language at Weka.IO
 
Programing paradigm &amp; implementation
Programing paradigm &amp; implementationPrograming paradigm &amp; implementation
Programing paradigm &amp; implementation
 
H2O World - What's New in H2O with Cliff Click
H2O World - What's New in H2O with Cliff ClickH2O World - What's New in H2O with Cliff Click
H2O World - What's New in H2O with Cliff Click
 
The Rise of Dynamic Languages
The Rise of Dynamic LanguagesThe Rise of Dynamic Languages
The Rise of Dynamic Languages
 
Lecture 2 lisp-Overview
Lecture 2 lisp-OverviewLecture 2 lisp-Overview
Lecture 2 lisp-Overview
 
Porting To Symbian
Porting To SymbianPorting To Symbian
Porting To Symbian
 

More from Young Alista

Google appenginejava.ppt
Google appenginejava.pptGoogle appenginejava.ppt
Google appenginejava.ppt
Young Alista
 
Motivation for multithreaded architectures
Motivation for multithreaded architecturesMotivation for multithreaded architectures
Motivation for multithreaded architectures
Young Alista
 
Serialization/deserialization
Serialization/deserializationSerialization/deserialization
Serialization/deserialization
Young Alista
 
Big picture of data mining
Big picture of data miningBig picture of data mining
Big picture of data mining
Young Alista
 
Business analytics and data mining
Business analytics and data miningBusiness analytics and data mining
Business analytics and data mining
Young Alista
 
Data mining and knowledge discovery
Data mining and knowledge discoveryData mining and knowledge discovery
Data mining and knowledge discovery
Young Alista
 
Directory based cache coherence
Directory based cache coherenceDirectory based cache coherence
Directory based cache coherence
Young Alista
 
How analysis services caching works
How analysis services caching worksHow analysis services caching works
How analysis services caching works
Young Alista
 
Concurrency with java
Concurrency with javaConcurrency with java
Concurrency with java
Young Alista
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
Young Alista
 
Object oriented analysis
Object oriented analysisObject oriented analysis
Object oriented analysis
Young Alista
 
Programming for engineers in python
Programming for engineers in pythonProgramming for engineers in python
Programming for engineers in python
Young Alista
 

More from Young Alista (20)

Google appenginejava.ppt
Google appenginejava.pptGoogle appenginejava.ppt
Google appenginejava.ppt
 
Motivation for multithreaded architectures
Motivation for multithreaded architecturesMotivation for multithreaded architectures
Motivation for multithreaded architectures
 
Serialization/deserialization
Serialization/deserializationSerialization/deserialization
Serialization/deserialization
 
Big picture of data mining
Big picture of data miningBig picture of data mining
Big picture of data mining
 
Business analytics and data mining
Business analytics and data miningBusiness analytics and data mining
Business analytics and data mining
 
Data mining and knowledge discovery
Data mining and knowledge discoveryData mining and knowledge discovery
Data mining and knowledge discovery
 
Directory based cache coherence
Directory based cache coherenceDirectory based cache coherence
Directory based cache coherence
 
Cache recap
Cache recapCache recap
Cache recap
 
How analysis services caching works
How analysis services caching worksHow analysis services caching works
How analysis services caching works
 
Object model
Object modelObject model
Object model
 
Abstract data types
Abstract data typesAbstract data types
Abstract data types
 
Abstraction file
Abstraction fileAbstraction file
Abstraction file
 
Concurrency with java
Concurrency with javaConcurrency with java
Concurrency with java
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
 
Abstract class
Abstract classAbstract class
Abstract class
 
Inheritance
InheritanceInheritance
Inheritance
 
Object oriented analysis
Object oriented analysisObject oriented analysis
Object oriented analysis
 
Programming for engineers in python
Programming for engineers in pythonProgramming for engineers in python
Programming for engineers in python
 
Learning python
Learning pythonLearning python
Learning python
 
Python basics
Python basicsPython basics
Python basics
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 

Cobol, lisp, and python

  • 1. COBOL Background  Released in 1959  Grace Hopper  Industry, universities, and government collaboration  Cold War pressures  80% of business transactions  65% of all code is in COBOL
  • 2. COBOL – Why?  Software Lifecycle  Cheaper to maintain  Y2K  Self-documenting code  Verbose  “IF a < b AND > c …”  Divisions
  • 3. COBOL – Why?  Divisions  Identification Division  Environment Division  Data Division  Procedure Division
  • 4. COBOL – Data Division  Data Division  Pictures  9 = digit  X = any character  A = alphabetic character  V = decimal point position  S = sign  Repeats  PIC 9 (4) = 9999
  • 5.
  • 6. COBOL – Groups and Elementary data
  • 7.
  • 8. COBOL  Reliability  Stood test of time  Has “ALTER X TO PROCEED TO Y” (a negative)  Uses GOTO statements (a negative)  Today  Cross platform: OpenCOBOL C translation  IDEs (Net Express)
  • 9. COBOL - Summary  Readability  Writability  Reliability  Portability
  • 10. LISP  LISt Processing  List-based language  2nd High-level language  1958 – John McCarthy for MIT
  • 11.
  • 12. LISP - Syntax  Function call: “(fun arg1 arg2)”  (+ 1 2 3)  Lists  (list ‘3 ‘7 ‘apples)  (3 7 apples)  (list ‘13 list(‘3 ‘5))  (13 (3 5))
  • 13. LISP – Innovations  Garbage Collection  If else statements  Recursion
  • 14. LISP – Linked Lists  Car (first)  Cdr (rest)
  • 15.
  • 16. LISP - Examples  If then else  (if nil (list ‘2 ‘3) (list ‘5 ‘6))  One line variant:  (if nil (list ‘2 ‘3) (list ‘5 ‘6))
  • 17. LISP - Examples  Factorial  (defun factorial (n) (if (<= n 1) 1 (* n (factorial (- n 1)))))  One line variant:  (defun factorial (n) (if (<= n 1) 1 (* n (factorial (- n 1)))))
  • 18. LISP - Examples  Recursive List Size  (defun recursiveSize (L) (if (null L) 0 (1+ (recursiveSize(rest L)))))
  • 19. LISP - Examples  Recursive List Sum with “LET”  (defun sum (L) (if (null L) 0 (let ((S1 (first L)) (S2 (sum (rest L)))) + S1 S2)))
  • 20. LISP- Summary and Comparison  Readability  Writability  Reliability
  • 21. Python  Developed early 1990’s  Guido van Rossum  ABC language  Python 2.0  2000  Community-supported -> reliability  Modular; community expandable  Python 3.0  2008
  • 22. Python – Readability is Key  Design goal  One way to do things  Clarity over clever code  Whitespace over braces  “pass” for No-Op
  • 23. Python  Writability  Similar to other OO languages  Verification support  Interpreted, assert, no statements in conditions  Clean style  Few keywords  Simple grammar -> few ways to do something
  • 24. Python  Comparisons  == tests values, not references  A < b <= C works properly  Ternary operator readable  “a if b else c”
  • 25. Python  System Requirements  Cross platform  Python Interpreter  Simplicity  Small core language  Large libaraies
  • 26. Python - Examples  a = 15 if(a < 10): print(“input less than 10”) elif(10 < a < 20): print(“input between 10 and 20”) else: print(“input greater than 20”)
  • 27. Python - Examples  Function definition def greatest(a, b, c): largest = a if a > b else b largest = largest if largest > c else c print(largest)  Function call greatest(7, 3, 14) 14
  • 28. Python - Examples  Determine if prime def isPrime(num): prime = True for i in range(2, (num / 2) + 1): if num % i == 0: prime = False return prime
  • 29. def tenPrimes(): list = [] count = 0 current = 2 #store the first 10 primes in a list while count < 10: if isPrime(current): count += 1 list.append(current) current = current + 1 #print the list for element in list: print(element)
  • 30. Python - Summary and Comparison  Readability  Writability  Reliability