SlideShare a Scribd company logo
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, lisp, and python
COBOL – Groups and Elementary data
Cobol, lisp, and python
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
Cobol, lisp, and python
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)
Cobol, lisp, and python
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

PPTX
Regular expression to NFA (Nondeterministic Finite Automata)
PPTX
C++ history session 00 history
PDF
Lisp(Lots of Irritating Superfluous Parentheses)
PDF
Linux Administration (Revised Syllabus) [QP / May - 2017]
PDF
Internet Technologies (October – 2016) [Question Paper | IDOL: Revised Course]
PDF
Year when lambda functions were introduced in various languages
PDF
Internet Technology (May – 2016) [Revised Syllabus | Question Paper]
PDF
Linux Administration (Revised Syllabus) [QP / May - 2016]
Regular expression to NFA (Nondeterministic Finite Automata)
C++ history session 00 history
Lisp(Lots of Irritating Superfluous Parentheses)
Linux Administration (Revised Syllabus) [QP / May - 2017]
Internet Technologies (October – 2016) [Question Paper | IDOL: Revised Course]
Year when lambda functions were introduced in various languages
Internet Technology (May – 2016) [Revised Syllabus | Question Paper]
Linux Administration (Revised Syllabus) [QP / May - 2016]

What's hot (14)

PPT
History of c++
PPT
Pda to cfg h2
PPTX
A brief introduction to lisp language
PPTX
presentation on C++ basics by prince kumar kushwaha
PDF
Learn a language : LISP
PPTX
3.5 equivalence of pushdown automata and cfl
PDF
Clojure presentation
PPTX
PPTX
Pi - System Programming Language
PDF
Los Angeles R users group - July 12 2011 - Part 2
PDF
[Question Paper] Linux Administration (75:25 Pattern) [November / 2015]
PPT
History of c++
PPTX
Intro of C
PDF
Rcpp
History of c++
Pda to cfg h2
A brief introduction to lisp language
presentation on C++ basics by prince kumar kushwaha
Learn a language : LISP
3.5 equivalence of pushdown automata and cfl
Clojure presentation
Pi - System Programming Language
Los Angeles R users group - July 12 2011 - Part 2
[Question Paper] Linux Administration (75:25 Pattern) [November / 2015]
History of c++
Intro of C
Rcpp
Ad

Similar to Cobol, lisp, and python (20)

PPTX
LISP: назад в будущее, Микола Мозговий
ODP
Open Source .NET
PDF
CPPDS Slide.pdf
PPTX
Prolog & lisp
PPTX
Functional programming
PPTX
LISP: Introduction To Lisp
PPTX
LISP: Introduction to lisp
PDF
Introduction to phyton , important topic
PDF
Introduction of Python
PPTX
Programming Basics
PDF
LibreOffice Conf 2011 Desktop Publishing
PDF
Restrição == inovação - 17o Encontro Locaweb SP
PDF
Programming for Problem Solving
PDF
Python Brasil 2010 - Potter vs Voldemort - Lições ofidiglotas da prática Pyth...
PPTX
Report about the LISP Programming Language
PDF
Introduction to D programming language at Weka.IO
PDF
Programing paradigm &amp; implementation
PDF
H2O World - What's New in H2O with Cliff Click
PDF
Python_Fundamentals_for_Everyone_Usefull
PDF
The Rise of Dynamic Languages
LISP: назад в будущее, Микола Мозговий
Open Source .NET
CPPDS Slide.pdf
Prolog & lisp
Functional programming
LISP: Introduction To Lisp
LISP: Introduction to lisp
Introduction to phyton , important topic
Introduction of Python
Programming Basics
LibreOffice Conf 2011 Desktop Publishing
Restrição == inovação - 17o Encontro Locaweb SP
Programming for Problem Solving
Python Brasil 2010 - Potter vs Voldemort - Lições ofidiglotas da prática Pyth...
Report about the LISP Programming Language
Introduction to D programming language at Weka.IO
Programing paradigm &amp; implementation
H2O World - What's New in H2O with Cliff Click
Python_Fundamentals_for_Everyone_Usefull
The Rise of Dynamic Languages
Ad

More from Hoang Nguyen (20)

PPTX
Rest api to integrate with your site
PPTX
How to build a rest api
PPTX
Api crash
PPTX
Smm and caching
PPTX
Optimizing shared caches in chip multiprocessors
PPTX
How analysis services caching works
PPTX
Hardware managed cache
PPTX
Directory based cache coherence
PPTX
Cache recap
PPTX
Python your new best friend
PPTX
Python language data types
PPTX
Python basics
PPTX
Programming for engineers in python
PPTX
Learning python
PPTX
Extending burp with python
PPT
Object oriented programming using c++
PPTX
Object oriented analysis
PPTX
Object model
PPTX
Data structures and algorithms
PPT
Data abstraction the walls
Rest api to integrate with your site
How to build a rest api
Api crash
Smm and caching
Optimizing shared caches in chip multiprocessors
How analysis services caching works
Hardware managed cache
Directory based cache coherence
Cache recap
Python your new best friend
Python language data types
Python basics
Programming for engineers in python
Learning python
Extending burp with python
Object oriented programming using c++
Object oriented analysis
Object model
Data structures and algorithms
Data abstraction the walls

Recently uploaded (20)

PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Electronic commerce courselecture one. Pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Empathic Computing: Creating Shared Understanding
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Approach and Philosophy of On baking technology
PDF
Encapsulation theory and applications.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Reach Out and Touch Someone: Haptics and Empathic Computing
Electronic commerce courselecture one. Pdf
Understanding_Digital_Forensics_Presentation.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Chapter 3 Spatial Domain Image Processing.pdf
Empathic Computing: Creating Shared Understanding
MYSQL Presentation for SQL database connectivity
Approach and Philosophy of On baking technology
Encapsulation theory and applications.pdf
Spectral efficient network and resource selection model in 5G networks
CIFDAQ's Market Insight: SEC Turns Pro Crypto
The Rise and Fall of 3GPP – Time for a Sabbatical?
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Bridging biosciences and deep learning for revolutionary discoveries: a compr...

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
  • 6. COBOL – Groups and Elementary data
  • 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
  • 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)
  • 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