SlideShare una empresa de Scribd logo
1 de 47
Programming Paradigms ( http://www.directi.com  |  http://wiki.directi.com  |  http://careers.directi.com )‏ Licensed under Creative Commons Attribution Sharealike Noncommercial By, Janeve George [email_address] & Nilesh Mevada [email_address]
Creative Commons Sharealike Attributions Noncommercial Few Instruction ,[object Object],[object Object],[object Object]
Creative Commons Sharealike Attributions Noncommercial Aim of the session ,[object Object],[object Object],Q: Why there are so many programming paradigms? A:  Q: Isn't there 'one language' that would suffice? A: Q: How can we deal with understanding so many paradigms? A:
Creative Commons Sharealike Attributions Noncommercial Flow of the session ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creative Commons Sharealike Attributions Noncommercial Flow of the session ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creative Commons Sharealike Attributions Noncommercial Programming Paradigm - Definition ,[object Object],[object Object],[object Object],Function Oriented Object Oriented Logical Programming Java ML Haskell Prolog Mercury Oz Erlang Smalltalk
Creative Commons Sharealike Attributions Noncommercial Flow of the session ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creative Commons Sharealike Attributions Noncommercial Why bother about 'Programming Paradigms'?
Creative Commons Sharealike Attributions Noncommercial Why bother about 'Programming Paradigms'?
Creative Commons Sharealike Attributions Noncommercial Why bother about 'Programming Paradigms'?
Creative Commons Sharealike Attributions Noncommercial Why bother about 'Programming Paradigms'? ,[object Object],[object Object],[object Object],[object Object]
Creative Commons Sharealike Attributions Noncommercial Flow of the session ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creative Commons Sharealike Attributions Noncommercial Appreciating 'Programming paradigms' ,[object Object],Int X; Int Y = X; Print( Y ); ,[object Object],?
Creative Commons Sharealike Attributions Noncommercial Flow of the session ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – An Overview Set of  Programming Concepts Procedures Functions Higher/1 st  Order Evaluation Eager/Lazy Variables Single/Multi store Scope Scope of variables Typing State Internal/External Objects Classes Concurrency & on & on & on.....
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – An Overview Subset of Concepts Programming Model Set of Programming Concepts Programming Language(s)‏ Embraced by Followed by
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – An Overview Subset of Concepts OO Programming Model Set of Programming Concepts OO Programming Language(s)‏ Embraced by Followed by ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – An Overview Subset of Concepts Functional Programming Model Set of Programming Concepts Functional Programming Language(s)‏ Embraced by Followed by ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – An Overview
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – An Overview
Creative Commons Sharealike Attributions Noncommercial ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Programming Concepts – An Overview
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Eager Evaluation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Eager Evaluation .... List  Gen (  int   N ) { ArrayList list =  new  ArrayList(); list. add ( N ); list. addAll (  Gen (N+1) ); return  list; } void   myMethod  () { List K =  Gen (1); System.out. println ( "Elements: " + K. getElementAt ( 3 ) ); } ....
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Lazy Evaluation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Lazy Evaluation declare fun lazy  { Gen  N}  N | { Gen  N+1} end declare  K = { Gen  1} { Browse  “Elements: ” + Nth K 3}
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Procedures ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],proc  { Max  X Y ?Z} if  X>=Y  then  Z=X  else  Z=Y  end end
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Procedures local  Default MaxOrDefault  in Default=10 proc  { MaxOrDefault  Arg ?Result} if  Arg >= Default  then   Result = Arg  else   Result = Default end end local   Result   in { MaxOrDefault  5 Result} { Browse  Result} end end
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Functions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],fun  { Max  X Y} if  X>=Y  then  Z=X  else  Z=Y  end end Z = { Max  10, 20}
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Functions (Higher Order)‏ ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],map  f  []  =  [] map  f (x:xs) = f x :  map  f xs numbers =  [ 7,9,13 ] inc  x = x  +  1 more_numbers =  map   inc  numbers
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Functions (Higher Order)‏ listsum   []  = 0 listsum  (x:xs) = x  +   listsum  xs listprod   []   = 1 listprod  (x:xs) = x  *   listprod  xs fold  op init  []  = init fold  op init (x:xs) = x  `op`   fold op init xs listsum  =  fold  (+) 0 listprod  =  fold  (*) 1
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – External and Internal State ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – External and Internal State fun  { Sum  Numbers} Result = { NewCell  0} Input = { NewCell  Numbers} proc  { Sum } case  @Input  of  nil  then skip [] X | Y  then Result := @Result + X Input := Y { Sum }  end end in { Sum } @Result end
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Concurrency ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],thread ConcurrentFlow1 = { GenerateNumbers  1 10} end
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Concurrency fun  { GenerateNumbers  FromArg ToArg} { Delay  100} if   FromArg > ToArg   then   nil else FromArg | { GenerateNumbers  FromArg+1 ToArg} end end thread   ConcurrentFlow1 = { GenerateNumbers  1 10} end thread ConcurrentFlow2 = { GenerateNumbers  11 20} end { Browse  ConcurrentFlow1} { Browse  ConcurrentFlow2}
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Concurrency .... public   void  main(String[] args)  throws   InterruptedException { Temp temp =  new   Temp(); createAConcurrentFlow(1, 10); createAConcurrentFlow(11, 20); } .... private   void  createAConcurrentFlow( int  FromArg,  int  ToArg) { new  Runnable() { public   void  run() { try   { new  Temp().GenerateNumbers(FromArg, ToArg); } catch  (InterruptedException e) {  } } }; } ....
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Static Typing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Static Typing int  num, sum;  // explicit declaration num = 5;  // now use the variables sum = 10; sum = sum + num;
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Dynamic Typing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Dynamic Typing foo() { x = 1; x = 'hello'; }
Creative Commons Sharealike Attributions Noncommercial Flow of the session ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creative Commons Sharealike Attributions Noncommercial Some Real-Life Problems – Prolog vs Java % % Facts % male(hrithik). male(shahrukh). male(salman). male(abhishek). male(akshay). male(aamir). female(diya). female(aishwarya). female(katrina). female(malaika). parent(hrithik,shahrukh). parent(hrithik,salman). parent(hrithik,diya). parent(shahrukh,abhishek). parent(shahrukh,akshay). parent(salman,aishwarya). parent(salman,katrina). parent(salman,aamir). parent(diya,malaika). % % Rules % father(X,Y) :- parent(X,Y), male(X). mother(X,Y) :- parent(X,Y), female(X). grandparent(X,Y) :- parent(X,Z), parent(Z,Y). paternalgrandfather(X,Y) :- father(X,Z), father(Z,Y). sibling(X,Y) :- parent(Z,X), parent(Z,Y). brothers(X,Y) :- sibling(X,Y),male(X),male(Y),  (X=Y). % % Queries % cmd: mother(diya,malaika) % Outupt: yes/no cmd: mother(Mother,Child). % Output: lists (mother,child) pair found in facts  % according to associations defined
Creative Commons Sharealike Attributions Noncommercial Some Real-Life Problems – Statistics
Creative Commons Sharealike Attributions Noncommercial How to approach Programming Paradigm? ,[object Object],[object Object],[object Object],[object Object]
Creative Commons Sharealike Attributions Noncommercial References ,[object Object],[object Object],[object Object],[object Object],[object Object]
Creative Commons Sharealike Attributions Noncommercial What we expect post this session ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],“ I want to thank you and DIRECTI for conducting such a marvelous session and I am very much indebted for that.  I fell in love with LISP programming language and found that it was very much ideal for signal processing algos.  The approach u have suggested was just great and the book you have suggested was really really great.” - Chinni Krishna, Mukt '08 Session Attendee
Questions??? [email_address]  &  [email_address] http://directi.com http://careers.directi.com   Download slides:  http://wiki.directi.com
Retrospective!!! [email_address]  &  [email_address] http://directi.com http://careers.directi.com   Download slides:  http://wiki.directi.com

