Tell about your experience working with PostgreSQL: designing schemas, optimizing queries, administering?
Golang
func buildOrderEmailBody(items []Item, totalPrice float64) string { body := "Thank you for your order!\n\n" body += "Here are the items in your order:\n" for _, } func CreateOrder(customerEmail string) { totalPrice := ListAndCalculateVAT() orderDetails := "Thank you for your order!\n\n" orderDetails += "Here are the items in your order:\n" for _, item := range items { orderDetails += fmt.Sprintf("- %s: $%.2f\n", item.NameOfProduct, item.PriceOfProduct) } orderDetails += fmt.Sprintf("\nTotal (including VAT): $%.2f\n", totalPrice) order = Order{Items: items, EmailSent: false} subject := "Your Order Confirmation" if err := SendOrderConfirmationEmail(customerEmail, subject, orderDetails); err != nil { }
How do you track that an email has been sent and what to do if it fails?
Where are strings stored in Go — in heap or in stack?
[name] asked: What are your red flags — what is unacceptable in work or processes?
[name] asked: How were tasks distributed in your team?
You added an index for a query, but it didn't speed up according to EXPLAIN. What could be the problem?
func init() { items = make([]Product, 100) } func AddItemToShoppingCart(item Product) {
[name] asked: How do you see your career growth — towards people management or engineering role?
[name] asked: Do you know anything about the company Tutu.ru, have you used the service?
[name] asked: How do you develop yourself additionally — what do you read or watch?
[name] asked: What criteria do you currently use to choose a company?
var ( mu sync.Mutex items []Product vatRate = 10.0 order Order ) type Product struct { NameOfProduct string PriceOfProduct float32 } type Order struct { Items []Product } func init() { items = make([]Product, 100) } func AddItemToShoppingCart(item Product) { items = append(items, item) } func RemoveItemFromShoppingCart(nameOfItem string) bool { mu.Lock() defer mu.Unlock() for i, item := range items { if item.NameOfProduct == nameOfItem { items = append(items[:i], items[i+1:]...) } } }
Tell me about the Single Responsibility Principle (SRP). How can it be applied to the CreateOrder function?
Is it okay for sending an email to block order creation? How to fix it?
What synchronization primitives are available in Go? Which mutex would be most suitable in this case?
[name] asked: What drives you the most in work?
[name] asked: Do you prefer product tasks or infrastructure tasks?
[name] asked: Tell me about your current area of responsibility and tasks in iiko.
[name] asked: What do you currently dislike about your current job, and why are you looking?