Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore the intricacies of the Streams API and lambda expressions introduced in JDK 8 through this informative conference talk. Delve into practical examples showcasing good, bad, and ugly implementations of streams in Java programming. Learn how to leverage these powerful features effectively while avoiding common pitfalls that can lead to difficult-to-read and hard-to-maintain code. Gain insights from industry experts Simon Ritter and Stuart Marks as they guide you through various scenarios, including non-stream code, improved stream implementations, functional thinking, iteration techniques, and parallel stream considerations. Discover new ways to optimize your Java code using streams and lambdas, and understand which approaches to avoid for better code quality and maintainability.
Syllabus
Intro
Goals Of This Session
Problem To Solve
Non-Stream Code
My Stream Code (Ugly)
Stream Code (Better)
Stream Code (Better JDK 9)
Not Thinking Functional
Almost Functional (But Not Quite)
Mixed Iteration (Bad)
Internal Iteration (But Ugly)
Internal Iteration (Good)
Mixed Interation (Still Bad)
Simple Exercise
Alternative Reduction (Bad)
Reduction By Collection (Complex)
Stream Reuse (Good or Bad?)
Multi-Sort (Bad)
Parallel Streams Are Faster, Right?
Custom Pools For Parallel Streams
Conclusions
Taught by
Java