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
 

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 Hoang Nguyen

More from Hoang Nguyen (20)

Rest api to integrate with your site
Rest api to integrate with your siteRest api to integrate with your site
Rest api to integrate with your site
 
How to build a rest api
How to build a rest apiHow to build a rest api
How to build a rest api
 
Api crash
Api crashApi crash
Api crash
 
Smm and caching
Smm and cachingSmm and caching
Smm and caching
 
Optimizing shared caches in chip multiprocessors
Optimizing shared caches in chip multiprocessorsOptimizing shared caches in chip multiprocessors
Optimizing shared caches in chip multiprocessors
 
How analysis services caching works
How analysis services caching worksHow analysis services caching works
How analysis services caching works
 
Hardware managed cache
Hardware managed cacheHardware managed cache
Hardware managed cache
 
Directory based cache coherence
Directory based cache coherenceDirectory based cache coherence
Directory based cache coherence
 
Cache recap
Cache recapCache recap
Cache recap
 
Python your new best friend
Python your new best friendPython your new best friend
Python your new best friend
 
Python language data types
Python language data typesPython language data types
Python language data types
 
Python basics
Python basicsPython basics
Python basics
 
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
 
Extending burp with python
Extending burp with pythonExtending burp with python
Extending burp with python
 
Object oriented programming using c++
Object oriented programming using c++Object oriented programming using c++
Object oriented programming using c++
 
Object oriented analysis
Object oriented analysisObject oriented analysis
Object oriented analysis
 
Object model
Object modelObject model
Object model
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
 
Data abstraction the walls
Data abstraction the wallsData abstraction the walls
Data abstraction the walls
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

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