CORECURSIVE #073

Serenity OS

With Andreas Kling

Serenity OS

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 build 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.

Transcript

Note: This podcast is designed to be heard. If you are able, we strongly encourage you to listen to the audio, which includes emphasis that’s not on the page

Introduction

Adam: I’m Adam Gordon Bell, and this is CoRecursive. 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 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’ve found an existence proof. I’ve found Andreas Kling. He created SerenityOS 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. 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 this 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.

Apple and Webkit

Adam: You hear me through your headphones, right?

Andreas: Mm-hmm (affirmative).

Adam: Do you have any questions before we start?

Andreas: Not really, I guess if my audio is coming through and everything is good on the technical side, then yeah, I’m up for anything.

Adam: Andrea’s 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:

Andreas: 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 mode I had. So workaholism or other isms.

Adam: That 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.

Andreas: So I would just wake up in the morning in San Francisco and get myself to the last Apple commute bus. I was the leaving. I think it was at 10:00 the morning or something like that. Ride 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:00 PM.

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 I was 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.

Owning the Stack

Adam: 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 there in source control.

Andreas: 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.

Adam: That’s going to be a theme in this episode and of SerenityOS 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.

Escalating Drinking and Drug Use

Andreas: 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 had this association that it was cool, or that it’s fine, or whatever. Or that it’s not really a problem. I can quit whenever I want, the cliches. And like anybody else, I was totally bought into the cliche of 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 drugs. And since that was just my natural tendency, that’s something that I started doing.

Adam: So what does that mean? Having a drink at lunch, or does that mean keeping cocaine on your desk? I don’t know.

Andreas: The latter.

Adam: Yeah.

Andreas: Yeah.

It was 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 train, 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 if you had asked me at the time, I would probably have just insisted that is just a recreational thing. And what’s the big deal?

Adam: It almost sounds like you’re keeping things a secret from yourself to a certain extent.

Andreas: Yeah, for sure. For sure. I think that’s necessary if you are habitually doing things that are hurtful to yourself or to other people. Then the way that you manage sustaining that kind of lifestyle where you habitually hurt people, is that you come up with ways to rationalize it or to turn it into something else, which of course is not true. But you learn to lie to yourself.

Adam: 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 the story important. How do you know when you’ve gone to a bad place? How do you know when you need to get help?

A Trip to the Hospital

Adam: 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.

Andreas: 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 to see 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.

Adam: Did you immediately know that you had to change things or were you like, “Maybe a bit less cocaine, and I’ll be all right.”

Andreas: 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. 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 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 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.

Adam: So his family took him to the hospital.

Andreas: The hospital basically flagged me as a person in trouble. And I live in Sweden. So once you get flagged by the government, then they will stay on your case. 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 social safety net here, and they follow up on stuff. So once that happened, I was sort of in the system, and I knew that now I have to do this.

Adam: 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.

Andreas: I was sitting in the hospital, and I had to fill out a form where I consented to drug abuse being a sort of a public entry on my permanent medical record. Because they make you decide do you want your future caregivers to have access to this information?

That felt like the real crossroads.

Like okay, so now I decide does this become part of my permanent identity, or is this something that I will try to shuffle onto the rug? And I decided then to just make it public. And then I thought all right, well that was easy. And at that point, I decided 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.

Rehab

Adam: 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.

Andreas: 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 up 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 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 a detailed account of all the things that we had and all the mistakes that we had made, and ways we had hurt people and so on. And that was tough, making an honest accounting of that. And I don’t know if I would make it today. It would probably include more things than I was comfortable admitting to back then. So it’s an incremental process I think.

Adam: Part of this process was going to Narcotics Anonymous meetings.

Andreas: 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 just 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. All kinds of people that you would never think it when you saw them, but they had this horrible things that they had done in the past. And it was all associated with being under the influence.

Adam: 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.

Andreas: At first, I felt guilty for sort of looking at them and thinking, “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 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 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 not good behavior.” And then when you suddenly encounter a lot of these stories of bad behavior, you start to build almost 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 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?

Adam: 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.

Out of Rehab

Andreas: It was really confusing because I was used to waking up at seven and bicycling over to the rehab place.

Adam: This is a dangerous time for people in recovery. He only has a couple months of experience with sober living, and it was all big is around rehab. And now he’s on his own, and he can’t fall back into his old patterns, which leaves him a bit lost.

Andreas: 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’s just flying all the time. And normal healthy lifestyle, it’s 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.

Adam: Andreas also started getting back into programming.

Grandfather’s Computer

Andreas: 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. 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 tilt it just right.

Adam: That’s awesome.

Andreas: I install 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.

Adam: This sober living, it just seemed so different to him. Even programming seemed different.

Andreas: It was astonishing how much more I could program in a day when I had no distractions. And I was just really clearheaded. 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 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.

Adam: I mean, that totally makes sense. But why was the path there, why was building an operating system the therapeutic path to a new you?

Andreas: Well, 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. 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 boot loader when I’m a kid. And totally clueless of course, but-

Adam: I don’t know how boot loader works right now.

Andreas: 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 outta 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 is going on this other life path was operating systems. It seemed kind of natural to just give it a go. See okay, what if I tried that again with everything that I’ve learned since then? And 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 a year. So let’s just go for it and see what happens. And that’s 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 waiting for me anywhere, which was kind of a luxurious thing, I suppose, when you’re doing something like this. 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 clearheaded, then have all the money in the world and just be a drugged out zombie for one more day. So that’s what I was doing.

