Sobes.tech

Tell about your experience working with PostgreSQL: designing schemas, optimizing queries, administering?

Middle
213

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 { }

Middle
174

How do you track that an email has been sent and what to do if it fails?

Middle
168

Where are strings stored in Go — in heap or in stack?

Middle
164

[name] asked: What are your red flags — what is unacceptable in work or processes?

Middle
164

[name] asked: How were tasks distributed in your team?

Middle
155

You added an index for a query, but it didn't speed up according to EXPLAIN. What could be the problem?

Middle
153

func init() { items = make([]Product, 100) } func AddItemToShoppingCart(item Product) {

Middle
152

[name] asked: How do you see your career growth — towards people management or engineering role?

Middle
151

[name] asked: Do you know anything about the company Tutu.ru, have you used the service?

Middle
145

[name] asked: How do you develop yourself additionally — what do you read or watch?

Middle
145

[name] asked: What criteria do you currently use to choose a company?

Middle
143

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:]...) } } }

Middle
141

Tell me about the Single Responsibility Principle (SRP). How can it be applied to the CreateOrder function?

Middle
140

Is it okay for sending an email to block order creation? How to fix it?

Middle
134

What synchronization primitives are available in Go? Which mutex would be most suitable in this case?

Middle
117

[name] asked: What drives you the most in work?

Middle
115

[name] asked: Do you prefer product tasks or infrastructure tasks?

Middle
114

[name] asked: Tell me about your current area of responsibility and tasks in iiko.

Middle
83

[name] asked: What do you currently dislike about your current job, and why are you looking?

Middle
59
/2