CEOInterviews.AI
Start App
Pavel Durov
Founder and CEO, Telegram Messenger (Telegram FZ-LLC / Telegram Group Inc.)

Learning to code: How Pavel Durov learned to program | Lex Fridman Podcast Clips

📅 Oct 01, 2025 Lex Clips 26 MIN 133685 VIEWS 30 SEGMENTS · 2 SPEAKERS
Lex Fridman Podcast full episode:    • Pavel Durov: Telegram, Freedom, Censorship...   Thank you for listening ❤ Check out our sponsors: https://lexfridman.com/sponsors/cv933... See below for guest bio, links, and to give feedback, submit questions, contact Lex, etc. GUEST BIO: Pavel Durov is the founder and CEO of Telegram. CONTACT LEX: Feedback - give feedback to Lex: https://lexfridman.com/survey AMA - submit questions, videos or call-in: https://lexfridman.com/ama Hiring - join our team: https://lexfridman.com/hiring Other - other ways to get in touch: https://lexfridman.com/contact EPI...

Questions asked in this interview

2
  1. 0:03How did you figure out how to program websites?
  2. 21:27Can this be done more simply?' And that's like one of the most beautiful aspects, the art forms of programming, right?
Interviewer 0:03 ↗
You were a programmer from an early age. You started coding at 10. First things you built were a video game at 11, and then eventually 10 years later at 21, you programmed the initial versions of VK single-handedly. Can you talk to me about your programming journey that led to the creation of VK? What was the VK stack? Is it PHP mostly? How did you figure out how to program websites? All of that.
Pavel Durov 0:31 ↗
I wasn't interested in programming websites at first. I didn't even have access to the internet when I was 10 years old. But I liked video games. I didn't have enough of them. And the scarcity forced me to start building them — more computer games just to play myself.
Interviewer 0:52 ↗
Yeah.
Pavel Durov 0:53 ↗
It's actually an interesting thing that we sometimes don't realize, but scarcity leads to creativity. And one of the reasons you have so many people who love to code coming from the Soviet Union or other places which didn't have much access to modern technology and more importantly modern entertainment, is that perhaps we were not so much distracted by all this abundance of different entertainment options. Which is not to say it's bad to have those options. It's just a fact that we sometimes don't appreciate.
So I started to build computer games. My brother would sometimes guide me. For example, I would create a turn-based strategy — of course, two-dimensional back then, three-dimensional was too much for me — but it wasn't as sleek in terms of the scrolling FPS, frames per second parameter. And I asked my brother how to optimize it. He would guide me, and this kind of learning and training really shaped my coding skills when I was younger. Then I started to create video games for my classmates when we played, for example, tic-tac-toe on an infinite field in my class during the breaks. You know, not tic-tac-toe that three in a row — this is five in a row on an infinite field. This is a much more interesting game and it gets quite complicated if you keep playing it. My classmates used to love it and some of my classmates were really smart — champions of math olympiads, sons and daughters of professors at the university. And I decided, no, I want to win every single time. I don't want to lose even a single time. So, how do I win? I need to practice more. But how do I practice more? I need an opponent stronger than myself. So I coded this game so that I would play against the computer, and the computer would calculate, I think, four moves in advance to choose the optimal strategy. That wasn't enough. Four moves in advance, I would still win over it. If I tried to calculate five or six, it was too slow. So I asked my brother to help me out here. He made this algorithm. Eventually, I trained myself to win every single time, even with the computer back then. We didn't have modern CPUs, and I could still retain some self-confidence. We'd go back to school during breaks, play with my classmates, and soon people started to lose interest. None of my classmates wanted to play this game anymore. I killed the game.
Interviewer 4:12 ↗
Yeah.
Pavel Durov 4:14 ↗
So after that, when I got into St. Petersburg State University, it was quite boring just to study because it was too easy. So I thought, what can I do there? I created a website for the students of my faculty. First, I organized the creation of digital answers to all exams and digital versions of all lectures, which was something very unique back then. Remember, it was 25 years ago. I would put together a website where I would publish all these materials and pretty soon it became super popular. I opened a discussion forum there. In a few years I expanded to the university with all of its other departments and then to other universities. We ended up having tens of thousands of users just as a student's portal. We had all kinds of social features there — friends lists, photo albums, profiles, blogs — all of it was quite successful.
And after I graduated the university, one of my ex-classmates from school reached out to me after reading about my successes in a newspaper, the main business newspaper of St. Petersburg. And he asked me, are you trying to build a Russian Facebook? I said, I'm not sure, what's Facebook? So we met. He had graduated from an American university two years before that and he showed me Facebook. I thought, well, I can already have all of this technology, but it's valuable to know which elements I should get rid of in order to scale this thing and have millions of users.
This is also something people don't appreciate — that sometimes in order to move forward and have more success, you have to get rid of things, including technology. Getting rid of features is super important. Simplify, both for scaling and for making it amenable to just growing the user base where people get it immediately. Yes. Otherwise, it's just too complicated for the new user. The existing users will be happy. They'll be praising you. They will be asking you to add more stuff to make it even more complicated. So, it's easy to lose track and get disoriented if you're only relying on the feedback of existing users.
So as a result I started the website called VKontakte, or VK. It means 'in touch' in Russian. Initially it was to solve my own personal problem. I graduated the university that same year and I wanted to be in touch, or remain in touch, with my ex-classmates from the university and the other fellow students. And of course as a 20-year-old I wanted to meet other people, including good-looking girls. So I started to build it from scratch. For that one I thought I'm not going to use any third-party libraries, modules, because I want to make it as efficient as possible. I was obsessing over every line of code. But then how do you start something that large? I didn't have any prior experience of creating a project of that scale which would involve everything. Before, I would reuse some existing solutions. Here I wanted to build from scratch. So I called my brother. He was a postdoc student in Germany at that time, at the Max Planck University. And I asked him, what should I start from? And he told me, just build a module to authorize users — not just to sign up, you know.
Interviewer 8:57 ↗
Yeah.
Pavel Durov 8:59 ↗
Not even to sign up, just to log in, because you can prepopulate the database with credentials and emails and passwords. Doesn't really matter. But once you see that you can type in your password and email and you're in, and it tells you 'hello' using your name, then you will have a clear understanding where to go from there.
Interviewer 9:27 ↗
Yeah. I mean, that's true.
Pavel Durov 9:29 ↗
That's one of the best advice I've ever got in my life. It worked perfectly, by the way. I started to build it and before I knew it, I would have there on that website, photo albums, private messages, this guest book we used to call the wall back on. And I guess in the early days of Facebook, we'd end up building something even more sophisticated than Facebook at the time with more features. I had a girlfriend at the time. I asked her, 'We need to somehow come up with a database of all Russian schools and universities and the departments and subdivisions.' She did a great job trying to source all this information online or sometimes writing emails to universities saying which departments you have exactly at this point, we need to know, or reaching out to the department of education both in Russia and then in Ukraine and then eventually in Belarus and in Kazakhstan and other countries where VK ended up to be the largest and most popular social network.
So we did a few things that were quite unique at the time, and for the first almost a year I was the single employee of the company. I was the backend engineer, the front end engineer, the designer, I was the customer support officer. I was the marketing guy as well, coming up with all the awardings and the announcements, coming up with the competitions to promote VK, which worked quite well. That was an incredible experience that gave me knowledge of every aspect of a social networking platform. Also, understanding of how much a single person can do.
Interviewer 11:36 ↗
Exactly.
Pavel Durov 11:39 ↗
It's one of the reasons why I'd like to think I'm an efficient project manager and product manager inside Telegram, because I will not take anything but ambitious deadlines from my team members. If somebody gives me, 'Oh, I needed three weeks to do that,' I always reply, 'Well, I built the first version of VK in just two weeks. Why would you need three weeks? It seems like something you could make real in three days. Three weeks — what are you going to do the rest of the three weeks apart from these three days?' And you know, the team knows me, and that's why we are able today at Telegram to move at a very good pace of innovation. Every month we're pushing several meaningful features. I think out-competing everybody else in this industry in terms of what you can do within the short time frame. So yes, that experience was invaluable.
As for the stack, I started from PHP and MySQL, Debian Linux, but very soon I realized I need to optimize this. I started using memcached. Apache servers were not enough anymore. We had to set up nginx, and my brother was still living in Germany so he couldn't help me much for the first year of building VK. Sometimes I would manage to get through to him through a call. I would use an old-school phone to call him with wires. I said, 'What do I do? How do I install this thing called nginx? I'm not a Linux guy.' If he felt particularly kind that day and not too busy, he would show me the way to do it or set it up himself. But for the most part, I had to rely on just myself. Having him there though helped when we started to grow fast and started to scale it, because at first you realize one server is not enough. I need to buy another one, then another one, and another one. The database should be in a different server. Then you have to split the database into tables. Then you have to come up with a way to shard the tables using some criteria that would make sense and wouldn't break your user experience. When we got to over a million users and beyond a dozen servers, surviving without the input from my brother in terms of taking care of the scaling aspect of it became impossible. I remember asking him to come back because you need to help me with this thing, it's starting to be really big. What was worse is that since we became popular, somebody started to do attacks on us, as it always happens, right? And then we had people that wanted to buy a share of VK. And interestingly, every time we had a negotiation day, the DOS attacks intensified. So we had to come up with a way to fight it. I remember having many sleepless nights trying to figure it out.

12 more exchanges in this transcript

Sign in free to read the rest of this interview. No card required.

Sign in to read the full transcript

Cite this transcript

APA, MLA, BibTeX
APA

Durov, P. (2025, October 1). Learning to code: How Pavel Durov learned to program | Lex Fridman Podcast Clips [Interview transcript]. Lex Clips. CEOInterviews.AI. https://ceointerviews.ai/interview/1164931/

MLA

Pavel Durov. "Learning to code: How Pavel Durov learned to program | Lex Fridman Podcast Clips." Lex Clips, 1 Oct. 2025. Transcript, CEOInterviews.AI, https://ceointerviews.ai/interview/1164931/.

BibTeX
@misc{durov2025_1164931,
  author       = {Pavel Durov},
  title        = {Learning to code: How Pavel Durov learned to program | Lex Fridman Podcast Clips},
  howpublished = {Interview transcript, Lex Clips. CEOInterviews.AI},
  year         = {2025},
  month        = {oct},
  url          = {https://ceointerviews.ai/interview/1164931/},
  note         = {Speaker-attributed transcript with timestamps}
}