Adam: 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 their own lives to live.

The Summer Cabin

Andreas: 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.

Adam: Did it have heat?

Andreas: It had, what’s it called. I had to burn logs fire. So what is that called? A furnace?

Adam: Yeah. Or a stove, a wood stove.

Andreas: Yeah. Something like that. I had to bring in wood and burn it.

Adam: Fireplace?

Andreas: Fireplace. Yes. It had a fireplace. Thank you. But that was really nice. So then I just rented that cabin and stayed there, just continuing what been doing. But now in a place by myself and just getting back into the groove of having a life where there isn’t somebody who’s watching over me all the time.

Adam: Andreas stayed there for six months, throwing himself into his operating system project.

Andreas: In some ways, I recognize that there was a compromise being made here, right? You’re trading one addiction for another. But even the therapist in my rehab program was always telling me that, “If you get addicted to cooking or to hiking, I don’t care. 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 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 turns that I didn’t really lose interest. So it worked out really well.

Adam: What were your goals like? Besides just filling out the clock and enjoying this, did you have a direction with your project?

Linux Frustrations

Andreas: 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 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.

Adam: 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.

Andreas: 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?

It’s usually not as simple as, “I just have to make this little fix in the WebKit library itself, and everything is faster.” But we’d frequently had to work on stuff like image decoding libraries, and network working libraries, and whatnot. And just the access to all 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. 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.

Adam: This doesn’t mean working physically centralized this 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 everything that runs on your computer can be opened and changed. So you can make small, little iterative changes in minutes, instead of possibly years of trying to upstream some shared library.

Andreas: I remember so much leaving Apple and still having that feeling of, “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 had come to take it for granted. Right? I think I had a memory leak in QuickLook or whatever it was. I was previewing something in Finder, and it would just leak memory. And I thought 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. And it’s definitely something that could be replicated elsewhere.

Adam: So that was his goal. Although maybe it was too large to even speak, that he could build something like what Mac OS looked like if you were an Apple developer. Where everything was in one place, and in one style, and easy to change.

Andreas: I didn’t dare admit it to myself at first because I thought it was almost too grandiose of an idea to try to create an entirely new environment where this exists in 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.

Adam: 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 would be like the foundation and maybe the wood framing. Andreas has a much bigger goal in mind though.

Building the Whole Operating System

Andreas: 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.

Adam: 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:

Andreas: 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. So that’s what I started doing.

Learning To Build an OS

Adam: How do you learn how to build an operating system?

Andreas: 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, I just made a classical Unix kernel. Instead of trying to come up with a radical new UI, just used the late ’90s UI.

Adam: 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 and SynthWave

Andreas: 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 entertainment platform. And I had just these positive childhood memories of the really serious office computer. That’s something that I wanted to rebuild I guess.

Adam: This idea of recreating the past based on nostalgic joy is something that he learned from the music genre synthwave.

Andreas: It’s a modern music genre that takes influence from 1980s synth pop and movie soundtracks like Blade Runner and things like that. And I see this parallel between the genre of synthwave wave 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 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 SerenityOS 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 2020 hindsight.

Adam: 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.

Announcing the Project To Reddit

Andreas: 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 thing I think. Of course looking back now, it’s very simple compared to what it has become. But there was something about it that was really energetic and something new, yet still familiar to everybody. 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.

Adam: 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, “Here it is. Here’s all of it.” It’s like, “Here, I started at the bottom.” It’s almost like you’re saying, “It’s not magic. Look, here. Did it?”

Andreas: Yeah. No, that’s true. That’s true. That’s something I heard often from people. It 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.

Adam: Those people whose interest was piqued, they started to poke around with Serenity, try it out. And they started to contribute.

Andreas: 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 since then, it’s just been growing. New people pick this up every week and find something they want to hack on. And I’ve always been welcoming to new people because 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.

Adam: 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.

Andreas: 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 a little too long. And I remember just feeling, “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.”

Adam: It’s interesting because you had a secret life, and then you went to a world of nothing is secret. Was this some sort of conscious decision to be completely out there with this project?

Andreas: 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.

Building in Public

Andreas: 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 back door 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 back door is. Maybe build a window into my life instead let’s say.

Adam: The 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.

A neat thing about a project this large is 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 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.

Just a Kid who Loved Computers

Andreas: 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 a purity of purpose that I enjoy. That 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. If you accept that something is going to take a long time, you don’t have to deal with that growing disappointment when you’re not getting to where you want to be immediately.

Adam: My very last question is did you recapture this 11 year old version of yourself and that energy that you were looking for?

Andreas: I think so. I’ve never felt more true to myself than I do lately. I never worry anymore about how I present myself if I’m saying the right thing or 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 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.

Next Steps

Adam: 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 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 the 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.

Adam: 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.

Support CoRecursive

Hello,
I make CoRecursive because I love it when someone shares the details behind some project, some bug, or some incident with me.

No other podcast was telling stories quite like I wanted to hear.

Right now this is all done by just me and I love doing it, but it's also exhausting.

Recommending the show to others and contributing to this patreon are the biggest things you can do to help out.

Whatever you can do to help, I truly appreciate it!

Thanks! Adam Gordon Bell

Audio Player
back 15
forward 60s
00:00
00:00
41:28

Serenity OS