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

A brief introduction to lisp language
A brief introduction to lisp languageA brief introduction to lisp language
A brief introduction to lisp languageDavid Gu
 
Learn a language : LISP
Learn a language : LISPLearn a language : LISP
Learn a language : LISPDevnology
 
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 cflSampath Kumar S
 
Pi - System Programming Language
Pi - System Programming LanguagePi - System Programming Language
Pi - System Programming LanguagePhilip
 
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 2rusersla
 
[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]Mumbai B.Sc.IT Study
 

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

LISP: назад в будущее, Микола Мозговий
LISP: назад в будущее, Микола МозговийLISP: назад в будущее, Микола Мозговий
LISP: назад в будущее, Микола МозговийSigma Software
 
Open Source .NET
Open Source .NETOpen Source .NET
Open Source .NETOnyxfish
 
LISP: Introduction To Lisp
LISP: Introduction To LispLISP: Introduction To Lisp
LISP: Introduction To LispLISP Content
 
Introduction to phyton , important topic
Introduction to phyton , important topicIntroduction to phyton , important topic
Introduction to phyton , important topicakpgenious67
 
LibreOffice Conf 2011 Desktop Publishing
LibreOffice Conf 2011 Desktop PublishingLibreOffice Conf 2011 Desktop Publishing
LibreOffice Conf 2011 Desktop Publishingprokoudine
 
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 SPFabio Akita
 
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...Rodrigo Senra
 
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.IOLiran Zvibel
 
Programing paradigm &amp; implementation
Programing paradigm &amp; implementationPrograming paradigm &amp; implementation
Programing paradigm &amp; implementationBilal Maqbool ツ
 
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 ClickSri Ambati
 
The Rise of Dynamic Languages
The Rise of Dynamic LanguagesThe Rise of Dynamic Languages
The Rise of Dynamic Languagesgreenwop
 
Porting To Symbian
Porting To SymbianPorting To Symbian
Porting To SymbianMark Wilcox
 

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 Fraboni Ec

Hardware multithreading
Hardware multithreadingHardware multithreading
Hardware multithreadingFraboni Ec
 
What is simultaneous multithreading
What is simultaneous multithreadingWhat is simultaneous multithreading
What is simultaneous multithreadingFraboni Ec
 
Directory based cache coherence
Directory based cache coherenceDirectory based cache coherence
Directory based cache coherenceFraboni Ec
 
Business analytics and data mining
Business analytics and data miningBusiness analytics and data mining
Business analytics and data miningFraboni Ec
 
Big picture of data mining
Big picture of data miningBig picture of data mining
Big picture of data miningFraboni Ec
 
Data mining and knowledge discovery
Data mining and knowledge discoveryData mining and knowledge discovery
Data mining and knowledge discoveryFraboni Ec
 
How analysis services caching works
How analysis services caching worksHow analysis services caching works
How analysis services caching worksFraboni Ec
 
Hardware managed cache
Hardware managed cacheHardware managed cache
Hardware managed cacheFraboni Ec
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithmsFraboni Ec
 
Abstract data types
Abstract data typesAbstract data types
Abstract data typesFraboni Ec
 
Optimizing shared caches in chip multiprocessors
Optimizing shared caches in chip multiprocessorsOptimizing shared caches in chip multiprocessors
Optimizing shared caches in chip multiprocessorsFraboni Ec
 
Abstraction file
Abstraction fileAbstraction file
Abstraction fileFraboni Ec
 
Object oriented analysis
Object oriented analysisObject oriented analysis
Object oriented analysisFraboni Ec
 
Abstract class
Abstract classAbstract class
Abstract classFraboni Ec
 
Concurrency with java
Concurrency with javaConcurrency with java
Concurrency with javaFraboni Ec
 

More from Fraboni Ec (20)

Hardware multithreading
Hardware multithreadingHardware multithreading
Hardware multithreading
 
Lisp
LispLisp
Lisp
 
What is simultaneous multithreading
What is simultaneous multithreadingWhat is simultaneous multithreading
What is simultaneous multithreading
 
Directory based cache coherence
Directory based cache coherenceDirectory based cache coherence
Directory based cache coherence
 
Business analytics and data mining
Business analytics and data miningBusiness analytics and data mining
Business analytics and data mining
 
Big picture of data mining
Big picture of data miningBig picture of data mining
Big picture of data mining
 
Data mining and knowledge discovery
Data mining and knowledge discoveryData mining and knowledge discovery
Data mining and knowledge discovery
 
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
 
Hardware managed cache
Hardware managed cacheHardware managed cache
Hardware managed cache
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
 
Abstract data types
Abstract data typesAbstract data types
Abstract data types
 
Optimizing shared caches in chip multiprocessors
Optimizing shared caches in chip multiprocessorsOptimizing shared caches in chip multiprocessors
Optimizing shared caches in chip multiprocessors
 
Abstraction file
Abstraction fileAbstraction file
Abstraction file
 
Object model
Object modelObject model
Object model
 
Object oriented analysis
Object oriented analysisObject oriented analysis
Object oriented analysis
 
Abstract class
Abstract classAbstract class
Abstract class
 
Concurrency with java
Concurrency with javaConcurrency with java
Concurrency with java
 
Inheritance
InheritanceInheritance
Inheritance
 
Api crash
Api crashApi crash
Api crash
 

Recently uploaded

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 

Recently uploaded (20)

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 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