Sobes.tech

What are the disadvantages of sharding?

Middle+
160

What delivery guarantees does Kafka have? What needs to be done on the producer to achieve exactly-once?

Middle+
159

[name] asked: Are you still studying? Will it interfere with full-time work?

Senior
157

func main() { c := make(chan int, 1000) for i := 0; i < 100; i++ { go foo(c) } sum := 0 for r := range c { sum += r } fmt.Println(sum) } func foo(c chan int) { r := rand.Int() for i := 0; i < r; i++ { c <- r } } --- func main() { c := make(chan int, 1000) var wg sync.WaitGroup wg.Add(100) for i := 0; i < 100; i++ { go func() { defer wg.Done() foo(c) }() } go func() { wg.Wait() close(c) }() sum := 0 for r := range c { sum += r } // // fmt.Println(sum) } func foo(c chan int) { r := rand.Int() for i := 0; i < r; i++ { c <- r } }

Senior
155

What are you currently looking for in a new job?

Middle+
155

Tell me about Consumer Group. How are 3 partitions and 2 consumers distributed?

Middle+
153

What happens to a slice in Go if its capacity is 8 and we try to add a ninth element?

Senior
152

Given sorted arrays in ascending order: - suspects - innocents Exclude all innocents from suspects. Examples: Input: suspects = [1, 2, 3, 4, 5], innocents = [2, 4] Output: [1, 3, 5] Input: suspects = [3, 80, 123, 421, 936], innocents = [80, 936] Output: [3, 123, 421]

Middle+
150

[name] asked: Tell me about the team and processes — is it a cross-functional team, how do sprints work?

Senior
150

/* Given an array of numbers nums of length n, each number can be either unique or appear twice. Numbers are in the range [1, n]. Write a function that returns an array of numbers that appear twice. Examples: Input: nums = [4, 3, 2, 7, 8, 2, 3, 1] Output: [2, 3] Input: nums = [2, 2, 1] Output: [2] */

Senior
148

Indexing in PostgreSQL: how to create an index for a query with multiple parameters? Why did the index degrade after six months with active updates?

Senior
147

What indexes do you know in the database?

Middle+
142

[name] asked: Tell me about your current workplace — what kind of company is it, what product are you working on?

Senior
142

Can you increase the number of partitions in Kafka without recreating the topic?

Middle+
142

How do you feel about relocation and where did you plan to move?

Middle+
141

func main() { c := make(chan int, 1000) var wg sync.WaitGroup wg.Add(100) for i := 0; i < 100; i++ { go func() { defer wg.Done() foo(c) }() } go func() { wg.Wait() close(c) }() sum := 0 for r := range c { sum += r } // fmt.Println(sum) } func foo_req(c chan int) error { r := rand.Int() for i := 0; i < r; i++ { c <- r } }

Senior
140

Do you understand correctly that with cache-aside, we still need to go to the cache and invalidate data there when updating data in the database?

Senior
140

[name] asked: Why did you switch from your previous company to your current one?

Senior
140

Which command helps to update statistics in PostgreSQL?

Middle+
140

What is the difference between JSON and Protobuf?

Middle+
137
/4