If Streams Are So Great, Let’s Use Them Everywhere... Right??
summary
Compares concrete Java patterns: replaces simple loops with Stream operations for readability, shows IntStream.range to keep indexes, and warns flatMap plus boxing makes a cross‑product less readable; uses collectors (groupingBy + counting) vs Map.merge and computeIfAbsent for histograms of ~800 cities; parses millions of lines with mapMulti to avoid double parsing and handle NumberFormatExceptions; demos thread timing where 40 tasks finish in 5s with a stream, 1s for manual threaded start/join, and ~4s with a parallel stream, exposing lazy consumption and unpredictable splitting.
AI-written summary · about
chapters (7)
- 0:00Introduction and context
- 2:44Unconference movement
- 4:29Streams vs loops basics
- 18:03Using collectors
- 35:44Exception handling
- 44:13Stream evaluation demo
- 49:33Conclusion
related talks
44mI didn't know you could do that with Java Streams!
01h 00mLet’s Get to the Rapids: Java 8 Stream Performance
44mThinking in Streams
49mJava Streams: Beyond The Basics
10mJava streams performance and optimization
47mWhen Greed Is Good: Understanding Java Stream Performance
47mStreams – Below the Surface
46mThinking in Streams