Más contenido relacionado

La actualidad más candente

Software project planning
Software project planningSoftware project planning
Software project planningrajvir_kaur
 
Programming paradigm
Programming paradigmProgramming paradigm
Programming paradigmbusyking03
 
Software Engineering (Project Scheduling)
Software Engineering (Project Scheduling)Software Engineering (Project Scheduling)
Software Engineering (Project Scheduling)ShudipPal
 
SRS(software requirement specification)
SRS(software requirement specification)SRS(software requirement specification)
SRS(software requirement specification)Akash Kumar Dhameja
 
Agile development, software engineering
Agile development, software engineeringAgile development, software engineering
Agile development, software engineeringRupesh Vaishnav
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented ProgrammingIqra khalil
 
Basic concepts of object oriented programming
Basic concepts of object oriented programmingBasic concepts of object oriented programming
Basic concepts of object oriented programmingSachin Sharma
 
Algorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsAlgorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsMohamed Loey
 
Project Planning in Software Engineering
Project Planning in Software EngineeringProject Planning in Software Engineering
Project Planning in Software EngineeringFáber D. Giraldo
 
oops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaoops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaCPD INDIA
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented ProgrammingRAJU MAKWANA
 
Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design MAHASREEM
 

La actualidad más candente (20)

Software project planning
Software project planningSoftware project planning
Software project planning
 
