SlideShare a Scribd company logo
Oh-Oh to Functional 
Introduction to Functional Thinking 
naresh@agilefaqs.com 
@nashjain 
http://nareshjain.com
Agenda 
Object-Oriented Design Principles (SOLID, DRY) 
Functional Concepts 
Single Abstract Method (SAM) 
Pure Functions 
Immutability 
High-Order Functions 
Lambda Expressions 
Lazy evaluation 
Functional Composition 
Declarative vs. Imperative programming style 
Quick Demo - Java 8 Functional Features
Commercial Break!
http://agilefaqs.com | Copyright © 2014, AgileFAQs. All Rights Reserved.
Mumbai
Tech Talks!
MathWorks Game 
Courtesy 
dhaval@agilefaqs.com 
@softwareartisan
2 
4 
5 
1 
2 
6 
4 
Σ 
xⁿ 
5 
7 
11
Story #1 
As a Kid learning arithmetics, 
I want to identify even numbers 
So that I can grow my understanding of 
odd and even numbers.
Acceptance Criteria 
#1 
Given numbers 1, 2, 3, 4, 5 and 6 
When using the Odd filter and emptying contents of the 
source bucket to target bucket 
Then target bucket should contain 2, 4 and 6. 
#2 
Given numbers -2 and 3 
When using the odd filter and emptying contents of the 
source bucket to target bucket 
Then target bucket should contain -2.
1 
6 
2 
4 
5 
3 
7 
Σ 
xⁿ 
9
Story #2 
As a Kid learning arithmetics, 
I want to identify prime numbers 
So that I can differentiate between 
composite and prime numbers.
Acceptance Criteria 
#1 
Given numbers 2, 4, 6, 7, 9 and 11 
When using Prime filter and emptying contents of the 
source bucket to target bucket 
Then target bucket should contain 2, 7 and 11. 
#2 
Given numbers -1, -2, 3, and 4 
When using Prime filter and emptying contents of the 
source bucket to target bucket 
Then target bucket should contain 3.
1 
11 
2 
4 
5 
-3 
4 
Σ 
xⁿ 
9 
7
Story #3 
As a Kid learning arithmetics, 
I want to identify odd primes 
So that I can understand numbers that 
are odd and primes at the same time.
Acceptance Criteria 
Given numbers 2, 4, 5, 6 and 7 
When using the Odd and prime filters 
and emptying contents of the source 
bucket to target bucket 
Then target bucket should contain 5 
and 7.
2 
4 
5 
1 
2 
6 
4 
Σ 
xⁿ 
5 
7 
11
Story #4 
As a Kid learning arithmetics, 
I want to identify numbers within a 
range 
So that I can grow my understanding 
of ranges.
Acceptance Criteria 
Given there are numbers 5, 7, 10 and 15 
When using the range between 5..10 
and emptying contents of the source 
bucket to target bucket 
Then target bucket should contain 5, 7 
and 10.
2 
4 
5 
3 
8 
1 
7 
Σ 
xⁿ 
9
Story #5 
As a Kid learning arithmetics, 
I want to sum all the numbers that are 
in the bucket. 
So that I can learn addition.
Acceptance Criteria 
Given numbers 5, 7, 10 and 5 
When using the aggregator and 
emptying contents of the source bucket 
to target bucket 
Then target bucket should contain 27.
2 
4 
5 
1 
2 
6 
4 
Σ 
xⁿ 
12 
11 
Σ
Story #6 
As a Kid learning arithmetics, 
I want to multiply all numbers in a 
bucket. 
So that I can grow my understanding 
of numbers.
Acceptance Criteria 
Given numbers 2, 4 and 6 
When using the multiplier and 
emptying contents of the source bucket 
to target bucket 
Then target bucket should contain 48.
2 
4 
5 
1 
2 
6 
4 
Σ 
xⁿ 
48 
11 
*
Story #7 
As a Kid learning arithmetics, 
I want to sum all odd primes within a 
range. 
So that I can grow my understanding 
of numbers.
Acceptance Criteria 
Given numbers 1, 2, 5, 7, 8, 10 and 15 
When using the range 2..10 and 
emptying contents of the source bucket 
to target bucket 
Then target bucket should contain 12.
2 
4 
5 
1 
2 
6 
4 
Σ 
xⁿ 
5 
7 
11 
Σ 
12
Functional Features in 
Java 8 
Quick Demo
Thank You 
Questions? 
naresh@agilefaqs.com 
@nashjain

