Nick Samoylov's Blog, page 5

March 29, 2020

Understand yourself as the product of evolution

The sense of boredom (from getting the same experience again and again) pushed people to look for something new. Those who did, survived better, so the evolution gifted us with not being satisfied with what we have ever.


The post Understand yourself as the product of evolution appeared first on Nick Samoylov, programmer and writer.

 •  0 comments  •  flag
Share on Twitter
Published on March 29, 2020 15:08

Divided brains

The right hemisphere (that manages the left side of our body), among other things, tends to integrate and include, while the left hemisphere looks for a simple solution, better the one already proven to be successful before.


The post Divided brains appeared first on Nick Samoylov, programmer and writer.

 •  0 comments  •  flag
Share on Twitter
Published on March 29, 2020 13:41

March 21, 2020

Java streams 21. Class Optional

The purpose of an object of Optional class is to avoid returning null as it may cause NullPointerException. Instead, an Optional object provides methods that allow checking the presence of a value and substituting it with a predefined value if the return value is null.


The post Java streams 21. Class Optional appeared first on Nick Samoylov, programmer and writer.

 •  0 comments  •  flag
Share on Twitter
Published on March 21, 2020 15:39

March 14, 2020

Communism vs Capitalism

The primary difference between communism and capitalism is not “totalitarian” or “democratic.” What delineates them fundamentally is the ownership of the means of production


The post Communism vs Capitalism appeared first on Nick Samoylov, programmer and writer.

 •  0 comments  •  flag
Share on Twitter
Published on March 14, 2020 08:56

March 1, 2020

Java streams 20. AnyMatch, allMatch, or noneMatch

Terminal operations either return values of other types or do not return anything at all (produce just side effects). They do not allow other operations to be applied and close the stream.


The post Java streams 20. AnyMatch, allMatch, or noneMatch appeared first on Nick Samoylov.

 •  0 comments  •  flag
Share on Twitter
Published on March 01, 2020 10:39

Java streams 19. Count, forEach, or forEachOrdered

A terminal operation produces side effects or/and a single value. The operation that produces side effects only can be used for an infinite Stream. But the operation that produces a single value never returns any value for an infinite Stream.


The post Java streams 19. Count, forEach, or forEachOrdered appeared first on Nick Samoylov.

 •  0 comments  •  flag
Share on Twitter
Published on March 01, 2020 10:22

February 24, 2020

Renaissance Italy stimuli

Renaissance Italy fascinates us, especially since we perceive it as coming from nowhere. Suddenly–from the darkness of Middle Ages–emerges bright and colorful art and productive thoughts. That is how the Italian Renaissance is perceived in popular culture, or used to be perceived, to be precise because that view changes. Historians knew it for quite a […]


The post Renaissance Italy stimuli appeared first on Nick Samoylov.

 •  0 comments  •  flag
Share on Twitter
Published on February 24, 2020 00:38

February 23, 2020

Trust (yourself) but verify

We are motivated by our desires, aren’t we? And it seems that our goal is to indulge ourselves. Would you agree? But not all our desires are equal.


The post Trust (yourself) but verify appeared first on Nick Samoylov.

 •  0 comments  •  flag
Share on Twitter
Published on February 23, 2020 11:11

February 20, 2020

Java streams 18. FlatMap

This is an intermediate operation that transforms each element of the stream and produces a stream of values of the same or different type by applying the specified function.


The post Java streams 18. FlatMap appeared first on Nick Samoylov.

 •  0 comments  •  flag
Share on Twitter
Published on February 20, 2020 19:01

February 11, 2020

Java streams 17. Map

This is an intermediate operation that transforms each element of the stream and produces a value of the same or different type by applying a specified function.


The post Java streams 17. Map appeared first on Nick Samoylov.

 •  0 comments  •  flag
Share on Twitter
Published on February 11, 2020 02:50