SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Was ist angesagt?

Compiler Design
Compiler DesignCompiler Design
Compiler DesignMir Majid
 
INTRODUCTION TO LISP
INTRODUCTION TO LISPINTRODUCTION TO LISP
INTRODUCTION TO LISPNilt1234
 
FUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPTFUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPT03062679929
 
Loaders and Linkers
Loaders and LinkersLoaders and Linkers
Loaders and Linkerskunj desai
 
Theory of programming
Theory of programmingTheory of programming
Theory of programmingtcc_joemarie
 
Conditional and control statement
Conditional and control statementConditional and control statement
Conditional and control statementnarmadhakin
 
Passes of compilers
Passes of compilersPasses of compilers
Passes of compilersVairavel C
 
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi Professor Lili Saghafi
 
Input output statement in C
Input output statement in CInput output statement in C
Input output statement in CMuthuganesh S
 
Software cost estimation techniques presentation
Software cost estimation techniques presentationSoftware cost estimation techniques presentation
Software cost estimation techniques presentationKudzai Rerayi
 
Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design MAHASREEM
 
Type checking in compiler design
Type checking in compiler designType checking in compiler design
Type checking in compiler designSudip Singh
 
Intermediate code generation in Compiler Design
Intermediate code generation in Compiler DesignIntermediate code generation in Compiler Design
Intermediate code generation in Compiler DesignKuppusamy P
 
Control structures in java
Control structures in javaControl structures in java
Control structures in javaVINOTH R
 
Type checking compiler construction Chapter #6
Type checking compiler construction Chapter #6Type checking compiler construction Chapter #6
Type checking compiler construction Chapter #6Daniyal Mughal
 

Was ist angesagt? (20)

Compiler Design
Compiler DesignCompiler Design
Compiler Design
 
INTRODUCTION TO LISP
INTRODUCTION TO LISPINTRODUCTION TO LISP
INTRODUCTION TO LISP
 
FUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPTFUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPT
 
Loaders and Linkers
Loaders and LinkersLoaders and Linkers
Loaders and Linkers
 
Theory of programming
Theory of programmingTheory of programming
Theory of programming
 
Oops ppt
Oops pptOops ppt
Oops ppt
 
Conditional and control statement
Conditional and control statementConditional and control statement
Conditional and control statement
 
Passes of compilers
Passes of compilersPasses of compilers
Passes of compilers
 
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
Programming Languages Categories / Programming Paradigm By: Prof. Lili Saghafi
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
 
Python Flow Control
Python Flow ControlPython Flow Control
Python Flow Control
 
Input output statement in C
Input output statement in CInput output statement in C
Input output statement in C
 
Software cost estimation techniques presentation
Software cost estimation techniques presentationSoftware cost estimation techniques presentation
Software cost estimation techniques presentation
 
Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design
 
Type checking in compiler design
Type checking in compiler designType checking in compiler design
Type checking in compiler design
 
Intermediate code generation in Compiler Design
Intermediate code generation in Compiler DesignIntermediate code generation in Compiler Design
Intermediate code generation in Compiler Design
 
Control structures in java
Control structures in javaControl structures in java
Control structures in java
 
Python ppt
Python pptPython ppt
Python ppt
 
Input-Buffering
Input-BufferingInput-Buffering
Input-Buffering
 
Type checking compiler construction Chapter #6
Type checking compiler construction Chapter #6Type checking compiler construction Chapter #6
Type checking compiler construction Chapter #6
 

Ähnlich wie Programming Paradigms

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
 

Ähnlich wie Programming Paradigms (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
 
What`s New in Java 8
What`s New in Java 8What`s New in Java 8
What`s New in Java 8
 

Mehr von 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
 

Mehr von 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

The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)codyslingerland1
 
Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Muhammad Tiham Siddiqui
 
Top 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTop 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTopCSSGallery
 
Extra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfExtra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfInfopole1
 
UiPath Studio Web workshop series - Day 1
UiPath Studio Web workshop series  - Day 1UiPath Studio Web workshop series  - Day 1
UiPath Studio Web workshop series - Day 1DianaGray10
 
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENTSIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENTxtailishbaloch
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
Automation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projectsAutomation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projectsDianaGray10
 
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdfQ4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdfTejal81
 
2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdfThe Good Food Institute
 
Technical SEO for Improved Accessibility WTS FEST
Technical SEO for Improved Accessibility  WTS FESTTechnical SEO for Improved Accessibility  WTS FEST
Technical SEO for Improved Accessibility WTS FESTBillieHyde
 
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Alkin Tezuysal
 
CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024Brian Pichman
 
Scenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosScenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosErol GIRAUDY
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxKaustubhBhavsar6
 
UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2DianaGray10
 
Introduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationIntroduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationKnoldus Inc.
 
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInOutage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInThousandEyes
 
Oracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptxOracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptxSatishbabu Gunukula
 
20140402 - Smart house demo kit
20140402 - Smart house demo kit20140402 - Smart house demo kit
20140402 - Smart house demo kitJamie (Taka) Wang
 

Último (20)

The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)
 
Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)
 
Top 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTop 10 Squarespace Development Companies
Top 10 Squarespace Development Companies
 
Extra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfExtra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdf
 
UiPath Studio Web workshop series - Day 1
UiPath Studio Web workshop series  - Day 1UiPath Studio Web workshop series  - Day 1
UiPath Studio Web workshop series - Day 1
 
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENTSIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Automation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projectsAutomation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projects
 
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdfQ4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
 
2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf
 
Technical SEO for Improved Accessibility WTS FEST
Technical SEO for Improved Accessibility  WTS FESTTechnical SEO for Improved Accessibility  WTS FEST
Technical SEO for Improved Accessibility WTS FEST
 
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
 
CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024
 
Scenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosScenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenarios
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptx
 
UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2
 
Introduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationIntroduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its application
 
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInOutage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
 
Oracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptxOracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptx
 
20140402 - Smart house demo kit
20140402 - Smart house demo kit20140402 - Smart house demo kit
20140402 - Smart house demo kit
 

Programming Paradigms

  • 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