~/talk

I didn't know you could do that with Java Streams!

Talkat Devworld Conference 2025 · 2025-02-27..02-28· [java]
links:none on file
slides:none on file

Shows concrete rewrites: replace collect-then-index-or-empty with findAny vs findFirst for order-of-magnitude fewer elements processed; swap nested loops for flatMap + Optional.stream to drop isPresent/get anti-patterns; use collectors like collectors.joining, groupingBy with a merge function to pick the cheapest per category, and collectors.counting instead of manual maps. Uses IntStream.rangeClosed and reduce to sum BigDecimal, demos parallelStream speeding a sqrt+sum over 100,000 numbers, and recommends JMH microbenchmarks.

AI-written summary · about

  1. 0:00Introduction
  2. 1:15When to use Streams effectively
  3. 3:20Basic Stream operations
  4. 5:04findAny vs findFirst
  5. 9:40AnyMatch, nonMatch and allMatch for conditions
  6. 11:46FlatMap for nested collections
  7. 15:12Collectors joining strings
  8. 17:42Min and max with comparators
  9. 19:08MapToInt and IntStream.range
  10. 21:14Reduce for aggregation
  11. 23:22Instance checks with class literals
  12. 25:13Parallel streams for threading
  13. 27:42Sorted and limit for top elements
  14. 29:49Count and distinct for uniqueness
  15. 31:54Immutable lists in Java 16+
  16. 32:56Grouping and mapping in collectors
  17. 38:40Collectors mapping nested
  18. 40:45Collectors counting frequencies
  19. 42:34Resources and closing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.