Emulation of property literals with Java 8 Method Reference

Emulation of property literals with Java 8 Method Reference
 
 
From the translator: to the translation of this article I was pushed by the insult from the absence of the operator nameOf in the Java language. For the impatient - at the end of the article there is a ready implementation in source code and binaries.
 
 
One of the things that developers of libraries in Java often lack is literals of properties. In this post, I'll show you how you can creatively use the Method Reference from Java 8 to emulate the property literals using bytecode generation.
 
 
Akin to class literals (for example, Customer.class ), The property literals would ...
+ 0 -

[Javawatch Live]The history of one pull request. `os.version` in SubstrateVM

[Javawatch Live]The history of one pull request. `os.version` in SubstrateVMA year has passed since the previous trick was successful: publish a video instead of the post on YouTube. "Shameful conversation about singletones" scored 7k views on YouTube and twice as much on the Habré itself in the text version. For an article written in utterly frustrated condition and telling about the oldest accordion - it's something like success.
 
 
Today I've been editing the whole issue all night. This time the topic is much more recent: the history of the commit to experimental technology is SubstrateVM. But the degree of increase has risen to a new level.
 
 
+ 0 -

An icon with a counter in the upper toolbar: an example of the diversity of approaches to one task

An icon with a counter in the upper toolbar: an example of the diversity of approaches to one task
 
In the life of each developer there is a time when, seeing an interesting solution in someone else's application, I want to implement it in my own. This is logical and should be quite simple. And for sure, caring people from the "corporation of good" wrote some guide on this or made a training video, where on the fingers it is shown how to call a couple of necessary methods to achieve the desired result. Often happens just so.
 
 
But it also happens quite differently: you see the realization of something in every second application, and when it comes to realizing the same in yourself it turns out that ...
+ 0 -

My favorite examples of functional programming in the language Kotlin

One of the great features of Kotlin is that it supports functional programming. Let's look at and discuss some simple but expressive functions written in Kotlin.
 
My favorite examples of functional programming in the language Kotlin
Superset (Boolean)
 
If you studied algebra at a university, you can recall what a superset is. For any set, its superset is the set of all its subsets, including the original set itself and the empty set. For example, if we have the following set:
 
{??3}
 
Then his superset:
 
{{}, {1}, {2}, {3}, {?2}, {?3}, {?3}, {??3}}
 
In algebra such a function is very useful. How do we implement it?
 
If you want to challenge yourself, stop reading ...
+ 0 -

How to prevent memory overuse while using Java collections

How to prevent memory overuse while using Java collectionsHello!
 
 
Our experiment with the steps at the rate of "The Java Developer" continues, and, oddly enough, even quite successfully (like): as it turned out, the planning shoulder in a couple of months with the next transition to a new stage at any convenient time is much more convenient than if to allocate almost half a year for such a difficult course. So there is a suspicion that it is complex courses that we will soon begin to gradually translate into such a system.
 
 
But this I am talking about our, about Ostusovsky, sorry. As always, we continue to study interesting topics that, although ...
+ 0 -

[Перевод]How Graal works is JV-JIT compiler on Java

[Перевод]How Graal works is JV-JIT compiler on JavaHello, Habr! I present to your attention the translation of the article " : Understanding How Graal Works - a Java JIT Compiler Written in Java ".
 
Introduction
 
One of the reasons I became a researcher of programming languages ​​is that, in a large community of people connected with computer technologies, almost everyone uses programming languages, and many are interested in how they work. When I first encountered programming as a child and got acquainted with the programming language, the first thing I wanted to know about was how it works, and the very first thing I wanted to do was create ...
+ 0 -

Explanation of lambda expressions

Explanation of lambda expressions
 
I have questions about lambda expressions and RxJava. These questions mainly concern not a complete understanding of lambda expressions or RxJava. I will try to explain lambda expressions as simply as possible. RxJava I will describe separately.
 
Lambda expressions and RxJava
 
What are lambda expressions? Lambda expressions are "just" a new way of doing the same thing that we could always do, but in a purer and less verbose new way of using anonymous inner classes.
 
An anonymous inner class in Java is a class with no name, it should be used if you need to override class or interface methods. An anonymous ...
+ 0 -

A real contribution to the real Open Source

The recent post is about how we are at Sberbank-Technologies developing Open Source has revealed many interesting details about approaches, aspirations and ideology.
 
 
Today I want to talk about the real contribution that our team makes to Open Source.
 
 
A real contribution to the real Open Source

 
Apache Ignite and lately we have done a lot of useful things.
 
 
So, further only the facts.
 
 
1) In version 2.5 a new version of topology appeared: star around the ZooKeeper .
 
We participated in stabilizing the new functionality and decided ...
+ 0 -

9 paid, shareware and free programs for tracking application code

The tracking code must-have in the development environment. But how much do you need the same tool in the product? The one who only painstakingly collects the logs will say "well its nafig, my ELK does not let me down" and will be right in his own way. For the time being.
 
 
9 paid, shareware and free programs for tracking application code  
1. Rollbar
 

 
Dashboard Rollbar
 
 
They write on their website "Catch Errors if you can until the users did it for you. " Well, let's try. Rollbar provides a cloud service and is able to work with several programming languages ​​through the implantation of its SDK into a controlled application.
 
 
...
+ 0 -

OpenSource APM Pinpoint

OpenSource APM Pinpoint
 
 
Kind to you.
 
 
Application performance monitoring (APM) solves the tasks of monitoring, managing the availability and performance of applications.
 
The pages of Habra already covered free AWP Glowroot and MoSKito , but here is Pinpoint remained in the shade.
 
 
Dynatrace - one of the innovators and leaders in the field of APM. The company had previously given the opportunity to use its product legally after a trial period.
 
 
Developers position Pinpoint as a tool for highly scalable distributed systems, which will allow you:
 
 
 
See the map and topology of the components ...
+ 0 -