CoRecursive: Coding Stories - Story: Serenity OS
Episode Date: February 1, 2022 How would you build an operating system?   My answer is I wouldn't. First off, I don't know how. And the second thing is it seems like to large of a task. It took thousands of developers to bui...ld Windows XP.  But actually, it is possible to build an operating system from scratch. My guest is doing it. Andreas Kling created SerenityOS starting from an empty Git repository. So today, I find out how he did it, how this is possible. But mainly today, I find out why. Why build an operating system from scratch? And it all started in the 2010s when Andreas worked at Apple. Episode Page Support The Show Subscribe To The Podcast Join The Newsletter
Transcript
Discussion (0)
I'm Adam Gordon-Bell, and this is Code Recursive.
How would you build an operating system?
My answer is I wouldn't.
First off, I don't know how.
And the second thing is, googling around,
the best estimate seems to be that it took around 2,000 developers
to build Windows XP back in the 2000s.
And that's just if you can trust random Quora answers.
Maybe there was even more people.
But actually, it is possible
to build an operating system from scratch.
I found an existence proof.
I found Andreas Kling.
He created Serenity OS
starting from an empty Git repository.
And I'm running it right now,
and I'm looking at it.
There's a web browser, and there's Solitaire.
It's like an alternate world version
of the Windows 95 that I grew up using, built from scratch, like really from scratch.
It looks totally familiar, but somehow different. So today I find out how he did it, how this is
possible. But mainly today I find out why, why build an operating system from scratch.
And his answer is about addiction and
recovery and about doing something so big that you can sort of reorient your life around it
and kind of come out the other side as a different person. And it all starts in the 2010s
when Andreas worked at Apple. So let's get into it.
You hear me through your headphones, right?
Mm-hmm.
Do you have any questions before we start?
Not really.
I guess if my audio is coming through okay
and everything is good on the technical side,
then, you know, I'm up for anything.
Andreas worked on WebKit, which is what powers Safari.
And he first worked remotely for Apple from his native Sweden, where his typical day looked like this.
Waking up really late, partly because it was comfortable, but also because all of my coworkers would wake up in a different time zone anyway.
So it all kind of worked out with my morning sleepiness.
And then kind of just obsessively working on WebKit and Safari stuff most of the day,
really just sitting at the computer the whole day.
I didn't have a very multifaceted lifestyle back then. It was all work all the time.
And when I had a chance to hang out with other people,
I would sort of take a break from work by just drinking and doing drugs.
Those were the two modes I had, so like workaholism or
other isms. Thao was working in Sweden, but eventually he went to work in Cupertino,
and he lived in San Francisco, where his life was very different, but also sort of the same.
So I would just wake up in the morning in San Francisco and get myself to the last Apple
commute bus that was leaving. I think it was at 10 o'clock in the morning or something like that.
Write it down to Cupertino, spend the day in the office,
just working on whatever we were doing at the time.
Usually some kind of performance optimization stuff or benchmark tracking.
And I would almost always stay until the very end of the day.
So I would grab the very last commute bus home to San Francisco
and then come home at 10 p.m.
It was a fairly intense lifestyle.
But at the time, it just seemed like everything I wanted from life.
As far as I was concerned, I was living my childhood dream, right?
Because I wanted to be a programmer, and now I was.
And I didn't do anything but.
So surely that must be the dream. Obviously I can
see now that it was a very single-minded existence I guess. I guess it felt at times like I was
putting everything else in my life on hold and not really advancing on any other axis other than
career but I guess I told myself that that I living the dream. So there was nothing to fulfill.
And that's how I sort of was able to exist in that state for a while. I mean, I loved working there
for the years that I did at first. It was just towards the end that I got a bit disillusioned.
I certainly enjoyed the technical excellence of the people there. And getting to work on such
tightly integrated solutions and
systems was really cool. One thing he picked up at Apple was a style of development that's a bit
different than what I'm used to. A lot of development today for me seems to be gluing
various components together into a working system. But at Apple, everything is in-house.
The web browser you use, the system calls you make, maybe even the programming language you use
if you're using Swift, they're not
black boxes. They're just something made
for you by one of your colleagues.
You can ask questions. You can make improvements.
It's all just code. They're in source
control. I still feel
that nobody really does that better than
Apple. They control the whole stack
and they really take advantage of that,
especially lately with putting out their own CPUs and everything now as well. That's been really
awesome. And I enjoyed learning from that environment what is really possible if you
control more of the stack. That's going to be a theme in this episode and of Serenity OS, really.
Control everything, keep it all in one big place and build it all in-house.
But the other theme is struggling with escalating drinking and drug use. In Cupertino, Andreas was also going to the bar that's near the Apple campus most nights and using drugs here and there. But
that was really nothing new for him. That was sort of always part of my personality, I think,
ever since I was a teenager. I first tried drinking, tried doing drugs.
I discovered that I had an endless appetite for them.
And when left to my own devices, that's sort of where I would just naturally drift to.
So if there was nothing to keep my attention, I would just end up drinking or end up doing drugs. And I didn't think too much of it when I was younger
because I sort of, I had this association that it was, you know, cool or that it's fine or whatever,
or that it's, it's not really a problem. I can, I can quit whenever I want, you know, the cliches.
And like anybody else, I was totally bought into the cliche of, you know, it's just a casual recreational use
and I can stop whenever. And I think the two things that drove escalation for me was a much
larger paycheck after going into big tech because big tech pays well. And if you have more money,
you can buy bigger and more dangerous trucks. And since that was just my natural tendency,
that's something that I started doing.
So what does that mean?
Having a drink at lunch or does that mean like keeping cocaine on your desk?
Like, I don't know.
The latter.
Yeah.
Yeah, it's more like that.
But there was a time when it was just a drink at lunch as well.
So I've been through the whole spectrum,
but I don't know if I ever really felt like I was doing anything wrong
until I got to the point of no return
and realizing that this is an unsustainable problem.
But as I was making my way down the drain,
I never really thought that maybe this isn't good.
It's very strange how that works.
But now, of course, with the benefit of hindsight, I can see it more clearly.
But, like, if you had asked me at the time, I would probably have just insisted, you know, that it's just a recreational thing and, like, what's the big deal?
It almost sounds like you're keeping things a secret from yourself to lie to yourself.
During this period of slow escalation of drug use, Andreas moved back to Sweden and went back to working remote.
I'm a big fan of remote work, but honestly, I feel like there are some psychological dangers to it.
Isolation and boredom are known mental health risk factors.
I feel like that's one of the things that makes this story important.
How do you know when you've gone to a bad place?
How do you know when you need to get help?
For Andreas, things got worse before they got better.
He grew a bit detached from his teammates
because they were on the opposite side of the world.
And eventually he hit a breaking point
and his family confronted him with an important message.
Like I was having an unmanageable problem
and I was hurting them.
And having to face the fact that
I'm not just making a mess of my own life,
but it affects others.
That was sort of the thing that made me wake up, I guess.
Because I think part of what made me able to justify it to myself was that
the only one who gets hurt is me.
But that's not really true.
That's never really true.
Unless you live in complete isolation as a hermit somewhere, you always affect the people around you.
But I was kind of oblivious to that until they pointed it out to me.
That's when I really started seeing it for the first time, really started thinking critically about it.
And it wasn't easy and it took a long time to actually unravel.
It took a long time to understand how far
gone it actually was did you immediately know that you had to change things or were you like
oh maybe a bit less cocaine and i'll be all right um so i think i had a brief phase of bargaining
i guess like anybody would.
I don't recall anymore, but it was probably several days where I would just go over the possibilities in my head.
You know, like maybe I can just do less or maybe I can just get better at hiding it.
Or maybe I can just figure out some way out of this whole thing.
But one thing for me was that I had already been hiding these things to the best of my ability,
not just from, you know, coworkers, but also from my family. So it was shocking to have this
thing that was private suddenly become public, even to my family. I didn't really know how to
deal with that gracefully. So I think just, I just kind of buckled under the psychological pressure and I didn't have
the strength to try to come up with a plan to hide it better. So his family took him to the hospital.
The hospital basically flagged me as a person in trouble. And I live in Sweden. So once you get
sort of flagged by the government, then they will stay on your case and
you don't, they don't let you slip through the cracks so much. That's how I ended up in a rehab
program. They have a very, very serious like social safety net here and they, they follow up
on stuff. So once that happened, I was sort of in the system and I knew that like now I have to,
I have to do this. One potential problem of going
to the hospital for drug abuse is that it'll end up on your medical record. Will you get a different
standard of care from doctors if they think you're a drug abuser? Will they be concerned about
treating you? This was a turning point for Andreas. I was sitting in the hospital and I had to fill out a form where I consented to
to like drug abuse being a sort of a public entry on my permanent medical record because they they
make you decide like do you want your future caregivers to have access to this information
that felt like the real crossroads like okay so okay, so now I decide, does this become part of my permanent identity? Or is this sort of something that I will try to shuffle under the rug? And I decided
then to just make it public. And then I thought, all right, well, that was easy. And like, at that
point, I decided that, that the only way that I can do this in a way that I would trust myself
would be to make it completely public. So I just told everybody and wanted to sort of make it part of my public identity online as well.
But of course, that took a bit longer to become comfortable with that idea.
By this time, he had left Apple and he was staying with his family and biking back and
forth to outpatient rehab each day. It was a 90-day program.
I guess I felt defeated. That is really, I guess, how all these 12-step programs start,
where you admit defeat.
That is usually the first step that you have to admit defeat
and that you have lost your ability to manage the situation.
And that was really how I felt.
So I was sort of a perfect candidate for that type of therapy, but that's
not to say that everything was roses. I mean, of course now I, I remember the good parts, but
there were really rough parts as well. And one of the things that we had to do in rehab was to
try to share with each other, all the people that were there, we had to share with each other,
like a detailed account of all the things that we had and all the, all the mistakes that we had made and ways we had
hurt people and so on. And just, that was tough, you know, making an honest accounting of that.
And I don't know if, if I would make it today, it would probably include more things than I was
comfortable admitting to back then, You know, so it's,
it's an incremental process, I think. Part of this process was going to Narcotics Anonymous
meetings. One of the most helpful aspects of it, which was really hard to reconcile at first,
was meeting a whole bunch of people who had done way worse things than I had. And, you know,
just meeting, meeting people who had murdered somebody, people who had been to prison, or people who had done a hit and run or something like that. Like all kinds of
people that you would never think it when you saw them, but they had this like horrible things that
they had done in the past and it was all associated with being under the influence.
I've seen these recovery meetings in various movies. Fight Club comes to mind.
It was never clear to me how hearing
someone else's tales of debauchery would help you out. But for Andreas, it seemed to work.
At first, I felt guilty for sort of looking at them and thinking, oh, at least I'm not as bad
as that person. Over time, I realized that that's just sort of a healing mechanism. And it was funny
because somebody that I had sort of judged in this way,
when I initially met them, later ended up telling me that they were really uncomfortable with me
because they felt like I was way worse than they were. They were happy to have met me because I
made them feel better about their own misdeeds. It just goes to show that it's sort of like a
really big cacophony of just people finding comfort in just hearing about the exploits of
other people and I guess using it to orient themselves around what they really are.
Because I think when you do a bunch of nonsense, let's call it, it's hard to be too judgmental of
your own nonsense. But when you see other people doing nonsense, it's much easier to look at that objectively and say, well, that's, that's not good behavior. And then when you suddenly
encounter a lot of these stories of bad behavior, you start to build almost like a sense of morality.
Once you have that, it's much easier to eventually relate your own experiences through that
sense of morality. That's something that we talked a lot about in the rehab program that I went to,
how addiction leads to like a moral bankruptcy, basically.
And one of the important things to do
in rehab and recovery is to help people
build a new sense of morality
because you have been taking out loans
from their morality bank for too long
and they're just completely bankrupt, right? Building this new sense of morality and just
going to rehab in general, they were a transformational process. But then the 90 days
were over. It was really confusing because I was used to waking up at seven and bicycling over to
the rehab place.
This is a dangerous time for people in recovery.
He only has a couple months of experience with sober living,
and it was all based around rehab, and now he's on his own.
He can't fall back into his old patterns, which leaves him a bit lost.
I was really shocked at first with just how much time there is in a day,
because when you are living in the fast lane, so to say, you don't notice time is just flying all the time. And normal, healthy
lifestyle is just a lot of hours in the day. And I really struggled with just coming up with stuff
to do. It was a simple existence. I was also trying to get back in touch with family
that I had lost contact with a little bit.
So I was borrowing handheld video games
from my brother, for example.
And he just gave me this whole bundle of Nintendo DS games.
And I found it hard to talk to him
because I was so uncomfortable about having had this secret life.
But if I could play these games that he lent me, then I could talk to him about those games.
And that was sort of a way to start having a conversation again with each other.
So I was just going to meetings and then trying to plow through these Nintendo DS games.
That was my life at the time.
Andreas also started getting back into programming.
I had this old PC that I had made for my grandfather back in 2006, I think.
And that was the computer I had access to at this house I was staying.
So I would wake up and press the power button on that thing,
hope it would boot up one more time.
And it was really on its last legs.
Like you had to tilt the computer
so that the CPU fan would short circuit the motherboard
if you tilted it wrong.
So you had to like tilt it just right.
That's awesome.
I installed like an old version of Slackware Linux
on that thing, sort of era appropriate.
I don't know, Slackware 11 or whatever from 2006,
somewhere thereabouts.
And I had this pretty slow machine.
And then I guess I would just sit at that computer
and write random programs
until it was time to go to recovery meetings
and then come back and write more programs.
This sober living, it just seemed so different to him. Even programming seemed different.
It was astonishing how much more I could program in a day when I had no distractions and I
was just really clear headed and I felt like I was on the precipice of some serious productivity, if I just had something to sink it into. That's sort of when I started tinkering with some of the low level programming projects, which, you know, eventually became the Serenity operating system. But at first, I was really kind of just experimenting
with this feeling of being able to program for hours on end
and just enjoying programming again, I guess,
for the first time in a long time.
I mean, that totally makes sense.
But why was the path there, Like, why was, you know, building an
operating system, the therapeutic path to a new you? Oh, well, I don't know. I don't know that
I originally saw that. But the thing that made me get into the operating system path in the first
place was as a child, I wanted to build my own operating system,
you know, when I was 10, 11, 12, at that age.
And you can even find old Usenet posts from me as a child
asking for help writing like a bootloader when I was a kid.
Totally clueless, of course.
I don't know how a bootloader works right now.
All right.
Well, I guess most people don't.
But yeah, that's something that I was curious about as a child.
And when I came out of rehab, I guess one big thing that I was thinking a lot about was when was the last time that I felt like I was really myself?
And I figured it must have been before I got access to alcohol in my life.
That was sort of the original Andreas.
And to get back to that, I thought, okay, well, what did I care about before that?
And one of the last things I was interested in before sort of going on this other life path
was operating systems.
It seemed kind of natural to just give it a go, see like, okay,
well, what if I tried that again with everything that I've learned since then? And like, I've
become a capable programmer since then. So what if I just put those skills to use? I have no job,
nobody's expecting anything from me. I have money to burn for like a year.
So let's just go for it and see what happens.
And I mean, that's like paraphrasing my thought process,
but that's sort of how it happened.
It turned out to be very therapeutic.
And I think the first thing that made it therapeutic was that it allowed me to actually fill up the entire day
with something I found interesting, but seemed,
well, let's say relatively harmless, right? Compared to what I had been filling my days with
for the past decade. There was nobody like waiting for me anywhere, which was a kind of a luxurious
thing, I suppose, when you're doing something like this, like the fact that there's nobody waiting for you to get back to work.
I was just burning through savings at that point.
But it seemed like a reasonable thing to do.
Certainly in retrospect, I know it was very reasonable.
But even at the time, it seemed like if I can get my head in order and maybe build a different type of life, a better life after this,
then it doesn't matter what it costs.
I would rather have no money and be completely clear-headed
than have all the money in the world and just be a drugged-out zombie for one more day.
So yeah, that's what I was doing.
Staying with family worked during rehab and probably made it easier to stay sober.
But Andreas couldn't live there his whole life, and his family probably had their own lives to live.
So I rented a summer cabin, which was really cheap because winter was about to start,
and moved out to this little summer cabin village.
So it was just me in this little cabin, and nobody else was around.
Did it have the heat it had a what's
it called i had to burn logs of fire so what is that called a furnace yeah or a stove wood stove
yeah something like that i had to bring in wood and burn it fireplace fireplace yes it had a
fireplace thank you so that but that was really nice So then I just, I rented that cabin and stayed there just continuing what I had been doing.
But now in a place by myself and just getting sort of back into the groove of like having a life where there isn't somebody who's watching over me all the time.
Andreas stayed there for six months, throwing himself into his operating system project.
In some ways, I recognize that there was a compromise being made here, right? Like you're trading one addiction for another. But even the therapist in my rehab program was always telling me that like, if you get addicted to cooking or to hiking, I don't care. Like, it's so much better. Go do that.
Eventually you'll get bored of it and find other things to do.
Just don't get back into the drugs.
So I didn't worry too much about like
substituting some really lame addiction.
I guess I thought that I'll just try it for a while
as long as it's fun.
Maybe I'll lose interest and do something else.
But it turns out I didn't really lose interest.
So it worked out really well.
What were your goals?
I mean, besides just filling out the clock and I'm enjoying this,
did you have a direction with your project?
Well, I don't know that I ever had a real direction with it.
But in the beginning, I remember feeling kind of frustrated
with finding myself using Linux again and thinking, oh, it's nice to be back on Linux.
Everything is snappy and the developer experience is really great.
But I sure do miss having the source code for everything.
This is a fascinating distinction to draw.
Linux is open source.
Everyone has access to the code. But if you listen to episode 70 with
Joey Hess talking about Debian, making changes can be a bureaucratic process. And that's just for one
distribution. There are hundreds of Linux distributions. Even if it's a one-line change,
it could take years to get that upstreamed and spread into various Linux distributions.
If you listen to episode 67 about Zig, that was one of Andrew's motivations behind creating Zig.
But meanwhile, Andreas has another strategy.
At Apple, everything was in one place,
and everything was built internally.
And when you're in that environment, it's extremely powerful.
So the area that I worked on primarily throughout my stay at Apple
was web performance stuff.
So Safari and WebKit
performance optimizations, performance work. And that type of work usually requires traversing the
stack up and down, right? Like it's usually not as simple as, oh, I just have to make this little
fix in the WebKit library itself and everything is faster. But, you know, we frequently had to
work on stuff like image decoding libraries and networking libraries
and whatnot.
And just the access to all of those layers
and having the expert of whatever thing
you wanted to know about.
The expert was always somewhere in the building
or in the adjacent building.
And that's an incredibly powerful thing.
If you look at open source software systems,
there isn't really anything quite like it
in the Linux world, for example.
Like people are so distributed
and there are many great advantages to being distributed,
but I've also seen some really great advantages
to being centralized.
He doesn't mean working physically centralized.
He means everything is in a monorepo. Everything's in a single file system where it's easy to get access to. Every piece of code for of like, oh, I can just go and look
in the source code of this thing. And I was using a MacBook when I left Apple. I remember getting
really frustrated when I couldn't bring up the source code for stuff anymore. Because I come to
take it for granted, right? I think I had a memory leak in Quick Look or whatever it was, like I was
previewing something in Finder and it would just
leak memory. And I thought, oh, I'm just going to dig into this, see what it is. And I just couldn't
anymore. And now I knew how everybody else felt. That really made me think that it's silly that
I can't have this feeling about the software that I'm using every day unless I work at Apple,
because I think it would be cool if everybody could have that feeling about the
software they use every day without having to work at Apple.
The spirit of taking ownership of the whole stack, Apple doesn't have a monopoly on that
mindset.
It's definitely something that could be replicated elsewhere.
So that was his goal.
Although maybe it was too large to even speak, that he could build something like what macOS looked like
if you were an Apple developer,
where everything was in one place and in one style and easy to change.
I didn't dare admit it to myself at first
because I thought it was almost like too grandiose of an idea
to try to create an entirely new environment
where this exists and open source. I guess I'm a little bit
of the belief that if you have a great big idea, the best thing to do is not tell anybody because
it really takes the air out of it. So better to go and try to prototype the idea. And then if
something comes out of it, you can show it to people. But at least in my case, whenever I tell
people about some idea, I kind of tend to lose interest in the idea. So I just went to work on it instead.
What he's working on is building an operating system from scratch, literally from scratch,
starting with a blank file. What many people mean when they talk about operating systems is the
kernel, the lowest level part of the operating system, like the Linux kernel. If the software
of your computer was a house, the kernel will be like the Linux kernel. If the software of your computer was a house,
the kernel will be like the foundation and maybe the wood framing. Andreas has a much bigger goal
in mind though. As far as I'm concerned, an operating system is all the software that comes
with your computer. So macOS is an operating system that comes with a kernel, but also with a
web browser and a text editor and a note-taking application and
all kinds of stuff, right? And that's sort of what I think of as an operating system,
not so much the Linux kernel purist idea that the kernel is the operating system.
That's right. He was going to build it all. He's not just going to build the foundation
and the framing, but he's going to build the walls and the carpet and the stove and even
the pigments for the paint and the coffee maker. This might be where my metaphor starts to break down because on
a computer, all of those things are just made of one thing. Everything is just a piece of code
that somebody writes. And if we just make all those pieces of code and stack them up, it's
going to work. I had no illusions about how an operating system looks once it is put together
and works. Now, I didn't know how to get there. But I reasoned that if you just start building
these components one by one, eventually, you'll have the full stack and it will just gel together.
And so that's what I started doing. How do you how do you how do you learn how to build an operating system? Well, when I started, I had no idea how to
do that. So it was a gradual process for me. I always figured that the hardest part would be
choosing which abstractions to use. Because once you know what the abstractions are, it's just a
matter of implementing them. So I decided to make it a little bit easy for myself with Serenity to
use existing abstractions or well-known abstractions like Unix, right? And instead
of coming up with an entirely new style of kernel, it just made a classical Unix kernel.
Instead of trying to come up with a radical new UI, just use the late 90s UI.
By late 90s UI, Andreas specifically means he's building an operating system that looks like Windows 2000.
The Windows 2000 that he used as an 11-year-old kid.
Windows 2000 was beautiful.
And it knew exactly what it was.
And then everybody got distracted.
Because we had to turn the PC into a gaming machine, into a surfing machine, and it had to become everything.
A multimedia edutainment platform.
And I had these, just these like positive childhood memories of the really serious office computer.
That's something that I wanted to rebuild, I guess.
This idea of recreating the past based on nostalgic joy is something that
he learned from the music genre synthwave. It's a modern music genre that takes influence from
1980s synthpop and movie soundtracks like Blade Runner and things like that. And I see this
parallel between the genre of synthwave and what I'm doing with Serenity in that we are taking all these old ideas, but rebuilding them using modern technology and modern development practices.
And it's so much easier today to build a system that looks and feels like something from the year 2000 than it was back then.
Because, of course, we have way better stuff today and we
understand much more about software development much like with synthwave it's so much easier to
make a cool synth pop song today than it was in 1985 because in 85 you needed all this like
analog synthesizers and all this advanced equipment right or i guess you had digital synthesizers in
85 but you had much more crude tools.
And in that sense, I think Serenity OS is like Synthwave.
It's creating something strongly influenced by the past, but in a modern way.
And in a sort of a high fidelity way with 20-20 hindsight.
And so this is what Andreas was working on all day, every day when he wasn't attending NA meetings, just coding away in his cabin, building a new sober life for himself by throwing himself
at this project.
And then when that rental contract ran out, that's when I made a post on Reddit about,
so I'm moving out of this house and I just spent the last six months here writing this
operating system and here's what it looks like.
And had a little demo
video of it that i posted on youtube as well people were really kind of captivated by the
by the thing i think of course looking back now it's it's very simple compared to to what it has
become but there was something about it you It was really energetic and something new,
yet still familiar to everybody, I think.
I mean, I don't know.
I thought a lot about what is it that makes this so interesting to people.
I can never quite figure it out, but people liked it.
One thing I was thinking about is oftentimes the layers below yourself
as a developer seem kind of magical.
So for somebody to come along and say like,
here it is, here's all of it.
It's like, here I started at the bottom.
And it's like, it's almost like you're saying,
oh, it's not magic.
Look, here, did it.
Yeah.
No, that's true.
That's true.
That's something I heard often from people.
It like piqued people's curiosity who wanted to see what a real system might look like,
even though it was clearly immature.
It was still an approximation of what a mature system might look like.
Those people whose interest was piqued, they started to poke around with Serenity,
try it out, and they started to contribute.
One of the first things that somebody helped out with was writing a script
that would automate the build process
and that was really really sweet i was very very grateful for that and then you know since then
it's just been growing and more like new people pick this up every week and find something they
want to hack on and i've always been welcoming to to new people because just even if it started as a personal therapy project for me,
that doesn't mean that I don't want other people to work on it, right?
I'm really happy to share my programming playground with anybody else who wants to write similar type of software.
And to explain how it all worked, Andreas started recording himself.
He recorded himself coding and uploaded it onto YouTube.
This didn't come naturally to him at first.
One of the first videos I put up on YouTube, I had this long struggle trying to print out
a number in octal.
And it took me like a little too long.
And I remember just feeling, oh, this is so embarrassing.
Now everybody will see
and I decided to upload it anyway
because I thought you know what
this would probably be good for me
if I just become okay with people seeing me
struggling with something silly
it's interesting because like you
you know you had a secret life
and then you went to a world of
nothing is secret
like was this some sort of conscious decision
to be completely out there with this project?
I think so.
I even named it after the recovery program I was in.
When you go to these 12-step meetings,
then you always read the serenity prayer at the end.
The way I was thinking at the time was,
I need to make something that is
so big and beautiful that I will want to stick around. And I can use that as a tool to keep
myself honest. If I just name it something that always recalls where it came from, and
I tell everybody where it came from. So I guess I sort of saw it as a chance
to build this big monument to my own recovery.
And then I could never run away from it.
And I would feel like such a hypocrite
if I would start using drugs again
and working on my Serenity operating system
at the same time, right?
So I sort of get this built-in deterrent from that.
There's no telling what the future holds, of course,
but in rehab, we often talked about how people have this tendency to,
if you see an opportunity to build a backdoor into your life,
like an escape hatch for yourself,
then if you're not conscious about those things,
then you have a tendency to just build those. So I guess here I was kind of thinking proactively and trying to
build whatever the opposite of a backdoor is. Maybe build a window into my life instead, let's say.
A community started watching through that window. People watched him code and then they asked him
questions. How did he type so fast? How did he get started working at Apple?
How do you pass a coding interview?
He started off a bit nervous,
but as the hours of tape accumulated,
he became a pretty confident speaker.
And people learned a lot watching him code.
He was good at what he did.
He had to get a job initially to support himself,
but eventually his YouTube fans and project contributors,
they gave him enough financial support that he could dedicate to this full time. The neat thing about a project this large is, like, there's lots of rough edges, there's
lots of parts to build, there's lots of work to keep many people busy.
When I look right now, in the past 30 days Serenity has had over 100 contributors, and
the numbers continue to grow.
But actually growth and completion, that's not really what this project is about.
Unlike most other projects,
we are not trying to gain users
or popularity or anything like that.
Each and every person who works on this,
they just want to make something for themselves,
something beautiful.
And I think that gives us
almost kind of like a purity of purpose that I enjoy.
I always treated it as this is going to take at least 10 years to get anywhere reasonable.
And it's astonishing how much you can do if you take that perspective from the beginning.
Like if you accept that something is going to take a long time, you don't have to deal with that sort of growing disappointment when you're, when you're not
getting to where you want to be immediately. My very last question is, I mean, did you recapture
this 11 year old version of yourself and that, that energy that you were looking for?
I think so. I've never felt more true to myself than I do
lately. I never worry anymore about like how I present myself, if I'm saying the right thing,
or, you know, if I should try to phrase myself this way or that way, because I can just speak
from the heart and I know that it comes out how I want it to come out. Most of my life,
I was very conscious of everything I would
say. And I was always trying to manicure my public persona so that I could, you know, obscure
how I was living my life. And it is a very good feeling to not do that. And to just sort of speak
candidly and honestly about everything and anything. And that's really how I was like when I was 11.
I wasn't cynical and I wasn't trying to hide anything.
I was just a kid who loved computers.
And I think I became that again.
And I'm happy about that.
You can find Andreas on YouTube. Serenity isn't done, but you can find andreas on youtube serenity isn't done but you can use it i don't think it's the
type of project that will ever be complete if you want to learn how to build an operating system
or systems programming or modern c++ or or just watch hundreds of hours of a calm person working
diligently at a project that he thinks might take all his life, you should
totally check him out on YouTube. And as you've probably gotten a taste of here, his openness and
candor speaking about his life is very endearing. So you should check that out. Also, if you want
to hear more about his time at Apple and how it was both an amazing experience and a problematic
one, and more about Serenity Project and how it can be transformative for people who join,
check out the Patreon episode.
It's going to be out on the 15th.
Oh yeah, and we didn't even cover this,
but they're building a full web browser from scratch.
I heard someone say that the web standards are so complex right now
that it wouldn't be possible to build a new web browser.
But here the Serenity team is doing it, and you can watch them.
If you want to hear that and more like it,
please support the podcast on Patreon to unlock those episodes.
And until next time,
thank you so much for listening.