How to kill a process in Linux? What to do if 'kill pid' doesn't help?
Golang
Write an SQL query to list authors who have more than 10 books (tables: authors, books, many-to-many relationship).
What are EXPLAIN and EXPLAIN ANALYZE in PostgreSQL, and what is the difference?
What is a race condition in Go? Provide an example.
How is a slice in Go structured internally? How does the append function work?
There are 3 entities - user, chat, message • The user has a name and registration date • The chat has a name and creation date • The message has text, an author, and a creation date • A user can be part of multiple chats simultaneously • A message must belong to a chat, and a message cannot belong to more than 1 chat at the same time • The domain should be described in the form of tables
Tell about an interesting/complex technical problem you solved.
Which databases have you worked with the most?
We have a database with user passwords, passwords are hashed (hashPassword function), and a set of characters that can be used in passwords (variable alphabet). Our task is to implement the RecoverPassword function so that it recovers the password by the known hash and TestRecoverPassword completes successfully. Basic requirements: Solve as you wish package main import ( "crypto/md5" "fmt" ) var alphabet = []rune{'a', 'b', 'c', 'd', '1', '2', '3'} func RecoverPassword(h []byte) string { return "" } func hashPassword(in string) []byte { h := md5.Sum([]byte(in)) return h[:] } func main() {
package main import ( "crypto/md5" "fmt" ) var alphabet = []rune{'a', 'b', 'c', 'd', '1', '2', '3'} func RecoverPassword(h []byte) string { return "" } func hashPassword(in string) []byte { h := md5.Sum([]byte(in)) return h[:] } func main() { tests := []string{"a", "12", "abc333d"} ok := true for _, exp := range tests { h := hashPassword(exp) act := RecoverPassword(h) if act != exp { fmt.Printf("Error: expected %q, got %q\n", exp, act) ok = false } } if ok { fmt.Println("All tests passed successfully") } }
What HTTP methods exist? Which of them are idempotent?
Code review: cache in Go with mutex. Find issues and suggest improvements. Condition: read/write load 80/20.
Describe the structure of an HTTP request and response. How are response codes classified?
package main import ( "crypto/md5" "fmt" ) var alphabet = []rune{'a', 'b', 'c', 'd', '1', '2', '3'} func RecoverPassword(h []byte) string { return "" } func hashPassword(in string) []byte { h := md5.Sum([]byte(in)) return h[:] } func main() { tests := []string{"a", "12", "abc333d"} ok := true for _, exp := range tests { h := hashPassword(exp) act := RecoverPassword(h) if act != exp { fmt.Printf("Error: expected %q, got %q\n", exp, act) ok = false } } if ok { fmt.Println("All tests passed successfully") } } To run the code correctly: entry point -- main function in main package Task: Implement the RecoverPassword function, which restores the original password from an MD5 hash, consisting of characters from a given alphabet.
Why are you considering new offers? Active or passive search?
How to implement a graceful shutdown of a Go service in Kubernetes when deploying a new version?
What tables and fields are needed in a PostgreSQL database for this messenger?
What are your current expectations from a new job?
What was the most difficult and most interesting part of migrating from monolith to microservices?
Tests — did the developers write some?