This is a free preview of a paid episode. To hear more, visit refactoring.fm
Today's guest is Salvatore Sanfilippo, also known as Antirez!
Salvatore is the creator of Redis, an open source data store used by hundreds of thousands of developers across the world. And he's also a writer. He published the popular sci-fi novel called Wohpe, which anticipated a lot of what is happening today with AI.
With Salvatore, we talked about open source - what makes a project successful and how to make it successful for its maintainers. Then we discussed how Salvatore uses AI for extremely complex coding, which makes him 5x faster than without AI. And finally, I asked him about his writing work and what is the experience of writing a novel versus a software project.
ποΈ Episode
You can watch the full episode on Youtube:
Or listen to it on Spotify, Apple, Overcast, or your podcast app of choice.
Also, here are some show notes:
* Salvatore's website
* Salvatore's Youtube
* Wohpe
π₯ Interview Summary
If you are a π paid subscriber π you will find my own summary of the interview below.
Itβs the 10-minute, handcrafted takeaways of what we talked about, with timestamps to the relevant video moments, for those who donβt have time to sit through the 1-hour chat.
Here is the agenda for today:
* π Staying in Sicily: Life & Career Choices (05:09)
* π§ What Makes Open Source Projects Successful (12:47)
* π° Monetizing Open Source Software (19:19)
* π§ "We Are Destroying Software" - The Complexity Problem (23:19)
* π€ Using AI for Complex Coding Tasks (34:31)
* π From Coding to Novel Writing (50:31)
Letβs dive in π
1) π Staying in Sicily: Life & Career Choices (05:09)
Salvatore made a deliberate choice to build his career from Sicily rather than relocating to tech hubs like Silicon Valley.
He explains that while being in tech centers might lead to greater wealth, it's not necessary for engineering excellence:
"To be a successful software engineer, you can be everywhere, but to make a lot of money, it is much better to stay in the center of things... For me, it was not a problem of performance, but how much money you want to make."
Salvatore believes that once you reach a comfortable income threshold (he mentions around β¬4,000/month), additional money contributes minimally to wellbeing. His decision to remain in Sicily was driven by:
* π Personal values - preferring Europe's balance of capitalism and social services
* π‘ Community connections - maintaining important relationships in his hometown
* π§ Quality of life - prioritizing wellbeing over wealth accumulation
He notes that he's seen many young people in the US who "become rich too fast" and experience "lack of purpose" as a result, reinforcing his comfort with his choices.
2) π§ What Makes Open Source Projects Successful (12:47)
Salvatore identifies key ingredients that contribute to open source success in 2025, with simplicity being at the forefront:
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
Simply software developers at that point had split between back-end and front-end
SPEAKER_01because of company needs. So at that point, since everything was split, the initial idea that was very sounding of HTML5 semantic web, where you basically generate server-side HTML very simple and then with your CSS do the styling and you just add the tiny bit of JavaScript for the dynamic part that no longer works when you have two populations separated separated population of developers you have to make front-end that makes
just happy calls to the back-end like if the two things don't talk because they
SPEAKER_01don't talk in the organization Hey, Luca here.
SPEAKER_00Welcome to a new episode of the Refactoring Podcast, where every two weeks we interview a world-class tech leader. Today's guest is Salvatore Sanfilippo, also known as Antires. Salvatore is the creator of Redis, an open source data store used by hundreds of thousands of developers across the world. And he's also a writer. He published the popular sci-fi novel called WAP, which anticipated a lot of what is happening today with AI.
SPEAKER_00With Salvatore, we talked about open source, what makes a project successful and how to make it successful for its maintenance. And then we discussed how Salvatore uses AI for some very complex coding, making him five times faster than before. And finally, I asked him about his writing work and what is the experience of writing a novel versus a software project. So let's dive right into it after a short word from our sponsor.
SPEAKER_00Hey, before we continue, I want to spend one minute to tell you more about our podcast sponsor for this season, which is Sleuth. Because chances are you know of engineering metrics programs that did not get adopted or failed to deliver the promised productivity gains. But why? Because oftentimes these metrics live in dashboards and dashboards die in loneliness. They were built for a purpose, but then people just forget about them. So Sleuth Pulse solves this problem by bringing metrics and
people together,
SPEAKER_00empowering engineering reviews. So you can easily use metrics in sprint reviews, monthly check-ins, or resource planning to get better alignment and better execution. This is truly the best way to make metrics a part of your workflow. And Sleuth improves these reviews by bringing in quantitative and qualitative data, letting people add context and using AI to summarize data and pick out outliers. So check out sleuth.io for more information.
SPEAKER_00Hi, Salvatore. Welcome. And thank you so much for being here with us today. Thank you, Luca. So Salvatore, you are the creator of Redis, which is an in-memory data store. And it's one of the most popular NoSQL data stores in the world, which, I mean, it's kind of hard to define what Redis is because it does so many things. So was that a good definition for you? I believe that the original way that was to say it's a data
structure server, still it's the best definition of it because the server part is because it's
SPEAKER_01exposed to the network. So it makes sense to call it a server and also because it handles the implementation, the storage of the data structures for, for you. But otherwise is that, and the fact that it is also database and also a cache is because those two objects after all are created on top of data structures. So given that you have exposed data structures, you can create for yourself, uh,
SPEAKER_01basically storage or caching or what, or messaging, whatever.
SPEAKER_00Yeah, I love that because it keeps you open to possibilities, to more things to do in the future while keeping true to the definition still of data structured server. And you're also a writer because you published the popular sci-fi novel called WAP a few years ago, and you're Italian like me. So it's double pleasure to have you on the show because it doesn't always happen for me to have Italian guests. So thank you again.
SPEAKER_01A big pleasure for me as well. Thanks. So I want to say another thing because people who listen to this maybe don't know.
SPEAKER_00In Italy, I feel you're kind of a legendary engineer, not just because you created some of the most important open source software in the world used by a lot of people, but also because you did all of that mostly from your hometown in Sicily, which is not exactly Silicon Valley. Am I right?
SPEAKER_01Absolutely. But if we think at it, basically, even when things are done in Berlin, London or Silicon Valley, at the end there is some engineer in some room in front of some keyboard. So basically in some way, informational technology is interesting compared to other industries because of that. I must say that this is changing because AI is the first things
in our industry,
SPEAKER_01which changed this paradigm in some way, because after all, without a lot of money for GPUs, it's not possible. anymore to compete with certain environments, big companies and stuff.
SPEAKER_00Yeah, I agree. But so we always say that technology for software engineers is democratic, so you can have an impact from wherever you are. But then it's also true that many of us sometimes think that to have more opportunities, you have to move to like big centers where the most innovation happens. And I'm sure that you've made a lot of incredibly popular software and people will have tried to take you away from Sicily.
So I was wondering, has the decision of staying there for you always come easily? So have you decided to prioritize lifestyle, family and how was the process?
SPEAKER_00Because I think it's very interesting.
SPEAKER_01Uh, I think that to be a successful software engineer, you can be everywhere, but to, to make a lot of money, it is much better to stay in the center of things. So basically it's not much like, uh, uh, okay. There are people that, uh, that have this, uh, idea that, uh, to do great engineering, I have to stay in, to be in Google or in Microsoft. I don't think like that. So for me, it was not a problem of performance. but how many,
SPEAKER_01how many money you can, can make because in Sicily, of course, this is, this is much more limited. For example, in my case, I decided to be just, you know, a player of the Redis company ecosystem and not, you know, the founder of the company for, of course, reduced my ability to, you know, to accumulate wealth and money. But for me, this is what this was not a big priority because I earned
enough money to be safer
SPEAKER_01to don't have, you know, to don't look at the tax in the supermarket about the prices and things that they, and that's enough. I believe that when you are, I was very poor at some point in my life. like I struggled in order to pay for my house and this is terrible because you cannot sleep at night and this is bad. Then when you reach the point that you that you earn something like 4 000 euros per month already all this is gone and you are okay and then
everything that comes
SPEAKER_01after that contributes in a very small part to your well-being. You know There are people that are happy to have a Ferrari maybe, or to have a very fashionable clothes, but normally people in IT are not like that. very unlikely to be very very happy because on the other side I when I was traveling more often to the United States I met with many
people in their 20s that because they become rich too fast they experience the lack of purpose and know what
SPEAKER_01and know what stage of life. So I think it was very easy for me to decide to stay here because the center of my relationships was here. So I had no reasons to go away. Also this thing that I'm saying now, it's now a bit more obvious because I believe basically the Europe to be more or less at the highest moment of civilization in the world.
We have a compromise between capitalism, between socialism, between not letting people
SPEAKER_01two behind. Now it's a bit more clear but I always thought so later. For example for me it was unacceptable to be an US citizen because there is that penalty there and I don't think that it's possible to create a sane democracy with weapons, that penalty. And now we are saying that there are more troubles than that. So for me, it was also a political decision to stay here. However, the smart listener to this podcast may detect that often
the money that I earn comes from United States or from Israel and so forth.
SPEAKER_01So yeah, it's easy to talk like that. In this regard I understand that there is some dissonance in my reasoning, but still it is different to be under the social security of Europe or expose yourself to another context which is more a bit more far west. Yeah, I totally agree with all the points you make, which I think are very wise and all valid.
SPEAKER_00I think, I mean, if I think of my own journey, I've been a VC backed startup founders or like mad ambition for almost like 10 years. And then I quit and now I'm like a full-time newsletter writer. And my mindset shifted completely. And now I have a lifestyle that I really enjoy with my family, with my wife. And I'm incredibly protective of that. And I realized how much, as you said, you know, more money brings diminishing returns and only a small slice of
happiness and how
SPEAKER_00things you enjoy in life versus being close to your family, spending time the way you like. I really appreciate that, but I have to say that it took quite some time for my mindset to frame around this because when I was younger, I don't think it was obvious this to me at all.
SPEAKER_01Yeah, because I believe the main narrative is completely opposite. So you are continuously advertised to do exactly the contrary of that.
SPEAKER_00Yes. Especially software engineers, 1 billion companies and so on and so forth. I agree. So I wanted to talk about open source because of course you have created some incredibly popular open source software. And we often hear that open source has won because like 99% of software that runs on servers is open source, but many times maintainers even of popular software struggle to make a living. So the open source business model is still
SPEAKER_00unclear in some cases. So first of all, I wanted to ask you, what does an open source project need in 2025 to be successful for you? What are the ingredients?
SPEAKER_01I don't think that this changed much compared to the past. But now there are a few things that make simplicity more, more interesting than before, because in the past the problem was if it works well or if it doesn't work very well. And there was of course also free complexity, complexity without, that was not proportional to the problem to solve. But now this problem is so widespread that for example,
SPEAKER_01something like UV, the new package manager for Python is very easily penetrating a crowded environment just because it's simpler, more lean, more fast and so forth. So there is a need for simplicity in general everywhere. So one very easy thing to do is to make things very accessible. like you bump in the GitHub project page and you immediately after four lines of read me understand what the project is because today is full of
companies web pages and GitHub projects that you after five minutes cannot understand what what it's about that's very very strange so everything must be easy the communication super simple and everything must be must be like that also it is very important to have
SPEAKER_01since the start in mind a potential user base. It is very important that what you do is useful for you, but it not must be something that is useful just for you. You have to identify something which is the intersection between something that you want and that you can see many others want. And from this point of view, the software developer usually is oddly minded compared to the general population. even of other software developers,
SPEAKER_01because there are people that are even more peculiar than others, and the risk is to transfer your very specific needs that nobody has to the other population. Instead, to identify something that if it's in the system programming space, something that you can see everybody's going to need is very important. Another, another thing that, uh, in my opinion, makes a big difference is to identify some project where good
engineering can make
SPEAKER_01the difference. So basically if, if you put yourself, uh, uh, just an example for right now, inference systems are very important for AI, like Ollama or there are other competing, um, competing inference systems. After all, even if there is a lot going inside, if you end doing something that uses Lama.C++ as a backend, it's very hard to distinguish yourself from the other engine.
SPEAKER_01So this is a space where if you don't have something to add, you are probably going to be one among the other. So it is very important to put yourself in a space where if you are good, you can show you are good. doing very good engineering. So this mix of things are, I believe, help to create, you know, then there is a lot of luck, but the luck to catch you needs to be somewhat, you have to be in the right shape for the luck to
SPEAKER_00Yeah. Yeah. I agree. You have to create your own luck. And I guess, um, in order to, about the last thing you said about finding a space where, um, good engineering makes a difference. I guess you have to be like an expert in that kind of, uh, domain, a technical expert to be able to recognize that there is the technical opportunity to make things better and possibly easier as per your first point. Right? So pick something that you know about basically.
Yeah, I believe that too, but not to the point that you have to be near the problem space.
SPEAKER_01But I mean, if you want to do, for example, when I started to make Redis, I was more expert about programming languages and interpreters. then database, but because they share some similarity, you can fill the gap or another example. I almost finished my implementation for Redis of vector similarity. While I am inside AI for a long time,
SPEAKER_01I was not an expert of data structure about vector similarity, but I studied for like one month nonstop. I recovered the gap and then I could apply all the good engineering that I had learned in other problems in this specific problem. So in my opinion, more than trying to be super vertical about, about a given problem space, it is important to be super strong about general problem solving and design abilities.
SPEAKER_00Yeah, it's true. I think it's true. It's more and more true in general for software engineering moving forward other than open source projects. So being good journalist is probably a skill that is gaining value, if you ask me.
SPEAKER_01especially now with AI. AI often is very good at filling very specific gaps that you have, like opening a book, a mathematical book. I don't remember, for example, an approximation of a given function. And I go to the book to read about the polynomial that I need to use. Okay. Right now, AI is not as strong about the big picture. So to be generalists is become, then I know it's a very fast moving space, maybe in one year, AI would be also a good generalist.
SPEAKER_01So let's say in the start of 2025, that could be a plan.
SPEAKER_00Yes.
SPEAKER_01Yes, I agree.
SPEAKER_00And then when it comes, let's say you have created a popular open source project that is used by a lot of people. When it comes to trying to either make a living or just make some money out of that, I mean, you have seen it all from working on open source software 100% by yourself, to getting sponsored, to working in a commercial company that supports the open source development. What do you think are the best models to make an open source project sustainable?
SPEAKER_01It depends on the scale you want to be. A very good plan could be to just don't create a very, very big company that may become an unicorn and do the IPO or something like that. But one can say, I want to create a company of 10 people to make just 10 millions every year, you know, to sustain the company and have a good income. In this case, you can think about professional services and services, basically.
Instead, if you want to create a very big company, you have to think about products.
SPEAKER_01And this changes what you are going to do. For example, if you want to make a small company, probably it makes sense to use a very permissive license like the BSD as I did in the past. But now if you want instead to create a business that becomes very big, it's better to pick AGPL license and create a situation where if your software becomes very widespread, you make a cloud service providers paying for a license that is compatible with the
SPEAKER_01software as a service. That right now, the best thing to do is just release AGPL. I don't believe much on the open core approach where most of the value is closed. because if there is too much value closed, the users don't really have a compelling reason to use. For example, in this release that I'm going to make in one month from now, vector sets, even the advanced stuff, I believe will be all released inside the Redis,
SPEAKER_01which is in GitHub basically. But instead, if you want to create just a service company, which can earn just a couple of millions Every month you can go perhaps with a BSD and just be the core of the expertise. And so there are different models depending on what you want to make.
SPEAKER_00Yeah. It's very interesting. So if I, if I get this right, you're saying that you can start kind of small. That is professional services is one of the lowest hanging fruit probably, but they scale harder than I don't know if you want to make a SaaS that makes 1 billion, but a SaaS is also harder to create and less proven and more likely to be unsuccessful than just providing services. And maybe you can start one way and then figure out what you can do.
SPEAKER_01Yeah. One thing which could be an interesting part is to start directly with the goal of not growing too much. Because if you do a service company and you do not grow too much, you are in a decent situation. But if you do a service company that grows too much, then if there is a contraction of the business, you have to... It's a very fragile situation. So it's better to pick as soon as possible if you want to create as much.
SPEAKER_01After all, often what happens is that you create a very big business and then anyway, after the rounds of VCs and stuff like that, you own a very small slice. So an option is to do something smaller that you own completely.
SPEAKER_00Yeah. Yeah. Makes sense. So when I asked you what makes a project successful, the first thing that you replied with is simplicity. And I remember last month or so, you wrote a blog post called We Are Destroying Software. Uh, so a positive outlook on the industry where you criticize, uh, among other things, a lot of this complexity, like build systems in chains of dependencies,
SPEAKER_00And when I read it, it echoed also other things that I heard from other great OpenSUSE creators, like I interviewed last year, David Hennemeyer Hanson, who of course said that a lot of OpenSUSE is too complicated in part because it comes from big tech and tech stacks are bloated and many of these things. Do you think, especially web technology, but not only that, like infrastructure, front-end development is too bloated and complicated today than it needs to be?
Yeah, it's terrible because big entities like Google cannot design good things. they did a very terrible job with the HTTP quick and the new protocols for small gains.
SPEAKER_01There are huge complexity gains that make the web less accessible, less that's comfortable with Kubernetes. You use it if you really need to, otherwise people don't want to learn this thing. And with the Angular, everything, basically Google is really the, a very good example of bad design culture in all, basically all the kind of declinations. And I believe that...
If I can stop you here, why do you think this happens?
SPEAKER_00Because of course Google, and I think it's the same with other companies, they are full of very brilliant people. So there has to be something about, I don't know, the way decisions are made or the things that happen when you get some scale or the set of incentives. What do you think?
SPEAKER_01I believe that in the specific case of Google, the problem is exactly that it's full of brilliant people, but they are the PhD engineering type and if you start from the point of view that software is an engineering problem, You end exactly doing quick. You measure and you say, I can go 5% faster if I glue together these two protocols and then you'd make it and you can actually see that it's 3%,
SPEAKER_015% faster. And you say, this is a success because the point of view is completely broken since the start. So you really believe you are making progress because you don't have basically good design taste and understand the, Do you don't put value on simplicity and stuff? And in Google, the problem was that it was full of this kind of people at the same time. And likewise, they operate at a scale, which is also very different than other people. And then they developed this kind of process.
And another thing that was summed to this initial problem was that at some point
SPEAKER_01somebody thought that in order to compensate all the open source that single individuals write for free, you can take a big project company driven made in this huge way. you drop it and you are like paying the open source community for what they did which is not the case you basically put online some complex thing that you are in some way imposing making it a standard because you have the power to to do that
SPEAKER_01yeah so you are not doing anything good for basically us. But so one thing that is very important in my opinion to remark is that in general, if you want to pay software developers that do work on the open source, you have to pay such software developers. and not to release some company open source software in order to compensate them because their life is not going to improve, not even 0.1% because of what you released.
SPEAKER_00Yeah. Yeah. So when sometimes we hear about giving back by these companies, it's not a real give back.
SPEAKER_01I think so because the web especially is a very, very interesting case because there is not even this engineering point of view of like some direction increment of performance or something like that. The web became a framework after framework, slower, more complicated, and it's the same web form button and listing list.
SPEAKER_01So you say 20 years ago was the same. It was much simpler stack. It was faster with slower computers. So what you accomplished this was, but then if you really focus on what happened, you understand that the solution of that is written in the book, The Mythical Man Mond. simply software developers at that point had split between back-end and front-end
SPEAKER_01because of company needs. So at that point, since everything was split, the initial idea that was very sounding of HTML5 semantic web, where you basically generate server-side HTML, very simple and then with your CSS do the styling and you just add the tiny bit of JavaScript for the dynamic part. That no longer works when you have two populations, separated, separated population of developers. You have to make front end that makes just API calls to the back end.
Like if the two things don't talk because they don't talk in the organization basically,
SPEAKER_01They are two different groups. And then you basically recreate everything that was already done in the software stack on the front end side. And then you have also the problem that now that we did this and the front end is much more complicated than in the past. What happens if my software developer goes in another company and I receive a new one? I have to standardize everything. So basically I have to create a framework so that everybody works in the same,
in the same way.
SPEAKER_01And this is how we get to, to, to this situation basically.
SPEAKER_00Yeah. So I love that the original scene is like layering and splitting too much the skills between back-end, front-end, infra and all this kind of stuff. But do you think this, especially when it comes to open source that comes from big companies, do you think this is an unescapable problem because big companies have big resonance and the power to make their own projects popular and successful and they create projects for themselves.
SPEAKER_00And so they are too complicated for the rest of us. And so we are stuck in this loop of, of excessive complexity or this, there is a way out.
SPEAKER_01I think that, uh, many software developers realize that there are other ways to do things, but they don't want and can't. because, uh, in the job market, the skill request is about this kind of technologies and they don't want to go out. of this set of technologies. So basically it's not an understanding problem. Sure, there are many people that just follow what the big fish will do, but many others.
SPEAKER_01But what I mean is that even if we create a trend, a new trend about doing web in a more simple way, many software developers cannot afford to do things in that way because they want to basically be hired. However, for startups, it's different. The startup that does this kind of development will find to have an advantage compared to the other shops that instead use a blotted technologies. So for startups, this is a very, very, very different.
However, it's the only case where this technology smartness can be leveraged in some way. So I believe it will be very hard, but slow, maybe, you know, step by step, it will
SPEAKER_01form some consensus about the need. Also because, for example, I remember at Twitter, at some point, they realized that the infrastructure, before Musk, this was before Musk when I regularly visited them every year or something like that in San Francisco, they realized that the backend was very fast, but the site was slow because of the slowness, all the latency accumulated in the front end side.
So basically from, from then is creating problems for companies right now. So it is possible that slowly more and more companies will, will need, will, will need to,
SPEAKER_01Also, another thing that may make this change is if software will be more and more developed through AI, to have extremely complicated code bases to expose in the context of the LLM, of the AI, is not an advantage. In general, simple code bases have advantages to be AI developed. So who knows? In the short run, I don't see any simplification coming, but maybe in the future.
SPEAKER_00Yeah. Another thing that I'm noticing, speaking of AI, is that all these layering in engineering roles, like backend engineers, frontend engineers, it's partly reverting in favor of like more full stack engineers, product engineers, as they call it now. because it's kind of easier now. I mean, AI gives you this kind of universal basic proficiency at all the layers of the stack. So it's more beneficial to have engineers who can own things
from top to bottom and
SPEAKER_00just push a feature without the cost of coordination with all others. So this is something that I'm hopeful about that we can compress this layering and If we end up with full stack engineers again, then the set of incentives may be changes in favor of simpler stacks. I don't know.
SPEAKER_01Absolutely. Also AI has the advantage of making existing code bases more understandable for newcomers. So also maybe companies will relax a bit about letting you do things in your way. Because anyway, it's harder and harder to be in the situation like in the past, like the new camera arriving and saying, oh, what's this? It's out of the standard.
SPEAKER_00Yeah, yeah. No, I agree. So, I mean, things are happening very fast. So we'll see what happens. And I wanted to ask you more about AI because over the past few months, you started publishing more videos on your YouTube channel, which I enjoy a lot. So I encourage everyone to check out. Thank you. Thanks. Yeah. Yes. So check out Salvatore channel on YouTube and you discuss many AI developments about which anyway, you've also written a novel and we'll get there. But I wanted to ask you, how do you personally use AI for coding?
Because I ask this to many people and everyone gives a different answer from simply using cursor to using tools in the terminal to using AI just for rubber ducking.
SPEAKER_00I have so many responses. So what's your take?
SPEAKER_01Okay. To start, I will say that my use of AI for coding is massive. Like it's not something that I do once in a while because I have a specific need. I every day hit Claude Sonnet multiple times while coding. Basically the way I use AI changes a lot with the language and with what I'm doing. I use only the web interface of cloud. I don't use cursor.
So because I want to split the experience of whenever I'm writing code and when I'm
SPEAKER_01writing code with AI, I want this to experience to become completely separated because when I am in the flow and I'm coding, I don't want any. nor other people, nor the LLM to touch anything that I'm doing.
SPEAKER_00Not even the completions, uh, to complete nothing. Okay.
SPEAKER_01Zero. I don't think that there is much value in completing things because the kind of coding that I do is very dense. There is no boilerplate in C code that I write. So for example, C programming, vector sets, I brought all the code myself. Then when I have some doubt about potential things that I can do. I use pbcopy in the terminal to put the code in the copy buffer and I paste it in the cloud.
SPEAKER_01And they say, I have this problem here. I believe that the best solution in order to overcome this is what you think about it. There are mathematical tricks that I don't know in order to make this faster because I believe the optimal strategy is that one. So I use it like a colleague in the coffee in front of the coffee machine. And I do this back and forth with cloud. when I'm writing systems in system software, I can write C code with, with Claude, not for Redis, not for system critical things because otherwise I have to
review every line of
SPEAKER_01code because it can make errors. Instead, what I do a lot is the contrary. I finish a function or a piece of code for Redis and put it in the cloud and say, do a very precise code review. And especially focusing a list of areas where I believe there is the greater potential for bugs. After that, I rerun the prompt again and say, make an idea about all the things that could fail here,
write a description of what are the more fragile pieces of fraud in this thing,
SPEAKER_01and then do an analysis to see if that's true. So I restate the things in many ways because sometimes a given prompt will catch things that other prompts are not able to catch. And this is the way I use for C coding. So code reviews and colleague, design colleague.
SPEAKER_00Yes, per programming with AI.
SPEAKER_01Exactly. Instead for Python code, for example, for the tests of Redis vector sets, I just let the AI do whatever it wants from the point of view of writing the code, but I write in the prompt a very precise specification. of what the test should do, the way it should be implemented. And then every time I write a new test in Python, I put in the context window three, tests already written and checked by myself,
SPEAKER_01which are representative of how Claude already did it, but after very strict guidance. And I say, take this as a reference and write a new test that tests that and that. Another thing that I do, which I understand many developers don't do, is to put a lot of context. inside the AI. For example, if I want the AI to write a test about vector sets, I don't put in the context window the documentation,
SPEAKER_01but I put the source code of the module because I want it to see everything that I have in mind about this kind of test. So sometimes I can say this is the source code of the implementation and you have to write a test for this high level feature, thinking about how it is implemented so that the integration test has the maximum probability of hitting potential sources of bugs. So that's the usage that I have for programming.
SPEAKER_01And then also for documentation, I tend to write documentation all by myself, but I at this point use it for templating. For example, after I wrote 50% of the documentation and the style is clear, if I have to document a new thing, I put all the readme inside the cloud and delete write the documentation about that in the style of, and I put the C code as a reference. Then I edit it as a template after it makes errors about, for example,
SPEAKER_01said, doesn't stress what should be stressed as redundant information that I want to remove. So it is absolutely needed to edit the output, even in the documentation to edit because the recommendation must be minimal, just what matters and not what is obvious. And LLM sometimes state what is obvious. So many, many use cases.
SPEAKER_00I think your use cases are very interesting because you write code, as you said, that is very dense and complex, technically wise. This is exactly one of those cases where many people say that AI doesn't help much. Like AI is better at, you know, scaffolding or boiler plating or simple code, you know, front end structures and stuff like that. So do you find that even for your use case, like, you said you write vector sets in C, which is not exactly the simplest thing in the world,
SPEAKER_00but you ask AI for improvements and it apparently helps. So does it help your productivity a lot with respect to when you, you didn't have it? I believe I am more or less five times faster than I was before AI when writing
SPEAKER_01system code in C.
SPEAKER_00Five times. I can create in two months what normally could take like one year of work or six
SPEAKER_01months at least. So the multiplicator is brutal because I can do things that otherwise I would never do because they would be too time consuming. For example, for vector sets, I did some optimizations that I didn't know very well how to do because of certain mathematical concepts that, for example, at some point I realized that initially I was using a very complex quantization technique,
SPEAKER_01which was not like the one that I'm using now. And with this quantization technique, I still believe, I still thought that there was a way to still do the multiplication in the integer space and then adjust for the scaling of the quantization. I had this intuition. I understand the mathematical at a decent level, but this specific thing was complicated. I didn't know how to compose something.
SPEAKER_01Yeah. And Claude immediately did it. However, for this kind of help, you have to be very good at prompting. I don't believe everybody is the same at using LLMs. So sometimes people believe that if the AI doesn't work well enough, it's because AI is broken. But sometimes you have to understand very well how to, when you write a prompt, you can insert a lot of design clues or stuff like that, that then will basically move the generation in the right among
many local minimas.
SPEAKER_01you can move it in the right direction to really help about that. I am 100% sure that AI can routinely find bugs before of users in complex C projects.
SPEAKER_00I love that you specify that some people don't use it correctly because Uh, that would have been my next question that is, because I also speak with people and there are some brilliant engineers who tell me, nah, I mean, I impact on my productivity is more like 10 to 20%, right? And there are also many like industry reports pointing at that kind of, uh, percentage of benefits. So, I would have asked you, where's the gap? I mean, why is this difference between your usage and other people's usage,
SPEAKER_00given that at this point, complexity of the code is not a factor, right? So it's probably, as you said, good prompting, which takes experience and being used to work with AI and figuring out how to use it correctly. I guess that's it.
SPEAKER_01That's possible. It's one factor. And I was, I believe, one of the very first to use AI continuously for software development. For example, the first blog post where I document my findings of programming with AI are from not this Christmas that passed, but the one before. I have a blog post about that. And at this point, it was at least six months that I continuously used, basically from the first version of chat GPT, And then I moved to Claude,
I always use the AI and I saw myself changing a lot the way I started to use the AI
SPEAKER_01after understanding what was the key in order to make it useful. Because initially I didn't get it very well. What was the way to use this system? And I believe another thing is that people under report significantly the help that they get from AI because they don't want to lose their job. Also because... Business bias. Yeah, there is a bias also because of ego. And it's very hard to say, you know, that AI helps so much.
SPEAKER_01But for me, it's really, it's really good. For example, all the time, I think that if I sum all the time, it took me to write the test for vector set, which is a very complicated test with many units. For example, one test that I have is that I wrote to Claude, I wanted a test that basically re-implements vector sets in a much simpler way in Python doing ground truth. just checking with vectors with cosine similarity.
SPEAKER_01And you have to check if the recall is right. And then also re-implement in Python, not checking the implementation that I brought, re-implement it in a simple and in efficient way, but the trivial way. So I can compare that. And all this, maybe it was one hour of prompting in the course of three months. And I didn't write anything about this. And this alone is, I think, believe one month of work.
SPEAKER_00Because especially, I think it matters even like psychologically for work that is usually burdensome or is more like toil, like writing tests, for example, or writing docs. I mean, the stuff that we know we have to do, but we don't exactly love, right? And if AI is able to take some of the effort away from doing that, and leave you more to the creative parts, even not just on pure time basis, but even on your like wellbeing,
SPEAKER_00your motivation, the way you spend your time. I think there's also that benefit, which is not trivial and not everybody considers.
SPEAKER_01Absolutely. But also sometimes you Since you have this help, you jump doing things that otherwise would be like a bit over the top. For example, with vector sets, I wrote the commands which are all threaded, which is not how Redis works. normally Redis is single-threaded. This module is completely works, completely threaded, even if it talks with a single-threaded core, because it was very important for vector sets because vector
similarity is slow.
SPEAKER_01It's not like the other data structures that Redis has. So the same design, decision that made me to employ single core was not no longer valid with vector sets. So I changed my mind for this module and because I found a solution that I thought it was working and I uh, wrote tests and, uh, chatted a lot with Claude Sonnet about this and, uh, about the potential correctness of that to the point that I,
SPEAKER_01I said, okay, this is totally safe. I can do it. Otherwise maybe before this, uh, yeah, all the sign stage. And also I was able to validate a lot of assumptions with it writing a lot of code. So a lot of code that I have had to write in order to validate that certain before implementing, you know, all the things I wanted to validate certain safety things. And the way I did this was very complicated because I took the module
SPEAKER_01source cover already. I needed to be sure that certain things were holding and then, so it's unbelievable. I really don't want to go back to a non-AI coding world.
SPEAKER_00I don't think it's going to happen anytime soon. But I love how much you talk about testing. And I've heard, for example, by somebody else that with AI, some teams, I mean, it's like test driven development is having a silent renaissance. Because you can, with AI, a good workflow is to write good specs and maybe a testing plan and which AI can follow and that keeps in control of things and eventually leads
to better software.
SPEAKER_00So do you start writing software now with AI, with testing already in your minds, already starting with tests or maybe you did that even before AI?
SPEAKER_01No, I am a supporter of the other way, the contrary way to do things of always writing tests after. And the reason is that after I write the implementation, I believe I have a better understanding of the failure modes of the implementation. So after I wrote the implementation, I can write tests which stress the fragile parts.
SPEAKER_00Yeah. Makes sense. Makes very sense. So I wanted to ask you also about another thing about AI, because you published a novel, a science fiction novel, anticipating a lot of things that happened, uh, with AI, like prompt engineering and more, and the novel is called WAP. Uh, you published it in 2022. So I'm promoting everything you did from Redis to the YouTube channel to WAP because I think it's so awesome. And so you wrote this way before AI was cool, before ChatGPT came out.
I think when was it that you started working on WAP, like 2020 or something?
SPEAKER_01Yeah, 2021, I believe, or 2020. I remember that I saw a GPT-2 demo GPT-2 was basically it's the same of GPT-3 from the point of view of the architecture, but it was too small and there was none of the emergent capabilities, but still was quite impressed. And then I had the early access to the GPT-3 a demo, the one that could just complete text.
SPEAKER_00Yes.
SPEAKER_01And I said, okay, this is, uh, this is it going to change everything. I was already shocked in general about the neural networks because in 2003 and 2004, I wrote a neural network, neural network implementation and I did a lot of experiments like with image compression, uh, where my neural network in my computer could find certain techniques that are used
SPEAKER_01in JPEG and stuff like that. And I was really, I was sure since then that it was just a matter of scale because it was too much powerful. But then when I saw GPT-3, I saw that the world like we know it is going to change very soon. And when I was writing WAP, I thought this book is too late at this point.
SPEAKER_01It's too late because in a couple of years it will be everything reality. That's the case. It was the case basically, but in some way I wanted to write the first problem that I had is that I wanted to write because in general for me coding is a style exercise and I wanted to try to try this style exercise in other domains. So writing, but also it was very compelling for me to, because when I was telling everybody about the GPT-2,
SPEAKER_01GPT-3, people were like, Nobody was really interested in it. And I thought I want to write about this thing in a novel.
SPEAKER_00Love this. And I, so I wanted to ask, I'm a newsletter writer. So I, also the, the, the, the thought of writing a novel has crossed my mind many times. So I have this more selfish question that is, how was the experience of writing a novel compared to, to programming or doing maybe a big software project?
SPEAKER_01It's very similar. So if you already are a coder, in my opinion, you are prepared to the artwork and the complexity of the novel because it's full of many small things that are all connected. And since you already know that of other domains, you know, you are prepared because some people remain shocked. They say, oh my God, why I did this?
SPEAKER_01because they never experienced complexity at scale. And it's very, really complicated. It's a lot of work. But in my opinion, if you want to do that, do it because even if, you know, for example, WAP sold, I don't know, 4,000 copies. It's tiny. Even if it's more than the average science fiction book in Italy, It's like 10 ways more, but it's tiny, the number of readers.
But for once, I believe that each of these readers are very important for me.
SPEAKER_00Yes.
SPEAKER_01Each, every single people, because it creates an asynchronous connection between you that were writing and the people that are reading, it's a composition of minds. So for me, it's very, very important. Also because Wopped was lucky of finding a target community, which is basically Italian IT. And because of that, what happened is that Because usually what's bad about books that are not well known
is that one reader
SPEAKER_01is here, one other reader and nobody knows about the book. Instead, the book circulated in a community. So it was possible to make it up. But also for yourself, it will be a really incredible experience. So I suggest doing that because it changed completely the way you read. After that, you read the books.
SPEAKER_00This is so interesting. I mean, this is interesting because many of the things that you said, I kind of experienced them at a small scale with the newsletter, especially when you said it creates a connection with your readers. And it's like, you know what they say that writing is like networking for introverts. because it allows other people to reach out to you because they're like-minded as opposed to you reaching out to them. And I definitely see that with the newsletter and I would love
to do something at
SPEAKER_00scale like that. But I will let you know.
SPEAKER_01Thanks. I will read your book for sure.
SPEAKER_00Thank you. Thank you. You're too kind. So thank you so much, Salvatore. It was a fantastic chat. And so thank you so much for being with us on the show.
SPEAKER_01Thank you, Luca. It was very nice to talk with you and to meet you in person. I hope we will take some coffee sooner or later.
SPEAKER_00Definitely. Definitely. Thank you. Thank you so much for listening. If you found this chat valuable, you can subscribe to the show on YouTube, Apple Podcasts, Spotify or your favorite podcast app. Also, please consider giving us a rating or leaving a review as that really helps other listeners find the show. You can find all past episodes and learn more about the show at refactoring.fm. See you in the next episode.
This is a free preview of a paid episode. To hear more, visit refactoring.fm Listen now: YouTube | Apple | Spotify Todayβs episode is brought to you by: TRM Labs Criminals are scaling with AI. Build the technology that...
This is a free preview of a paid episode. To hear more, visit refactoring.fm Listen now:YouTube | Apple | Spotify - Todayβs episode is brought to you by: TRM Labs Criminals are scaling with AI. Build the technology that...
This is a free preview of a paid episode. To hear more, visit refactoring.fm Listen now:YouTube | Apple | Spotify Todayβs episode is brought to you by: TRM Labs Criminals are scaling with AI. Build the technology that...
This is a free preview of a paid episode. To hear more, visit refactoring.fm Listen now:YouTube | Apple | Spotify Todayβs episode is brought to you by: Notion Learn more about Notionβs Developer Platform today at...
This is a free preview of a paid episode. To hear more, visit refactoring.fm Listen now:YouTube | Apple | Spotify Todayβs episode is brought to you by: Notion Learn more about Notionβs Developer Platform today at...