Ilya Brin - Software Engineer

History is written by its contributors

Probability Theory: Bayesian Statistics for A/B Testing in Go

2025-04-29 5 min read Mathematics Ilya Brin

A/B testing is everywhere: button colors, pricing, algorithms. But most implementations use frequentist statistics. Bayesian approach gives you probability of being better, not just “statistically significant”. Let’s implement it in Go.

Frequentist vs Bayesian

Frequentist: “Is the difference statistically significant?”

  • p-value < 0.05 → reject null hypothesis
  • Doesn’t tell you probability of A being better than B

Bayesian: “What’s the probability that B is better than A?”

  • Direct answer: “B is better with 95% probability”
  • Updates beliefs as data arrives

Basic A/B Test

type Variant struct {
    Name        string
    Conversions int
    Visitors    int
}

func (v *Variant) Rate() float64 {
    if v.Visitors == 0 {
        return 0
    }
    return float64(v.Conversions) / float64(v.Visitors)
}

Beta Distribution

For conversion rates, we use Beta distribution:

Continue reading

Notification System: How to Sync Millions of Devices Without Pain

Hey architect! 📱

Need to build a notification system that works like the big players? Where messages arrive instantly on all user devices, and the server doesn’t crash under load?

Let’s break down how to design a notification service that can handle millions of users and sync state across their devices.

Continue reading

Natural Language Processing: Text Processing Fundamentals in Go

2025-04-27 8 min read Golang Nlp Machine-Learning Ilya Brin

Hey linguist! 👋

Want to teach computers to understand human language? Analyze customer reviews, extract keywords from documents, or determine sentiment of comments?

Natural Language Processing (NLP) is the magic that transforms unstructured text into useful data. And yes, you can do this in Go!

Let’s explore NLP fundamentals, practical algorithms, and real examples of text processing in Go 🚀

Continue reading

PostgreSQL Index Types

2025-03-01 5 min read Postgresql Ilya Brin

Imagine searching for your favorite song on an old mp3 player without a playlist - scrolling through tracks one by one until you stumble upon the right one. That’s PostgreSQL without indexes: huffing, puffing, and scanning every row in our huge table.

Now add indexes - and you’ve got Spotify with instant search!

Let’s quickly break down what indexes PostgreSQL has, why you need them, and how they transform your database from a turtle into a rocket. Plus - a couple of real-life examples to feel the difference.

Continue reading

Go Race Detector: Finding and Fixing Data Races

2025-01-15 8 min read Golang Concurrency Debugging Ilya Brin

Hey bug hunter! 👋

Data races are the most insidious bugs in concurrent programs. They hide in production, don’t reproduce locally, and corrupt data in the most unpredictable ways.

Fortunately, Go has a built-in race detector that finds these bugs automatically. It’s like an X-ray for your concurrent code!

Let’s explore what data races are, how to find them, and how to fix them using Go Race Detector 🚀

Continue reading

GitHub Actions: Advanced Workflows for Go Projects

2025-01-15 5 min read Devops Golang Ci-Cd Ilya Brin

Hey there! 👋

Are you still manually running tests before every commit? Deploying to production via SSH and praying nothing breaks?

GitHub Actions turns your repository into an automated machine: tests, linters, builds, deployments - all without your intervention.

But most people only use basic features. You can set up matrix testing, dependency caching, conditional deployments, and even automatic releases.

Let’s explore advanced patterns for GitHub Actions in Go projects 🚀

Continue reading
Older posts Newer posts