More Related Content

Similar to Oh Oh To Functional

NCTM 2010 Regional Conferences & Expositions Denver 1
NCTM 2010 Regional Conferences & Expositions Denver 1NCTM 2010 Regional Conferences & Expositions Denver 1
NCTM 2010 Regional Conferences & Expositions Denver 1
Jimmy Keng
 
NCTM 2015 Filling Knowledge Gaps with Critical Singapore Math® Approach (Gr. ...
NCTM 2015 Filling Knowledge Gaps with Critical Singapore Math® Approach (Gr. ...NCTM 2015 Filling Knowledge Gaps with Critical Singapore Math® Approach (Gr. ...
NCTM 2015 Filling Knowledge Gaps with Critical Singapore Math® Approach (Gr. ...
Cassandra Turner
 
Division.pptx
Division.pptxDivision.pptx
Division.pptx
MonaMishra23
 
Presentation 5 quantity magnitude and numeration january 2
Presentation 5 quantity   magnitude and numeration january 2Presentation 5 quantity   magnitude and numeration january 2
Presentation 5 quantity magnitude and numeration january 2jcsmathfoundations
 
1. guía de trabajo autónomo 8vo 2021
1. guía de trabajo autónomo 8vo  20211. guía de trabajo autónomo 8vo  2021
1. guía de trabajo autónomo 8vo 2021
Jesse Fernández
 
Fridge magnets
Fridge magnetsFridge magnets
Fridge magnets
stuartwoodhall
 
RANCANGAN PENGAJARAN TAHUNAN-Mathematics-Year-1-DLP-2021.docx
RANCANGAN PENGAJARAN TAHUNAN-Mathematics-Year-1-DLP-2021.docxRANCANGAN PENGAJARAN TAHUNAN-Mathematics-Year-1-DLP-2021.docx
RANCANGAN PENGAJARAN TAHUNAN-Mathematics-Year-1-DLP-2021.docx
krock171
 
1. python for data science
1. python for data science1. python for data science
1. python for data science
Dr Nisha Arora
 
New Teacher Institute 2013
New Teacher Institute 2013New Teacher Institute 2013
New Teacher Institute 2013Kimberly Beane
 
Harry's Shop Finances Main Activity
Harry's Shop Finances Main ActivityHarry's Shop Finances Main Activity
Harry's Shop Finances Main Activitywats300
 

Similar to Oh Oh To Functional (12)

NCTM 2010 Regional Conferences & Expositions Denver 1
NCTM 2010 Regional Conferences & Expositions Denver 1NCTM 2010 Regional Conferences & Expositions Denver 1
NCTM 2010 Regional Conferences & Expositions Denver 1
 
NCTM 2015 Filling Knowledge Gaps with Critical Singapore Math® Approach (Gr. ...
NCTM 2015 Filling Knowledge Gaps with Critical Singapore Math® Approach (Gr. ...NCTM 2015 Filling Knowledge Gaps with Critical Singapore Math® Approach (Gr. ...
NCTM 2015 Filling Knowledge Gaps with Critical Singapore Math® Approach (Gr. ...
 
Division.pptx
Division.pptxDivision.pptx
Division.pptx
 
Presentation 5 quantity magnitude and numeration january 2
Presentation 5 quantity   magnitude and numeration january 2Presentation 5 quantity   magnitude and numeration january 2
Presentation 5 quantity magnitude and numeration january 2
 
Math Gr4 Ch5
Math Gr4 Ch5Math Gr4 Ch5
Math Gr4 Ch5
 
1. guía de trabajo autónomo 8vo 2021
1. guía de trabajo autónomo 8vo  20211. guía de trabajo autónomo 8vo  2021
1. guía de trabajo autónomo 8vo 2021
 
Fridge magnets
Fridge magnetsFridge magnets
Fridge magnets
 
RANCANGAN PENGAJARAN TAHUNAN-Mathematics-Year-1-DLP-2021.docx
RANCANGAN PENGAJARAN TAHUNAN-Mathematics-Year-1-DLP-2021.docxRANCANGAN PENGAJARAN TAHUNAN-Mathematics-Year-1-DLP-2021.docx
RANCANGAN PENGAJARAN TAHUNAN-Mathematics-Year-1-DLP-2021.docx
 
Math Gr4 Ch7
Math Gr4 Ch7Math Gr4 Ch7
Math Gr4 Ch7
 
1. python for data science
1. python for data science1. python for data science
1. python for data science
 
New Teacher Institute 2013
New Teacher Institute 2013New Teacher Institute 2013
New Teacher Institute 2013
 
Harry's Shop Finances Main Activity
Harry's Shop Finances Main ActivityHarry's Shop Finances Main Activity
Harry's Shop Finances Main Activity
 

More from Naresh Jain

Problem Solving Techniques For Evolutionary Design
Problem Solving Techniques For Evolutionary DesignProblem Solving Techniques For Evolutionary Design
Problem Solving Techniques For Evolutionary Design
Naresh Jain
 
Agile India 2019 Conference Welcome Note
Agile India 2019 Conference Welcome NoteAgile India 2019 Conference Welcome Note
Agile India 2019 Conference Welcome Note
Naresh Jain
 
Organizational Resilience
Organizational ResilienceOrganizational Resilience
Organizational Resilience
Naresh Jain
 
Improving the Quality of Incoming Code
Improving the Quality of Incoming CodeImproving the Quality of Incoming Code
Improving the Quality of Incoming Code
Naresh Jain
 
Agile India 2018 Conference Summary
Agile India 2018 Conference SummaryAgile India 2018 Conference Summary
Agile India 2018 Conference Summary
Naresh Jain
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
Naresh Jain
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
Naresh Jain
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
Naresh Jain
 
Pilgrim's Progress to the Promised Land by Robert Virding
Pilgrim's Progress to the Promised Land by Robert VirdingPilgrim's Progress to the Promised Land by Robert Virding
Pilgrim's Progress to the Promised Land by Robert Virding
Naresh Jain
 
Concurrent languages are Functional by Francesco Cesarini
Concurrent languages are Functional by Francesco CesariniConcurrent languages are Functional by Francesco Cesarini
Concurrent languages are Functional by Francesco Cesarini
Naresh Jain
 
Erlang from behing the trenches by Francesco Cesarini
Erlang from behing the trenches by Francesco CesariniErlang from behing the trenches by Francesco Cesarini
Erlang from behing the trenches by Francesco Cesarini
Naresh Jain
 
Anatomy of an eCommerce Search Engine by Mayur Datar
Anatomy of an eCommerce Search Engine by Mayur DatarAnatomy of an eCommerce Search Engine by Mayur Datar
Anatomy of an eCommerce Search Engine by Mayur Datar
Naresh Jain
 
Setting up Continuous Delivery Culture for a Large Scale Mobile App
Setting up Continuous Delivery Culture for a Large Scale Mobile AppSetting up Continuous Delivery Culture for a Large Scale Mobile App
Setting up Continuous Delivery Culture for a Large Scale Mobile App
Naresh Jain
 
Towards FutureOps: Stable, Repeatable environments from Dev to Prod
Towards FutureOps: Stable, Repeatable environments from Dev to ProdTowards FutureOps: Stable, Repeatable environments from Dev to Prod
Towards FutureOps: Stable, Repeatable environments from Dev to Prod
Naresh Jain
 
Value Driven Development by Dave Thomas
Value Driven Development by Dave Thomas Value Driven Development by Dave Thomas
Value Driven Development by Dave Thomas
Naresh Jain
 
No Silver Bullets in Functional Programming by Brian McKenna
No Silver Bullets in Functional Programming by Brian McKennaNo Silver Bullets in Functional Programming by Brian McKenna
No Silver Bullets in Functional Programming by Brian McKenna
Naresh Jain
 
Functional Programming Conference 2016
Functional Programming Conference 2016Functional Programming Conference 2016
Functional Programming Conference 2016
Naresh Jain
 
Agile India 2017 Conference
Agile India 2017 ConferenceAgile India 2017 Conference
Agile India 2017 Conference
Naresh Jain
 
The Eclipse Way
The Eclipse WayThe Eclipse Way
The Eclipse Way
Naresh Jain
 
Unleashing the Power of Automated Refactoring with JDT
Unleashing the Power of Automated Refactoring with JDTUnleashing the Power of Automated Refactoring with JDT
Unleashing the Power of Automated Refactoring with JDT
Naresh Jain
 

More from Naresh Jain (20)

Problem Solving Techniques For Evolutionary Design
Problem Solving Techniques For Evolutionary DesignProblem Solving Techniques For Evolutionary Design
Problem Solving Techniques For Evolutionary Design
 
Agile India 2019 Conference Welcome Note
Agile India 2019 Conference Welcome NoteAgile India 2019 Conference Welcome Note
Agile India 2019 Conference Welcome Note
 
Organizational Resilience
Organizational ResilienceOrganizational Resilience
Organizational Resilience
 
Improving the Quality of Incoming Code
Improving the Quality of Incoming CodeImproving the Quality of Incoming Code
Improving the Quality of Incoming Code
 
Agile India 2018 Conference Summary
Agile India 2018 Conference SummaryAgile India 2018 Conference Summary
Agile India 2018 Conference Summary
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
 
Pilgrim's Progress to the Promised Land by Robert Virding
Pilgrim's Progress to the Promised Land by Robert VirdingPilgrim's Progress to the Promised Land by Robert Virding
Pilgrim's Progress to the Promised Land by Robert Virding
 
Concurrent languages are Functional by Francesco Cesarini
Concurrent languages are Functional by Francesco CesariniConcurrent languages are Functional by Francesco Cesarini
Concurrent languages are Functional by Francesco Cesarini
 
Erlang from behing the trenches by Francesco Cesarini
Erlang from behing the trenches by Francesco CesariniErlang from behing the trenches by Francesco Cesarini
Erlang from behing the trenches by Francesco Cesarini
 
Anatomy of an eCommerce Search Engine by Mayur Datar
Anatomy of an eCommerce Search Engine by Mayur DatarAnatomy of an eCommerce Search Engine by Mayur Datar
Anatomy of an eCommerce Search Engine by Mayur Datar
 
Setting up Continuous Delivery Culture for a Large Scale Mobile App
Setting up Continuous Delivery Culture for a Large Scale Mobile AppSetting up Continuous Delivery Culture for a Large Scale Mobile App
Setting up Continuous Delivery Culture for a Large Scale Mobile App
 
Towards FutureOps: Stable, Repeatable environments from Dev to Prod
Towards FutureOps: Stable, Repeatable environments from Dev to ProdTowards FutureOps: Stable, Repeatable environments from Dev to Prod
Towards FutureOps: Stable, Repeatable environments from Dev to Prod
 
Value Driven Development by Dave Thomas
Value Driven Development by Dave Thomas Value Driven Development by Dave Thomas
Value Driven Development by Dave Thomas
 
No Silver Bullets in Functional Programming by Brian McKenna
No Silver Bullets in Functional Programming by Brian McKennaNo Silver Bullets in Functional Programming by Brian McKenna
No Silver Bullets in Functional Programming by Brian McKenna
 
Functional Programming Conference 2016
Functional Programming Conference 2016Functional Programming Conference 2016
Functional Programming Conference 2016
 
Agile India 2017 Conference
Agile India 2017 ConferenceAgile India 2017 Conference
Agile India 2017 Conference
 
The Eclipse Way
The Eclipse WayThe Eclipse Way
The Eclipse Way
 
Unleashing the Power of Automated Refactoring with JDT
Unleashing the Power of Automated Refactoring with JDTUnleashing the Power of Automated Refactoring with JDT
Unleashing the Power of Automated Refactoring with JDT
 

Recently uploaded

Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 

Recently uploaded (20)

Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 

Oh Oh To Functional

  • 1. Oh-Oh to Functional Introduction to Functional Thinking naresh@agilefaqs.com @nashjain http://nareshjain.com
  • 2. Agenda Object-Oriented Design Principles (SOLID, DRY) Functional Concepts Single Abstract Method (SAM) Pure Functions Immutability High-Order Functions Lambda Expressions Lazy evaluation Functional Composition Declarative vs. Imperative programming style Quick Demo - Java 8 Functional Features
  • 4. http://agilefaqs.com | Copyright © 2014, AgileFAQs. All Rights Reserved.
  • 6.
  • 7.
  • 8.
  • 10.
  • 11. MathWorks Game Courtesy dhaval@agilefaqs.com @softwareartisan
  • 12. 2 4 5 1 2 6 4 Σ xⁿ 5 7 11
  • 13. Story #1 As a Kid learning arithmetics, I want to identify even numbers So that I can grow my understanding of odd and even numbers.
  • 14. Acceptance Criteria #1 Given numbers 1, 2, 3, 4, 5 and 6 When using the Odd filter and emptying contents of the source bucket to target bucket Then target bucket should contain 2, 4 and 6. #2 Given numbers -2 and 3 When using the odd filter and emptying contents of the source bucket to target bucket Then target bucket should contain -2.
  • 15. 1 6 2 4 5 3 7 Σ xⁿ 9
  • 16. Story #2 As a Kid learning arithmetics, I want to identify prime numbers So that I can differentiate between composite and prime numbers.
  • 17. Acceptance Criteria #1 Given numbers 2, 4, 6, 7, 9 and 11 When using Prime filter and emptying contents of the source bucket to target bucket Then target bucket should contain 2, 7 and 11. #2 Given numbers -1, -2, 3, and 4 When using Prime filter and emptying contents of the source bucket to target bucket Then target bucket should contain 3.
  • 18. 1 11 2 4 5 -3 4 Σ xⁿ 9 7
  • 19. Story #3 As a Kid learning arithmetics, I want to identify odd primes So that I can understand numbers that are odd and primes at the same time.
  • 20. Acceptance Criteria Given numbers 2, 4, 5, 6 and 7 When using the Odd and prime filters and emptying contents of the source bucket to target bucket Then target bucket should contain 5 and 7.
  • 21. 2 4 5 1 2 6 4 Σ xⁿ 5 7 11
  • 22. Story #4 As a Kid learning arithmetics, I want to identify numbers within a range So that I can grow my understanding of ranges.
  • 23. Acceptance Criteria Given there are numbers 5, 7, 10 and 15 When using the range between 5..10 and emptying contents of the source bucket to target bucket Then target bucket should contain 5, 7 and 10.
  • 24. 2 4 5 3 8 1 7 Σ xⁿ 9
  • 25. Story #5 As a Kid learning arithmetics, I want to sum all the numbers that are in the bucket. So that I can learn addition.
  • 26. Acceptance Criteria Given numbers 5, 7, 10 and 5 When using the aggregator and emptying contents of the source bucket to target bucket Then target bucket should contain 27.
  • 27. 2 4 5 1 2 6 4 Σ xⁿ 12 11 Σ
  • 28. Story #6 As a Kid learning arithmetics, I want to multiply all numbers in a bucket. So that I can grow my understanding of numbers.
  • 29. Acceptance Criteria Given numbers 2, 4 and 6 When using the multiplier and emptying contents of the source bucket to target bucket Then target bucket should contain 48.
  • 30. 2 4 5 1 2 6 4 Σ xⁿ 48 11 *
  • 31. Story #7 As a Kid learning arithmetics, I want to sum all odd primes within a range. So that I can grow my understanding of numbers.
  • 32. Acceptance Criteria Given numbers 1, 2, 5, 7, 8, 10 and 15 When using the range 2..10 and emptying contents of the source bucket to target bucket Then target bucket should contain 12.
  • 33. 2 4 5 1 2 6 4 Σ xⁿ 5 7 11 Σ 12
  • 34. Functional Features in Java 8 Quick Demo
  • 35. Thank You Questions? naresh@agilefaqs.com @nashjain