Programming paradigm
Programming paradigmProgramming paradigm
Programming paradigm
 
Software requirements
Software requirementsSoftware requirements
Software requirements
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Software Development Life Cycle
Software Development Life CycleSoftware Development Life Cycle
Software Development Life Cycle
 
Ontology engineering
Ontology engineering Ontology engineering
Ontology engineering
 
Threads in python
Threads in pythonThreads in python
Threads in python
 
Software Engineering (Project Scheduling)
Software Engineering (Project Scheduling)Software Engineering (Project Scheduling)
Software Engineering (Project Scheduling)
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
SRS(software requirement specification)
SRS(software requirement specification)SRS(software requirement specification)
SRS(software requirement specification)
 
Agile development, software engineering
Agile development, software engineeringAgile development, software engineering
Agile development, software engineering
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
Basic concepts of object oriented programming
Basic concepts of object oriented programmingBasic concepts of object oriented programming
Basic concepts of object oriented programming
 
Software architecture
Software architectureSoftware architecture
Software architecture
 
Algorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsAlgorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to Algorithms
 
Java tutorial PPT
Java tutorial PPTJava tutorial PPT
Java tutorial PPT
 
Project Planning in Software Engineering
Project Planning in Software EngineeringProject Planning in Software Engineering
Project Planning in Software Engineering
 
oops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaoops concept in java | object oriented programming in java
oops concept in java | object oriented programming in java
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design
 

Similar a Programming Paradigms Explained with Real-Life Examples

PL Lecture 01 - preliminaries
PL Lecture 01 - preliminariesPL Lecture 01 - preliminaries
PL Lecture 01 - preliminariesSchwannden Kuo
 
Agile development with Ruby
Agile development with RubyAgile development with Ruby
Agile development with Rubykhelll
 
Designing function families and bundles with java's behaviors parameterisatio...
Designing function families and bundles with java's behaviors parameterisatio...Designing function families and bundles with java's behaviors parameterisatio...
Designing function families and bundles with java's behaviors parameterisatio...Alain Lompo
 
Tools for the Toolmakers
Tools for the ToolmakersTools for the Toolmakers
Tools for the ToolmakersCaleb Callaway
 
Framework engineering JCO 2011
Framework engineering JCO 2011Framework engineering JCO 2011
Framework engineering JCO 2011YoungSu Son
 
Introduction to Software - Coder Forge - John Mulhall
Introduction to Software - Coder Forge - John MulhallIntroduction to Software - Coder Forge - John Mulhall
Introduction to Software - Coder Forge - John MulhallJohn Mulhall
 
Modern_2.pptx for java
Modern_2.pptx for java Modern_2.pptx for java
Modern_2.pptx for java MayaTofik
 
