The Java Language Specification. Chapter 17. Threads and Locks (Translation, Part 1) &lt;{short}&gt; &lt;{full}&gt; <div class="post__text post__text-html js-mediator-article"> <i> Hello, Habr! I present to your attention the translation of the article

<{full}>
Hello, Habr! I present to your attention the translation of the article "The Java Language Specification ( <{short}> Hello, Habr! I present to your attention the translation of the article "The Java Language Specification ( Hello, Habr! I present to your attention the translation of the article "The Java Language Specification ( ? Chapter 17. Threads and Locks)" Original.    Chapter 17. Threads and Locks (Chapter 17. Threads and Locks)   While most of the discussions in the previous chapters have concerned only the behavior of code that is executed simultaneously and as a single statement or expression at the same time, i.e. in one thread, a JVM (Java virtual machine) can support several threads ...
+ 0 -

Tips for optimizing Java code: how not to step on the rake

Tips for optimizing Java code: how not to step on the rakeGood evening, colleagues.
 
 
The translation of the article that we will propose to you today is designed to help answer the question: was the need for an entire book on optimizing Java code necessary? We hope that the material will not only seem interesting to you, but it will also come in handy in practice. Please do not forget to vote.
 
VisualVM (free) and JProfiler (paid - but absolutely worth their money).
 
 
Armed with such information, you can rest assured that you are optimizing exactly the code that is required - and that the effect of the changes you make can be measured
 
We w...
+ 0 -

Inverse kinematics in two-dimensional space

Part 1. Mathematics


 
Inverse kinematics in two-dimensional space
 

Introduction


 
We are so used to interacting with the world around us that we do not think about how difficult our hands and feet move. In academic literature, the task of controlling a robot manipulator is called inverse kinematics.
Kinematics
means "
movement
", and the concept of "
inverse
" is due to the fact that we usually do not control the hand itself. We control the "engines" that rotate each individual part. Inverse kinematics is the task of determining how to move these engines to move your hand to a specific point. And in its general form, this task is extremely ...[/h]
[/h]
+ 0 -

JavaScript. We work with exceptions and data in async /await constructs without try-catch blocks

The new asynchronous async /await constructs appear in jаvascript look simpler than Promise, and, of course, much more readable than the "callback jungle". But one thing that bothered me was the use of try-catch. At first I thought that this was not a problem, but unfortunately I had to work with the API call chain, in which each API call had its own error message, which should have been prologized. Soon I realized that I was creating a "try /catch-jungle" which was no better than a "callback jungle".
 
...
+ 0 -

Spring Mitapas (and one year old) from Alfa-Bank

Spring Mitapas (and one year old) from Alfa-Bank

 
On Friday, it is customary not only to change passwords on critical items, but also to make plans for the next week. Or at least try to do it.
 
 
If you have free time left, we invite you to our spring mitapes:
 
 
 
IBMi-MeetUp: auto-testing on IBMi
 
React Moscow Meetup 4
 
Quality communication: pain in testing
 
MskDotNet Meetup
 
 
Details under the cut.
 
The event page is
 
 
List of reports, Alfa-Bank:
 
 
 
"The Orchestra of Autotests"
 
"Automation of functional testing"
 
"Using C /C ++ on IBMi"
 
"Declarative ...
+ 0 -

Confrontation: the results of

Confrontation: the results of  
 
The long-awaited cyberbite "Confrontation", which took place on the basis of the eighth annual information security forum Positive Hack Days, was held. We tell on behalf of the direct participants of the competition - the teams Jet Secuirty Team and Jet Antifraud Team, about the most striking technical details of the competition of hackers with defenders. Dirty tricks of attackers, non-standard ways of hacking, clever traps and surprises of defenders - all this is waiting for you under the cut.
 
the city falls asleep, wake up hackers ...
+ 0 -

We invite you to the M.SMART hackathon from M.Video

We invite you to the M.SMART hackathon from M.Video  
 
Friends, we invite you to our first hackathon dedicated to the development of VR- and AR-products. Hackaton will be held in two stages, in absentia and full-time. Within the framework of the correspondence stage, which will last from May 18 to May 2? the best applications from participants will be selected. The full-time stage will be held from 2 to 3 June and will be organized for the first time in one of our stores of home appliances and electronics. All this time the store will be open to visitors who will be able to observe the hackathon and the coding process!
 
 
We believe that the future is ...
+ 0 -

Compact serializer for the cache using System.Reflection.Emit

Compact serializer for the cache using System.Reflection.Emit
 
 
In modern services without a cache anywhere: access to data in a persistent database is a long and expensive business, so adding an intermediate storage for the most frequently used data significantly speeds it up. You can store information in a cache in a variety of ways, in various ways: rows, lists, session state, and much more. In this article, we will talk about one of the ways to store in the cache of "flat" objects that do not have nested classes and cyclic references.
 
does not guarantee returning properties ...
+ 0 -

GraalVM: mixed in a bunch of C and Scala

I do not know about you, but recently I've been impressed with articles about new Java technologies - Graal, Truffle and all-all. It looks as if you had thought up a language before, wrote an interpreter, was glad which language is good and sad, how slow the native compiler and /or JIT wrote to it, but you need a debugger LLVM is there, and thanks for that. After reading this article there was a (somewhat grotesque) impression that after writing an interpreter of a special kind, work can, in principle, be completed. The feeling that now the button "Make Zashibis" became available to programmers ...
+ 0 -

Lead Dev New York: review of reports and feedback on the conference

Lead Dev New York: review of reports and feedback on the conference  
 
Hello, Habr!
 
 
I'm Nikolay Krapivny, head of server-side-development in Badoo.
 
 
Recently we drove friendly team to the conference Lead Dev in New York , dedicated to the management of development. Among the speakers were representatives of Google, IBM, Slack and other companies. According to the good tradition in our department, I want to share my impressions, thoughts, review of reports and some materials that I brought from the conference.
 
 
A year ago I was already at the Lead Dev conference in London, and she was not very impressed with me. The set of reports seemed far from the strongest ...
+ 0 -