Understanding Functional Programming
Published by O'Reilly Media, Inc.
Transitioning Java from imperative to functional
The imperative style of programming is more common in Java, but a functional programming approach has less accidental complexity. Syntactically, code is more concise and elegant when written in a functional style. Semantically, functional code has fewer bugs and is easier to parallelize. Yet we Java programmers struggle to embrace functional style.
Join expert Venkat Subramaniam to learn how to combine and use the good parts of Java, the object-oriented paradigm, and the functional style of programming. You’ll learn to think functionally and leverage the powerful APIs of the JDK that are geared toward functional programming as you work to refactor a series of problems to use the functional style. The enemy isn’t the object-oriented style—it’s the accidental complexity that stems from the imperative style. Discover approaches and techniques for using functional style to reduce the complexity of your code, along with benefits, trade-offs, and practical examples that will point you in the right direction.
What you’ll learn and how you can apply it
By the end of this live online course, you’ll understand:
- The essence of functional programming
- How to solve problems using a functional approach
- How to break a problem into functional composition
And you’ll be able to:
- Refactor Java code from the imperative to the functional style
- Reduce the overall complexity of your code
- Reduce errors and make your code easier to maintain
This live event is for you because...
- You’re a Java developer, technical lead, architect, or hands-on manager.
- You work with Java and highly complex applications.
- You want to become better at dealing with complexity and reducing defects in code.
Prerequisites
- A computer that’s capable of running Gradle builds to run automated tests
- A working knowledge of Java 8 or newer
- Download IntellJ IDEA Community Edition
- Familiarity with general programming concepts
Recommended preparation:
- Read Object-Oriented vs. Functional Programming (report)
Recommended follow-up:
- Take Functional Programming in Java (live online training course with Ken Kousen)
Schedule
The time frames are only estimates and may vary according to how the class is progressing.
Thinking in a functional style (60 minutes)
- Presentation: Thinking in a functional style; transforming data
- Group discussion: Functional composition and data transformation
- Hands-on exercise: Refactor to use functional composition
- Q&A
- Break (5 minutes)
Exploring functional APIs (60 minutes)
- Presentation: Exploring functional APIs
- Group discussion: Looking for APIs that perform data transformations
- Hands-on exercise: Refactor to use existing functional APIs
- Q&A
- Break (5 minutes)
Complex higher-order functions (60 minutes)
- Presentation: Learning to use complex higher-order functions
- Group discussion: Powerful functions for grouping and manipulating data
- Hands-on exercise: Refactor to use complex functions for data manipulation
- Q&A
- Break (5 minutes)
map versus flatMap (60 minutes)
- Presentation: When to use map; when to use flatMap
- Group discussion: The nature of functions; when to use map versus flatMap
- Hands-on exercise: Refactor to use flatMap
- Q&A
Your Instructor
Venkat Subramaniam
Venkat Subramaniam is the founder of Agile Developer Inc., creator of Agilelearner.com, cofounder of the dev.next software conference, and an instructional professor at the University of Houston. Venkat helps his clients effectively apply and succeed with sustainable Agile practices on their software projects. He’s trained and mentored thousands of software developers in the US, Canada, Europe, and Asia and is a regularly invited speaker at several international conferences. He’s also the author or coauthor of a number of technical books, including the 2007 Jolt Productivity Award-winning Practices of an Agile Developer.