Functional programming (Let's fall back in love with Programming)
Functional programming (Let's fall back in love with Programming)Functional programming (Let's fall back in love with Programming)
Functional programming (Let's fall back in love with Programming)Sudipta Mukherjee
 
Linq To The Enterprise
Linq To The EnterpriseLinq To The Enterprise
Linq To The EnterpriseDaniel Egan
 
Core Java - OO Programming
Core Java - OO ProgrammingCore Java - OO Programming
Core Java - OO ProgrammingGanesh P
 
Functional Programming In Jdk8
Functional Programming In Jdk8 Functional Programming In Jdk8
Functional Programming In Jdk8 Bansilal Haudakari
 

Similar a Programming Paradigms Explained with Real-Life Examples (20)

PL Lecture 01 - preliminaries
PL Lecture 01 - preliminariesPL Lecture 01 - preliminaries
PL Lecture 01 - preliminaries
 
PARADIGM IT.pptx
PARADIGM IT.pptxPARADIGM IT.pptx
PARADIGM IT.pptx
 
Presentation
PresentationPresentation
Presentation
 
Java
JavaJava
Java
 
Shuzworld Analysis
Shuzworld AnalysisShuzworld Analysis
Shuzworld Analysis
 
C++ book
C++ bookC++ book
C++ book
 
Agile development with Ruby
Agile development with RubyAgile development with Ruby
Agile development with Ruby
 
Designing function families and bundles with java's behaviors parameterisatio...
Designing function families and bundles with java's behaviors parameterisatio...Designing function families and bundles with java's behaviors parameterisatio...
Designing function families and bundles with java's behaviors parameterisatio...
 
Tools for the Toolmakers
Tools for the ToolmakersTools for the Toolmakers
Tools for the Toolmakers
 
Framework engineering JCO 2011
Framework engineering JCO 2011Framework engineering JCO 2011
Framework engineering JCO 2011
 
Programming for Problem Solving
Programming for Problem SolvingProgramming for Problem Solving
Programming for Problem Solving
 
Introduction to Software - Coder Forge - John Mulhall
Introduction to Software - Coder Forge - John MulhallIntroduction to Software - Coder Forge - John Mulhall
Introduction to Software - Coder Forge - John Mulhall
 
Javascript
JavascriptJavascript
Javascript
 
Modern_2.pptx for java
Modern_2.pptx for java Modern_2.pptx for java
Modern_2.pptx for java
 
Quick Intro to Clean Coding
Quick Intro to Clean CodingQuick Intro to Clean Coding
Quick Intro to Clean Coding
 
Functional programming (Let's fall back in love with Programming)
Functional programming (Let's fall back in love with Programming)Functional programming (Let's fall back in love with Programming)
Functional programming (Let's fall back in love with Programming)
 
Linq To The Enterprise
Linq To The EnterpriseLinq To The Enterprise
Linq To The Enterprise
 
Core Java - OO Programming
Core Java - OO ProgrammingCore Java - OO Programming
Core Java - OO Programming
 
Functional Programming In Jdk8
Functional Programming In Jdk8 Functional Programming In Jdk8
Functional Programming In Jdk8
 
Oops ppt
Oops pptOops ppt
Oops ppt
 

Más de Directi Group

Hr coverage directi 2012
Hr coverage directi 2012Hr coverage directi 2012
Hr coverage directi 2012Directi Group
 
MDI - Mandevian Knights
MDI - Mandevian KnightsMDI - Mandevian Knights
MDI - Mandevian KnightsDirecti Group
 
FMS - Riders on the Storm
FMS - Riders on the StormFMS - Riders on the Storm
FMS - Riders on the StormDirecti Group
 
ISB - Beirut Film Fiesta
ISB - Beirut Film FiestaISB - Beirut Film Fiesta
ISB - Beirut Film FiestaDirecti Group
 
Great Lakes - Synergy
Great Lakes - SynergyGreat Lakes - Synergy
Great Lakes - SynergyDirecti Group
 
Great Lakes - Fabulous Four
Great Lakes - Fabulous FourGreat Lakes - Fabulous Four
Great Lakes - Fabulous FourDirecti Group
 
IIM C - Baker Street
IIM C - Baker StreetIIM C - Baker Street
IIM C - Baker StreetDirecti Group
 
Directi Case Study Contest - Team idate from MDI Gurgaon
Directi Case Study Contest -  Team idate from MDI GurgaonDirecti Case Study Contest -  Team idate from MDI Gurgaon
Directi Case Study Contest - Team idate from MDI GurgaonDirecti Group
 
Directi Case Study Contest - Relationships Matter from ISB Hyderabad
Directi Case Study Contest - Relationships Matter from ISB HyderabadDirecti Case Study Contest - Relationships Matter from ISB Hyderabad
Directi Case Study Contest - Relationships Matter from ISB HyderabadDirecti Group
 
Directi Case Study Contest - Team Goodfellas from ISB Hyderabad
Directi Case Study Contest - Team Goodfellas from ISB HyderabadDirecti Case Study Contest - Team Goodfellas from ISB Hyderabad
Directi Case Study Contest - Team Goodfellas from ISB HyderabadDirecti Group
 
Directi Case Study Contest- Team Joka warriors from IIM C
Directi Case Study Contest- Team Joka warriors from IIM CDirecti Case Study Contest- Team Joka warriors from IIM C
Directi Case Study Contest- Team Joka warriors from IIM CDirecti Group
 
Directi Case Study Contest - Team Alkaline Jazz from IIFT
Directi Case Study Contest - Team Alkaline Jazz from IIFTDirecti Case Study Contest - Team Alkaline Jazz from IIFT
Directi Case Study Contest - Team Alkaline Jazz from IIFTDirecti Group
 
Directi Case Study Contest - Singles 360 by Team Awesome from IIM A
Directi Case Study Contest - Singles 360 by Team Awesome from IIM ADirecti Case Study Contest - Singles 360 by Team Awesome from IIM A
Directi Case Study Contest - Singles 360 by Team Awesome from IIM ADirecti Group
 
Directi On Campus- Engineering Presentation - 2011-2012
Directi On Campus- Engineering Presentation - 2011-2012Directi On Campus- Engineering Presentation - 2011-2012
Directi On Campus- Engineering Presentation - 2011-2012Directi Group
 
Directi On Campus- Engineering Presentation
Directi On Campus- Engineering PresentationDirecti On Campus- Engineering Presentation
Directi On Campus- Engineering PresentationDirecti Group
 
Directi On Campus- Engineering Presentation
Directi On Campus- Engineering PresentationDirecti On Campus- Engineering Presentation
Directi On Campus- Engineering PresentationDirecti Group
 
Directi On Campus- Engineering Presentation
Directi On Campus- Engineering PresentationDirecti On Campus- Engineering Presentation
Directi On Campus- Engineering PresentationDirecti Group
 

Más de Directi Group (20)

Hr coverage directi 2012
Hr coverage directi 2012Hr coverage directi 2012
Hr coverage directi 2012
 
IIM L - ConArtists
IIM L - ConArtistsIIM L - ConArtists
IIM L - ConArtists
 
MDI - Mandevian Knights
MDI - Mandevian KnightsMDI - Mandevian Knights
MDI - Mandevian Knights
 
ISB - Pikturewale
ISB - PikturewaleISB - Pikturewale
ISB - Pikturewale
 
FMS - Riders on the Storm
FMS - Riders on the StormFMS - Riders on the Storm
FMS - Riders on the Storm
 
IIM L - Inferno
IIM L - InfernoIIM L - Inferno
IIM L - Inferno
 
ISB - Beirut Film Fiesta
ISB - Beirut Film FiestaISB - Beirut Film Fiesta
ISB - Beirut Film Fiesta
 
Great Lakes - Synergy
Great Lakes - SynergyGreat Lakes - Synergy
Great Lakes - Synergy
 
Great Lakes - Fabulous Four
Great Lakes - Fabulous FourGreat Lakes - Fabulous Four
Great Lakes - Fabulous Four
 
IIM C - Baker Street
IIM C - Baker StreetIIM C - Baker Street
IIM C - Baker Street
 
Directi Case Study Contest - Team idate from MDI Gurgaon
Directi Case Study Contest -  Team idate from MDI GurgaonDirecti Case Study Contest -  Team idate from MDI Gurgaon
Directi Case Study Contest - Team idate from MDI Gurgaon
 
Directi Case Study Contest - Relationships Matter from ISB Hyderabad
Directi Case Study Contest - Relationships Matter from ISB HyderabadDirecti Case Study Contest - Relationships Matter from ISB Hyderabad
Directi Case Study Contest - Relationships Matter from ISB Hyderabad
 
Directi Case Study Contest - Team Goodfellas from ISB Hyderabad
Directi Case Study Contest - Team Goodfellas from ISB HyderabadDirecti Case Study Contest - Team Goodfellas from ISB Hyderabad
Directi Case Study Contest - Team Goodfellas from ISB Hyderabad
 
Directi Case Study Contest- Team Joka warriors from IIM C
Directi Case Study Contest- Team Joka warriors from IIM CDirecti Case Study Contest- Team Joka warriors from IIM C
Directi Case Study Contest- Team Joka warriors from IIM C
 
Directi Case Study Contest - Team Alkaline Jazz from IIFT
Directi Case Study Contest - Team Alkaline Jazz from IIFTDirecti Case Study Contest - Team Alkaline Jazz from IIFT
Directi Case Study Contest - Team Alkaline Jazz from IIFT
 
Directi Case Study Contest - Singles 360 by Team Awesome from IIM A
Directi Case Study Contest - Singles 360 by Team Awesome from IIM ADirecti Case Study Contest - Singles 360 by Team Awesome from IIM A
Directi Case Study Contest - Singles 360 by Team Awesome from IIM A
 
Directi On Campus- Engineering Presentation - 2011-2012
Directi On Campus- Engineering Presentation - 2011-2012Directi On Campus- Engineering Presentation - 2011-2012
Directi On Campus- Engineering Presentation - 2011-2012
 
Directi On Campus- Engineering Presentation
Directi On Campus- Engineering PresentationDirecti On Campus- Engineering Presentation
Directi On Campus- Engineering Presentation
 
Directi On Campus- Engineering Presentation
Directi On Campus- Engineering PresentationDirecti On Campus- Engineering Presentation
Directi On Campus- Engineering Presentation
 
Directi On Campus- Engineering Presentation
Directi On Campus- Engineering PresentationDirecti On Campus- Engineering Presentation
Directi On Campus- Engineering Presentation
 

Último

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
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
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Último (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
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
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

Programming Paradigms Explained with Real-Life Examples

  • 1. Programming Paradigms ( http://www.directi.com | http://wiki.directi.com | http://careers.directi.com )‏ Licensed under Creative Commons Attribution Sharealike Noncommercial By, Janeve George [email_address] & Nilesh Mevada [email_address]
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. Creative Commons Sharealike Attributions Noncommercial Why bother about 'Programming Paradigms'?
  • 9. Creative Commons Sharealike Attributions Noncommercial Why bother about 'Programming Paradigms'?
  • 10. Creative Commons Sharealike Attributions Noncommercial Why bother about 'Programming Paradigms'?
  • 11.
  • 12.
  • 13.
  • 14.
  • 15. Creative Commons Sharealike Attributions Noncommercial Programming Concepts – An Overview Set of Programming Concepts Procedures Functions Higher/1 st Order Evaluation Eager/Lazy Variables Single/Multi store Scope Scope of variables Typing State Internal/External Objects Classes Concurrency & on & on & on.....
  • 16. Creative Commons Sharealike Attributions Noncommercial Programming Concepts – An Overview Subset of Concepts Programming Model Set of Programming Concepts Programming Language(s)‏ Embraced by Followed by
  • 17.
  • 18.
  • 19. Creative Commons Sharealike Attributions Noncommercial Programming Concepts – An Overview
  • 20. Creative Commons Sharealike Attributions Noncommercial Programming Concepts – An Overview
  • 21.
  • 22.
  • 23. Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Eager Evaluation .... List Gen ( int N ) { ArrayList list = new ArrayList(); list. add ( N ); list. addAll ( Gen (N+1) ); return list; } void myMethod () { List K = Gen (1); System.out. println ( "Elements: " + K. getElementAt ( 3 ) ); } ....
  • 24.
  • 25. Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Lazy Evaluation declare fun lazy { Gen N} N | { Gen N+1} end declare K = { Gen 1} { Browse “Elements: ” + Nth K 3}
  • 26.
  • 27. Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Procedures local Default MaxOrDefault in Default=10 proc { MaxOrDefault Arg ?Result} if Arg >= Default then Result = Arg else Result = Default end end local Result in { MaxOrDefault 5 Result} { Browse Result} end end
  • 28.
  • 29.
  • 30. Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Functions (Higher Order)‏ listsum [] = 0 listsum (x:xs) = x + listsum xs listprod [] = 1 listprod (x:xs) = x * listprod xs fold op init [] = init fold op init (x:xs) = x `op` fold op init xs listsum = fold (+) 0 listprod = fold (*) 1
  • 31.
  • 32. Creative Commons Sharealike Attributions Noncommercial Programming Concepts – External and Internal State fun { Sum Numbers} Result = { NewCell 0} Input = { NewCell Numbers} proc { Sum } case @Input of nil then skip [] X | Y then Result := @Result + X Input := Y { Sum } end end in { Sum } @Result end
  • 33.
  • 34. Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Concurrency fun { GenerateNumbers FromArg ToArg} { Delay 100} if FromArg > ToArg then nil else FromArg | { GenerateNumbers FromArg+1 ToArg} end end thread ConcurrentFlow1 = { GenerateNumbers 1 10} end thread ConcurrentFlow2 = { GenerateNumbers 11 20} end { Browse ConcurrentFlow1} { Browse ConcurrentFlow2}
  • 35. Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Concurrency .... public void main(String[] args) throws InterruptedException { Temp temp = new Temp(); createAConcurrentFlow(1, 10); createAConcurrentFlow(11, 20); } .... private void createAConcurrentFlow( int FromArg, int ToArg) { new Runnable() { public void run() { try { new Temp().GenerateNumbers(FromArg, ToArg); } catch (InterruptedException e) { } } }; } ....
  • 36.
  • 37. Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Static Typing int num, sum; // explicit declaration num = 5; // now use the variables sum = 10; sum = sum + num;
  • 38.
  • 39. Creative Commons Sharealike Attributions Noncommercial Programming Concepts – Dynamic Typing foo() { x = 1; x = 'hello'; }
  • 40.
  • 41. Creative Commons Sharealike Attributions Noncommercial Some Real-Life Problems – Prolog vs Java % % Facts % male(hrithik). male(shahrukh). male(salman). male(abhishek). male(akshay). male(aamir). female(diya). female(aishwarya). female(katrina). female(malaika). parent(hrithik,shahrukh). parent(hrithik,salman). parent(hrithik,diya). parent(shahrukh,abhishek). parent(shahrukh,akshay). parent(salman,aishwarya). parent(salman,katrina). parent(salman,aamir). parent(diya,malaika). % % Rules % father(X,Y) :- parent(X,Y), male(X). mother(X,Y) :- parent(X,Y), female(X). grandparent(X,Y) :- parent(X,Z), parent(Z,Y). paternalgrandfather(X,Y) :- father(X,Z), father(Z,Y). sibling(X,Y) :- parent(Z,X), parent(Z,Y). brothers(X,Y) :- sibling(X,Y),male(X),male(Y), (X=Y). % % Queries % cmd: mother(diya,malaika) % Outupt: yes/no cmd: mother(Mother,Child). % Output: lists (mother,child) pair found in facts % according to associations defined
  • 42. Creative Commons Sharealike Attributions Noncommercial Some Real-Life Problems – Statistics
  • 43.
  • 44.
  • 45.
  • 46. Questions??? [email_address] & [email_address] http://directi.com http://careers.directi.com Download slides: http://wiki.directi.com
  • 47. Retrospective!!! [email_address] & [email_address] http://directi.com http://careers.directi.com Download slides: http://wiki.directi.com