25+ yr Java/JS dev
Linux novice - running Ubuntu (no windows/mac)

  • 1 Post
  • 943 Comments
Joined 1 year ago
cake
Cake day: June 14th, 2023

help-circle


  • I would only note that for the vast majority of my experience these streams can only return up to a single match. Determinism isn’t really preserved by findFirst, either, unless the sort order is set up that way.

    Finding the first Jim Jones in a table is no more reliable that finding any Jim Jones. But finding PersonId 13579 is deterministic whether you findFirst or findAny.

    Perhaps you work in a different domain where your experience is different.


  • I try to prefer .findAny() over .findFirst() because it will perform better in some cases (it will have to resolve whether there are other matches and which one is actually first before it can terminate - more relevant for parallel streams I think. findAny short circuits that) but otherwise I like the first. I’d probably go with some sort of composed predicate for the second, to be able to easily add new criteria. But I could be over engineering.

    I mostly just posted because I think not enough people are aware of the reasons to use findAny as a default unless findFirst is needed.



  • I asked ChatGPT for a tldr because same. The result reads like ad copy. Idk, man.


    The memory packaging market is evolving with advancements like flip-chip, wire-bond, and through-silicon via (TSV) technologies. These innovations enable smaller, more powerful, and faster devices, particularly in smartphones, where efficient space use is crucial for sleek designs. DRAM, while still used in PCs, faces declining adoption due to its complexity and the rise of alternatives like 3D TSV, which offer better functionality. The APAC region, especially China, is leading the growth in memory packaging, driven by investments in assembly infrastructure and rising demand for mobile applications using system-in-package (SiP) technologies.