Sobes.tech

How does the program behave when trying to write data to a bufferless channel that is initially empty?

Junior — Middle
СБЕРСБЕР
226

Explain the principle of Pool Scheduling and its use in task management

Junior — Middle
226

Explain the concept of task separation between multiple threads or processes for system optimization. What does the term Work-Sharing mean?

Junior — Middle
226

What features of OOP in Go differ from implementations in other programming languages?

Junior — Middle
226

In which parts of an SQL query can aggregate functions be used to limit the result?

Junior — Middle
AvitoAvito
226

Tell us how you worked with data in your last project

Junior — Middle
Twinby
226

What frameworks, standards, and packages do you use in Go?

Senior
wilix
226

How to correctly implement a safe system shutdown without data loss and with minimal downtime?

Middle — Middle+
IDT
226

Why did you decide to change your job? What are you looking for?

Senior
X5
226

There is a function `unpredictableFunc()`, which needs to be wrapped so that it executes with a timeout (for example, 1 second), and its execution time is logged. // There is a function that runs indefinitely long and returns a number. // Its body cannot be changed (imagine it as a network request). func unpredictableFunc() int64 { rnd := rand.Int63n(5000) time.Sleep(time.Duration(rnd) * time.Millisecond) return rnd } // You need to modify the wrapper function to work with a specified timeout (for example, 1 second). // If the "long" function completes within this time - great, return the result. // If not - return an error. The result of the execution in this case is not important. // // Additionally, you need to measure how long this function took to execute (just log it). // The signature of the wrapper function can be changed. func predictableFunc() (int64, error) { start := time.Now() ch := make(chan int64, 1) errCh := make(chan error, 1) go func() { result := unpredictableFunc() ch <- result }() select { case res := <-ch: duration := time.Since(start) log.Printf("Function executed in %s", duration) return res, nil case <-time.After(1 * time.Second): duration := time.Since(start) log.Printf("Function timed out after %s", duration) return 0, errors.New("timeout") } }

Senior
Бюро 1440Бюро 1440
226

How does interaction between goroutines occur in Go?

Junior — Middle
IDT
Астрал-Софт
226

What should be done if the server experiences delays due to high write activity?

Junior — Middle
226

Have you set up a domain name for a website or service?

Junior — Middle
Mail.ruMail.ru
226

How can you effectively update or retrieve values in a counter structure?

Junior — Middle
WildberriesWildberries
226

What is the result of the [] operator on a string data type?

Junior — Middle
225

Can you explain what the Reflect class in JavaScript is and what it is used for?

Junior — Middle
WildberriesWildberries
225

Is it necessary to allocate a separate structure for each running goroutine?

Junior — Middle
225

What characteristics are necessary for a hash function to serve as a key in a Map data structure?

Junior — Middle
YadroYadro
225

Does NAT provide protection for transmitted data and connections?

Junior — Middle
225

How to extract the first n elements from an array?

Junior — Middle
Lamoda Tech
225
/416