Sobes.tech

What would you do if you handed over your code to another team for testing and did not receive a response?

Junior — Middle
294

Did your last project involve technologies and solutions typical for high-load systems?

Middle — Middle+
275

Was the Ashan site disabled or closed?

Junior — Middle
264

What would you do if your message about a task in the corporate chat remained unanswered?

Junior — Middle
261

Who was responsible for the maintenance and support of the distributed data storage system?

Junior — Middle
258

In what situations can data loss occur in Kafka?

Junior — Middle
258

How is exception handling implemented in applications using the Spring Framework?

Junior — Middle
257

public class MoneyTransferService { /** * @param fromAccountId unique identifier of the user transferring funds * @param toAccountId unique identifier of the user receiving funds * @param amount transfer amount. Positive number */ @Transactional public void transferMoney(Long fromAccountId, Long toAccountId, BigDecimal amount) { if (amount.compareTo(BigDecimal.ZERO) <= 0) { throw new RuntimeException("Amount must be +"); } if (fromAccountId.equals(toAccountId)) { throw new RuntimeException("Account can't be the same"); } Long firstId = Math.min(fromAccountId, toAccountId); Long secondId = Math.max(fromAccountId, toAccountId); Account first = accountRepository.findByIdForUpdate(firstId) .orElseThrow(() -> new RuntimeException("Account not found")); Account second = accountRepository.findByIdForUpdate(secondId) .orElseThrow(() -> new RuntimeException("Account not found")); Account from = fromAccountId.equals(firstId) ? first : second; Account to = fromAccountId.equals(firstId) ? second : first; if (from.getBalance().compareTo(amount) < 0) { throw new RuntimeException("Balance is less 0"); } from.setBalance(from.getBalance().subtract(amount)); to.setBalance(from.getBalance().add(amount)); accountRepository.save(to); accountRepository.save(from); } } @Entity @Data public class Account { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private BigDecimal balance; }

256

How do HashMap and ConcurrentHashMap differ in Java in terms of functionality and usage in multithreaded segments?

256

What formula is used to determine the number of brokers (nodes) when designing a fault-tolerant Kafka cluster?

Middle — Middle+
252

What elements or features of the internal structure of HashMap cannot be changed after its creation?

Junior — Middle
250

How to properly modify an object so that it can be used in a HashMap collection?

Junior — Middle
247

What are the main principles of service design to minimize data or resource loss?

Junior — Middle
243

Can you give an example of the idea of dependency inversion in software design?

Junior — Middle
240

How is teamwork organized in your team and what processes are used to accomplish tasks?

Junior — Middle
235
/11