Sobes.tech

Pros and cons of monolithic and microservices architecture.

Middle
154

How to solve the cache degradation problem (Redis responds in 1 second, DB in 10ms)?

Middle+
153

Tell us about your last project you participated in.

Junior — Middle
151

Can you explain the concept of Boxing in the context of programming languages?

Junior — Middle
150

Explain the difference between reference and value types.

Middle
149

Implement a method that fills the user's full name from storage (IDbRepository or ICacheRepository) and propagates an enriched event further (IEventSaver). Maximize performance. 99.9% of data in cache is current. The initial order of events during saving can be disrupted.

Middle+
148

Монолиттік қосымшаларды әзірлеу немесе қолдау тәжірибеңіз бар ма?

Junior — Middle
148

If a pod in Kubernetes crashes after successfully booking a hotel but before saving the booking ID, how to restore consistency?

Middle+
146

What is the reason for using different memory segments to store objects instead of combining them into one area?

Junior — Middle
145

Can we use await inside a lock block?

Middle
144

Tell about yourself, your interesting and significant tasks, something complex in your career, what you are proud of.

Middle
144

Can you explain what the Dispose pattern means in programming?

Junior — Middle
142

How many generations does a heap data structure have?

Junior — Middle
139

Can stacks always be used to store value types?

Junior — Middle
136

public bool BookTour(string userId, DateTime start, DateTime end, int hotelId, string roomType, string flightClass, int airCompanyId, int flightnumber) { try { //flightClass also not desired to parse enum var flightInfo = new FlightInfo(Enum.Parse<FlightClass>(flightClass), airCompanyId, flightnumber); var resultBookFlight = _airWaysService.Book(GetUser(userId), flightInfo); //roomType also not desired to parse enum var rentInfo = new RentInfo(start, end, hotelId, Enum.Parse<RoomType>(roomType)); //GetUserId in a separate variable var resultBookHotel = _hotelService.Book(GetUser(userId), rentInfo); //Exceptions will go to inner, not caught Task.WhenAll(resultBookFlight, resultBookHotel); //Why static reservationIdAir = resultBookFlight.Result; _reservationIdHotel = resultBookHotel.Result; } catch (BookFlightException) { _hotelService.CancelBook(_reservationIdAir); return false; } catch (BookHotelException) { _airWaysService.CancelBook(_reservationIdHotel); return false; } catch (Exception ex) { throw new ApplicationException(ex.Message); } finally { //fields are 100% uninitialized //Why do we try to save something after exception //GetUser already extracted unitOfWork.Execute(async () => { await _tourRepository.Save(_reservationIdAir, _reservationIdHotel, GetUser(userId)); }).RunSynchronously(); //Interlock.Increment() _countBooked++; } return true; }

Middle
135

There is a static dictionary, and we want to write to it from different threads. How is it best to do this?

Middle
130

What is object-oriented programming?

Middle+
122

Name the synchronization primitives and briefly describe how they work.

Middle
121
/8