Nick Samoylov's Blog

August 24, 2020

Do you like classical music?

why classical music is not as popular as some other music genres? Well, many classical venues are packed, but pop music is called so for the reason – it IS most popular.


The post Do you like classical music? appeared first on Nick Samoylov, programmer and writer.

 •  0 comments  •  flag
Share on Twitter
Published on August 24, 2020 17:22

The source of any energy and change

Everything is moving and changing all the time. Why? What drives the change?


The post The source of any energy and change appeared first on Nick Samoylov, programmer and writer.

 •  0 comments  •  flag
Share on Twitter
Published on August 24, 2020 17:13

Everybody lies

We come to this world and assume it to be a stable one, with clear binary classification. Then one reads Wittgenstein or something similar and discovered the lies at the foundation of their world view. Then what?


The post Everybody lies appeared first on Nick Samoylov, programmer and writer.

 •  0 comments  •  flag
Share on Twitter
Published on August 24, 2020 17:05

August 22, 2020

Java streams 42. Collect 18. Collectors.teeing() collector

The Collectors.teeing() collects stream elements twice concurrently, produces two results, and then uses the specified function to merge them into one final object.


The post Java streams 42. Collect 18. Collectors.teeing() collector appeared first on Nick Samoylov, programmer and writer.

 •  0 comments  •  flag
Share on Twitter
Published on August 22, 2020 17:03

August 21, 2020

Java streams 41. Collect 17. Collectors.collectingAndThen() collector

The Collectors.collectingAndThen() allows collect the stream elements and add another (finishing) transformation to the result. It is especially useful for creating multi-level groups using Collectors.groupingBy() or Collectors.partitioningBy().


The post Java streams 41. Collect 17. Collectors.collectingAndThen() collector appeared first on Nick Samoylov, programmer and writer.

 •  0 comments  •  flag
Share on Twitter
Published on August 21, 2020 10:41

August 17, 2020

Java streams 40. Collect 16. Collectors.toUnmodifiableList/Set/Map() collectors

The Collectors.toUnmodifiableList/Set/Map() collectors create corresponding unmodifiable (elements cannot be added o removed) structure. That is why such a collector especially useful for creating multi-level groups using Collectors.groupingBy() or Collectors.partitioningBy().


The post Java streams 40. Collect 16. Collectors.toUnmodifiableList/Set/Map() collectors appeared first on Nick Samoylov, programmer and writer.

 •  0 comments  •  flag
Share on Twitter
Published on August 17, 2020 15:41

August 15, 2020

Java streams 39. Collect 15. Collectors.filtering() collector

The Collectors.filtering() collector does two things at the same time: selects (filters) some of stream element and collects the results into one structure. That is why such a collector especially useful for creating multi-level groups using Collectors.groupingBy() or Collectors.partitioningBy().


The post Java streams 39. Collect 15. Collectors.filtering() collector appeared first on Nick Samoylov, programmer and writer.

 •  0 comments  •  flag
Share on Twitter
Published on August 15, 2020 20:23

Java streams 38. Collect 14. Collectors.reducing() collector

The Collectors.reducing() collector does two things at the same time: transforms each stream element and collects the results into one structure. That is why such a collector especially useful for creating multi-level groups using Collectors.groupingBy() or Collectors.partitioningBy().


The post Java streams 38. Collect 14. Collectors.reducing() collector appeared first on Nick Samoylov, programmer and writer.

 •  0 comments  •  flag
Share on Twitter
Published on August 15, 2020 17:56

August 2, 2020

Java streams 37. Collect 13. Collectors.flatMapping() collector

The Collectors.flatMapping() collector does two things at the same time: transforms each element into a stream of values and assembles the result. That is why such a collector especially useful as a parameter when a collector is created by Collectors.groupingBy() or Collectors.partitioningBy().


The post Java streams 37. Collect 13. Collectors.flatMapping() collector appeared first on Nick Samoylov, programmer and writer.

 •  0 comments  •  flag
Share on Twitter
Published on August 02, 2020 16:26

Java streams 36. Collect 12. Collectors.mapping() collector

The Collectors.mapping() collector does two things at the same time: transforms each element and assembles the results. That is why such a collector especially useful as a parameter when a collector is created by Collectors.groupingBy() or Collectors.partitioningBy().


The post Java streams 36. Collect 12. Collectors.mapping() collector appeared first on Nick Samoylov, programmer and writer.

 •  0 comments  •  flag
Share on Twitter
Published on August 02, 2020 10:59