Learn Python with Talk Python's 270 hours of courses

#459: I Built A Python SaaS with AI Transcript

Recorded on Sunday, Mar 10, 2024.

00:00 We all know that tools like ChatGPT have really empowered developers to tackle bigger problems.

00:06 Are you using Tailwind CSS and need a login page?

00:09 Try asking Chat, what is the HTML for a login page with the login, username, password, and a button in its own section in the center of a page?

00:18 It will literally give you the first pass version of it.

00:22 But how far can we push this?

00:24 Fred Tubirant may have taken it farther than most.

00:28 He built a functioning SaaS product with paying customers by using only ChatGPT and Python.

00:35 It's fascinating to hear his story and see what he's built.

00:38 This is Talk Python to Me, episode 459, recorded February 19th, 2024.

00:44 Are you ready for your host?

00:46 Here he is.

00:47 You're listening to Michael Kennedy on Talk Python to Me.

00:50 Live from Portland, Oregon, and this segment was made with Python.

00:57 Welcome to Talk Python to Me, a weekly podcast on Python.

01:01 This is your host, Michael Kennedy.

01:02 Follow me on Mastodon, where I'm @mkennedy, and follow the podcast using @talkpython, both on Bostodon.org.

01:10 Keep up with the show and listen to over seven years of past episodes at talkpython.fm.

01:15 We've started streaming most of our episodes live on YouTube.

01:19 Subscribe to our YouTube channel over at talkpython.fm/youtube to get notified about upcoming shows and be part of that episode.

01:27 This episode is sponsored by Mailtrap, an email delivery platform that developers love.

01:33 Try for free at Mailtrap.io.

01:36 And it's brought to you by us over at Talk Python Training.

01:40 Did you know that we have over 250 hours of Python courses?

01:43 Yeah, that's right.

01:45 Check them out at talkpython.fm/courses.

01:48 Fred, welcome to Talk Python to Me.

01:52 So great to be here.

01:53 Thank you so much for the invitation.

01:54 Nice to be here.

01:56 It's lovely to have you.

01:57 We're going to have a lot of fun talking about this app that you've built using highly powered by AI and in different ways.

02:07 It's both powered by AI, but also largely built with AI.

02:11 And I think it's going to give people an interesting look into what is possible these days.

02:16 What is possible?

02:17 And the journey of a middle-aged coder or so, maybe.

02:21 That's really an interesting thing to discuss.

02:24 And maybe we could just start a little bit with the introduction about yourself and then talk a bit about that.

02:28 So before we dive into talking about how you use ChatGPT to largely build this app that is a SaaS product service on the internet people subscribe to, which is the dream of many people.

02:42 It's awesome.

02:43 With AI, just tell people a bit about yourself and then I want to talk about this journey.

02:48 It's a long story because I'm turning 50 in June 2024.

02:53 So if you listen to this before June 2024, I will be 49.

02:57 After, I will be 50.

02:59 So, yes, that will be...

03:01 You're a spring chicken.

03:03 I'm older than you, Fred.

03:04 Oh, you're older than me.

03:06 Okay, cool.

03:07 I found someone older than me to talk to.

03:10 Oh, that's fine.

03:11 You can still write code into your 50s.

03:13 Let me tell you.

03:14 The keyboard still works.

03:15 It's amazing.

03:15 And I started when I was 48.

03:17 But maybe we'll get back to this later.

03:19 So originally, my professional journey started as an interpreter, Russian, English to French.

03:26 So I graduated as an interpreter, so in languages.

03:30 And then I started being involved in music.

03:34 I was head of sponsorship for a big music festival in Belgium.

03:37 I had rock venues, live music venues for a few years.

03:41 And then I started being involved in tech as head of product, head of paid acquisition for a few startups.

03:48 I had my own startups.

03:50 I exited one startup in the fintech space in the early 2000s.

03:55 I had a circus for two years.

03:57 That's quite...

03:58 A circus?

03:58 That's quite an interesting story.

04:00 Yes, family circus with four big tents, eight tons of equipment.

04:04 So that was quite a story.

04:07 Was this like Cirque du Soleil or was it with animals or what kind of...

04:11 It was more like, I would say, like Cirque du Soleil, but at a smaller, smaller scale, of course.

04:16 Okay.

04:16 But four tents and circus artists and actors and musicians.

04:22 And that was an original show, an original story.

04:25 I also produced rock bands.

04:28 Maybe I can give a shout out to one of the bands that I love, that I contributed to, the Boxer Rebellion.

04:34 Maybe you heard about them, the Boxer Rebellion.

04:36 Yeah.

04:36 It's a British band based here in London, but with a singer from Nashville, Tennessee, Nathan Nicholson.

04:43 So I was involved in music, in tech, I mean, in all of those things.

04:48 And I think the project that we're going to talk about is kind of a good mix between music, tech and all my passions.

04:56 I was also a radio DJ for you.

04:58 So that's why.

04:58 That's the audio side, right?

05:00 That kind of brings you something together in the music, I suppose, as well.

05:03 Exactly.

05:03 Amazing.

05:03 You know, listening to the story, first of all, what a diverse set of experiences.

05:09 That must have been really fun.

05:10 It's not a career.

05:11 That's the problem.

05:12 Unemployable.

05:13 Yeah, that's.

05:15 But in terms of thinking about products and coding, I know when I experience different areas, I always feel like, oh, this could be way better and that could be way better.

05:25 And why is that so hard?

05:26 Surely we could create some software to fix these things.

05:28 You must have had a lot of ideas about programs you would like to see and stuff you'd like to work on.

05:35 And multiple times, the solution for me was to hire people to do it.

05:39 I had my own startups in the past and I always had a team of, let's say, two to five developers working for me when we were doing that.

05:47 So I kind of understood all the structure, the architecture of the apps, but I'd never really coded myself.

05:56 So I was always relying on other people.

05:59 The difference today is that I spent most of my days coding, which is quite different.

06:04 Yeah. And you said you started coding when you were 48.

06:08 Yes.

06:08 Roughly almost two years ago.

06:11 Yes.

06:12 That's awesome.

06:12 You know, I do hear from a lot of people or see comments like, oh, I think I'm too old to learn this or, oh, you can never, you have to have done this when you were a kid or maybe gotten a degree in college.

06:23 Otherwise you're doomed.

06:24 You know, you surely have an alternative viewpoint on that, given your success.

06:28 I thought it would be like that also for me because I would say I'm quite a perfectionist.

06:34 So if I learn something, I want to achieve something with what I learn.

06:39 And the problem, the issue with code for me for a long time had been that I could go through the basic tutorials, the first lessons, you know, watching some videos or reading some tutorials.

06:53 It was difficult for me to really achieve something meaningful, something that I could really share that could become a product because you always end up doing the same little exercises and little tutorials.

07:05 And that doesn't end up anywhere.

07:07 You learned how to do a loop, but then that doesn't really help you get any closer to an app, right?

07:12 How to do a little to-do list or a little calculator or, you know, something very simple, nothing that would be worth sharing as a product and especially as a paid product.

07:22 So I always thought, OK, if I want to build a SaaS, the only solution for me is to rely on a freelancer or on an agency or on a team of people.

07:32 I was doing it until I discovered it.

07:36 That's a big risk.

07:37 And it's also not that easy to hire a team to build your product when you're still trying to figure out what a product is and all these things, right?

07:45 Even if you hire non-expensive developers, it has still a cost.

07:50 And if you want to, you know, just if you don't want to take too much risk and if you want to test your product to see if you have product market fits, I mean, you don't want to spend $5,000, $10,000, $15,000 on a product.

08:03 It's difficult.

08:04 And the alternative that people are most of the time advocating these days is no code.

08:10 So it's building stuff with, let's say, Bubble, which is pretty popular.

08:16 You've got Retool.

08:17 They've been a sponsor of the show before.

08:19 Retool, obviously.

08:21 That's pretty nice, but mostly for internal apps.

08:24 And also, you can just connect stuff through Zapier, through Make, formerly Integromat.

08:30 You can achieve something, but you don't have the control on the UI.

08:35 You don't really have the control exactly on what's happening behind the scenes.

08:39 And you don't have the flexibility that you have if you really code yourself.

08:44 So if you can really get your hands dirty and code on your own.

08:47 So I use also to be a strong advocate of no code.

08:50 So I'm still using, firstly, Zapier, and then later on, Make.

08:56 But once I discovered Python in August, September 2022, then everything changed for me.

09:05 Because then I could really start doing my own stuff.

09:09 And I started with the back-end stuff, with the back-end scripts, let's say, to create competitive intelligence scripts, things like that.

09:19 And I slowly moved into front-end.

09:21 But first, for a few months, it was mostly local scripts on my computer.

09:27 That's really interesting.

09:27 The low-code, no-code stuff is super powerful.

09:31 I think it does make it possible for people to build apps.

09:35 I have a friend who built a platform a little bit on top of something that's kind of a low-code thing.

09:41 And what they're doing is really impressive.

09:43 And they've got lots of customers, and it's going really well.

09:46 It's a vibrant business.

09:47 It's always you're beholden to whatever that platform does.

09:51 If the platform has downtime, you have downtime.

09:53 If they're changing their feature set in a way that doesn't quite line up with what you're trying to do,

09:59 well, that's too bad because they've changed their direction or whatever.

10:04 And it's really powerful, but it's also a little bit of a risk, right, to be built on top of that.

10:09 A risk, yes.

10:10 But for me, it was even more, I would say, the arbitrage was even more about flexibility.

10:16 So when you code something on your own with Python, JavaScript, as I'm doing now, it's faster in many cases than trying to figure out how to connect, let's say, Airtable with something else.

10:29 And then you've got to think about how the data is structured in Airtable, how the data is to be structured on the other side, and then how to connect them together.

10:39 Sometimes it's easier if you just have a SQLite database or MySQL database.

10:47 And then if you do your own stuff on your own without trying to connect existing SaaS together.

10:55 It was more about flexibility for me, the main reason why I switched almost completely from no code to coding.

11:02 That's really interesting.

11:03 I guess one more that would be worth considering is price.

11:06 Some of these low-code, no-code platforms are really powerful.

11:10 But when you start to look at price for a decent number of users using your app, a lot of them are built for internal use cases.

11:16 They're not really built for having a bunch of multi-tenant style users and so on.

11:21 But also, they can just get real expensive real quick.

11:24 Yes, because they are based usually on the amount of transactions or scenarios or zaps that can run.

11:32 So if you want to transfer one piece of data from one software to another one, it's one transaction.

11:38 If you have, let's say, 10,000 transactions per month for a certain price, then you can run out of transactions pretty quickly.

11:46 And very quickly, you end up paying $25, $30, $40 for a pretty low amount of transactions, API calls basically, between the different SaaS.

11:59 And if you glue them together, one tool connects to another, which connects to another, then you've got to pay for kind of the traffic and the activity in all three.

12:08 It's not just like, well, I'm talking to my database.

12:10 I'm now talking to some other service that's got something going on.

12:14 And the fact is also that there are a few tools that enable you to create a UI user interface for your product.

12:21 But you're limited to the building blocks usually that they offer, even if you can tweak them with some code.

12:26 And it's a bit the same.

12:28 I would say it's really also the same issue that I've experienced on WordPress, let's say.

12:33 The problem is that if you use something like Bubble and you want to build something with it,

12:38 you bring to your app all the mothership, the core of the big app, of Bubble as a whole, when you want to build something on top of a platform like that.

12:48 It's a lot of things that you don't really need for your specific apps, but that have to be there because the whole engine has to run.

12:56 That's usually what you also experience with WordPress, for instance.

13:00 When you have a site on WordPress, maybe sometimes or even most of the time, you don't need that big engine.

13:07 You could work with a static website with a few HTML, CSS, JavaScript pages.

13:12 That would be much lighter.

13:14 There would be less code to activate to have your website up and running.

13:19 So in terms of performance, if you can code your own stuff, I think it's also a good reason to choose coding versus no code if you can do it.

13:29 Totally agree.

13:29 Price, performance, control, all those things.

13:33 That said, you do have to understand more about the world.

13:37 Like one thing we were coordinating around is just like understanding web app architecture.

13:43 I don't know how you feel about it, but I feel like a lot of the guidance that is out there is too intense.

13:49 There's too many moving parts.

13:51 Everyone thinks you need to have some kind of background worker service like Celery, and you need a caching layer,

13:59 and you need this and you need that.

14:00 And it just starts to be like, whoa, this is like running Netflix.

14:05 You know what I mean?

14:06 Whereas a lot of times what you need is a back end, a front end and some kind of data store.

14:11 And that's it.

14:12 And that data store, you mentioned it before, the data store can be in the early days could be SQLite,

14:17 which doesn't require another server or another thing to maintain and connect and secure.

14:22 And it can just be a file that you back up.

14:25 Exactly.

14:26 While you're proving out the idea, right?

14:28 So maybe you're coming from a place where you weren't a DevOps expert.

14:32 You know, like how did this transition go for you?

14:35 When I started developing an app, for some reason, I came across Flask as a solution for Python.

14:43 So I started developing the app on Flask.

14:47 And what I like about Flask is that if you compare it, let's say you use Flask,

14:54 and then for the pages, you use HTML, CSS and Vanilla JavaScript.

14:58 What I like is that you can deploy an app which comes from a single folder and you've got everything there,

15:04 your main Flask file and then all the, let's say the sub files in Python with all the business logic

15:12 that you can isolate in one file or another.

15:15 It's one project.

15:16 And then you deploy the project to GitHub.

15:18 And then let's say you connect GitHub to Railway.

15:21 I'm using Railway for my deployment.

15:24 So you connect GitHub to Railway.

15:26 And then once you update your code in PyCharm or in Visual Studio, then you have the automatic deployment to Railway.

15:36 But it's one project.

15:37 If you want to decouple completely the backend from the front end, let's say you work with something like Next.js, for instance,

15:45 and then you want to have a backend in something else, then you've got to have multiple instances and connect them together.

15:52 It becomes more complicated.

15:54 But if you want to create something simple, you can keep it simple with one single Flask web app.

16:01 And that's what I've been doing so far.

16:03 Most of the iJingle maker that I built, that I've been building since September 23,

16:09 is a Flask web app.

16:11 So it's one project, one big project.

16:13 It's one project.

16:14 It's interesting that you mentioned, Cilary, a few moments ago, because I'm about to ship a new app,

16:20 which is coming in the next two weeks or three weeks, I think.

16:24 And that's the first time after almost 18 months of development that I've considered using something like that

16:32 because I needed it for performance reasons to process something.

16:37 Something you want to start off in the background and get back and just let it be done later, right?

16:42 Yeah.

16:42 And it was not that easy.

16:44 We had a discussion with someone who is amazing on the Discord of Railway two or three days ago

16:51 because if you're deploying things on Railway, you would usually use, that's what they advise you to do as on Heroku,

17:01 a proc file.

17:01 And the proc file, you've got the start commands that will start your project.

17:07 But on Heroku, which is a competitor of Railway, you can start both the web app and the worker in the same file.

17:16 But you can't do that on Railway.

17:18 You've got theoretically to have two different projects, which kind of defeats the purpose.

17:22 You kind of deploy them both, right?

17:24 But then you get to more coordination.

17:27 Yeah.

17:27 But fortunately, and there is a discussion on the Discord between me and one of their guys there,

17:32 they had a way to create a custom JSON for me, which managed to start both the web app and the worker

17:41 in the same deployment.

17:43 But I had to fight, to be honest with you, for like four or five hours to find a solution.

17:49 Because sometimes the problem, and that's the issue that I've seen a lot,

17:53 is that traditional developers, like professional developers, not people like me, not random guys like me,

17:59 usually they assume that the people that they're supposed to explain things to

18:04 know much more than what they do.

18:07 And so they just write a few instructions, you know, like cryptic instructions

18:13 that nobody really understands.

18:15 And they would assume that everyone reading those instructions would understand

18:20 what they have to do to, let's say, use this worker service, for instance.

18:24 But that's not the case.

18:26 I totally agree.

18:28 This portion of Talk Python to Me is brought to you by Mailtrap, an email delivery platform that developers love.

18:35 An email sending solution with industry-best analytics, SMTP and email APIs,

18:41 SDKs for major programming languages, and 24-7 human support.

18:47 Try for free at mailtrap.io.

18:51 You know, it's kind of the curse of knowledge.

18:53 Like once you know all of these things, it's really hard to remember.

18:57 Oh, yeah.

18:58 So then you just, oh, just run that in Docker and then link it and set up a network over there.

19:03 You're like, wait a minute.

19:04 Yeah.

19:04 I don't know how to do that.

19:05 I'm just trying to run my Python app.

19:07 Like you're bringing a whole new thing in that you think makes it sound easy

19:11 and it makes it sound real hard to me.

19:12 I totally agree this is a problem.

19:14 So many moving pieces.

19:15 When you start coding, I mean, obviously you know that because you've been in this game

19:21 for much longer than me.

19:23 But once you start coding, there are so many little things that you have to know to make this thing work.

19:28 So it starts with how to just configure GitHub and connect it to your...

19:34 How do you use Git?

19:35 If you have a Git conflict, you might be like, well, this is done.

19:38 I can't do anything else anymore.

19:39 It's broken.

19:40 Yeah.

19:41 I mean, it's really overwhelming when you're new, right?

19:43 There's a lot.

19:44 And that's where AI today helps you because in most cases, if you know how to talk with the AI,

19:52 you will get answers that are much easier to understand that what you would have

19:57 on Stack Overflow, for instance.

19:58 I agree.

19:59 It's very interesting how helpful it is.

20:00 I think it's a good time to about jump into that.

20:02 But before we do, tell people about Railway a bit.

20:04 How does this work?

20:05 I haven't used Railway before.

20:07 It's a platform where you can deploy your apps, basically.

20:11 It connects to your GitHub account.

20:17 It's not only, I mean, you have on Railway not only a possibility to deploy your Flask app

20:22 or other types of apps also, but they also offer all the database aspects.

20:29 So you can spin a Redis database.

20:33 You can have a MySQL database.

20:35 I think they also have Mongo.

20:37 I mean, they have most of the formats that you can expect.

20:40 And the great thing is that everything is on the same platform.

20:45 Let's say that I've got another project I'm involved with a developer, with a real developer,

20:50 hi to Alex, if he listens to this podcast, a professional developer.

20:54 For that project, for instance, we have an app on Heroku.

20:58 We have a database on MongoDB Atlas.

21:02 And we have the files uploaded to S3, to Amazon S3, for the file storage.

21:12 On Railway, you can, at least it's what I do, you can have, at the same time,

21:16 the deployment of the app, which replaces Heroku.

21:19 And you can have the database also together.

21:22 And the cool thing is that they are, I would say, even physically at the same location.

21:27 So in terms of performance, it's pretty easy to handle.

21:31 And it's very user-friendly.

21:32 I mean, very, very easy to use.

21:35 From what I saw, even easier to understand than Heroku.

21:39 And I tried also some things like Vercel, or I use for some project also,

21:46 but that's more for static website, Netlify.

21:48 But for this time...

21:50 Netlify is fantastic for static.

21:51 For static, Netlify is just amazing.

21:54 And just the one where you can just drag and drop a project, for instance,

21:57 for a static website.

21:58 So easy.

21:59 But for a more multi-tenant, dynamic, you know, web app, like the iJingle Maker,

22:04 Railway was really cool.

22:06 And as you can see from the presentation, it's very user-friendly.

22:10 It definitely is.

22:11 And the pricing is actually really decent.

22:14 They have a free trial and then $5 a month.

22:17 Yeah.

22:17 But that gets you 8 gigs of RAM and 8 CPUs per service.

22:21 That is really good.

22:22 I started it on the OB plan.

22:24 And I think that today, just to give you an idea, with roughly 500 users

22:32 coming to the app per day and, you know, a lot of them using the product,

22:37 I pay for that roughly $15 a month.

22:41 Incredible.

22:42 For both the app deployment and the database, which is in MySQL for RIDI Jingle Maker.

22:49 That's pretty impressive.

22:50 Good one to know about.

22:52 This is cool.

22:52 Yes, nice one.

22:53 They have good Python support.

22:55 Yes, yes.

22:55 Very good.

22:56 And they have, as I said, like most people do today, a Discord server monitored also by volunteers.

23:03 And there was a guy the other day, I didn't even know he was not part of the official team

23:08 of Railway and it really helped me.

23:09 He wrote some code for me to make this thing work with Celery.

23:13 So it was really, really amazing.

23:16 And it was on a Sunday in the evening.

23:18 So really nice.

23:20 Yeah, that's amazing.

23:20 One thing I just want to give a shout out to that I came across recently

23:23 that's interesting is Coolify.

23:25 Coolify.

23:26 Which is, it's self-hosted Heroku Netlify Vercel alternative and you just get pushed to it.

23:33 I don't know if it's better than this though because you've got to have a decent server

23:38 to run it on and you've got to run the Docker stuff and whatnot to sort of do it.

23:42 But yeah, anyway, speaking of interesting deployments.

23:45 Yeah, you're going to manage also because the other day, I think it was 10 days ago,

23:49 there was a DDoS attack, I think, against Railway for the European part of their network.

23:56 But they were very quick jumping on it and managing all of that and doing all the mitigation

24:03 against it.

24:03 If you run your own service, then you've got to take care of all of that

24:07 on your own, all the security and all of that.

24:10 There's benefits, but there's also drawbacks there.

24:12 All right, let's talk about I think the right way to start talking about

24:17 this, how you're using AI and the journey you went through.

24:20 I mean, we've talked a lot about foundations already, but let's talk about your app.

24:24 You mentioned a couple of times AI Jingle Maker.

24:26 Tell people what it does.

24:28 It's a web app that you can find on AI Jingle Maker dot com.

24:32 And if you enter the app, you can create your own sweepers, radio jingles,

24:38 podcast intros, audio promos, as if you were playing with Lego bricks, I would say.

24:45 It's not the usual to experience.

24:48 Like, if you'll be using things like GarageBand or FL Studio or Pro Tools

24:54 to edit your audio, you can imagine those waves that you've got to move around

25:00 to create your jingles or your sweepers.

25:03 If you're using, for instance, the open source Audacity software also on your computer,

25:08 you can do that.

25:09 But still, you've got to know how to move these things around and how to play

25:15 with the volume, the fade in, the fade out, the reverb, the chorus, the flanger,

25:20 I mean, all the effects.

25:21 And I mean, it's not that easy for many people.

25:24 And so I thought that I could build something that made it as easy as pressing

25:30 on a few buttons.

25:31 that's the idea of the product.

25:34 So the way you use it when you enter the product, you've got four different parts.

25:41 You've got the intro, the background, the outro, and the voiceover, which is on top

25:46 of the background.

25:47 And the voiceover, you've got, now you've got three different options.

25:51 You've got the possibility to record your own voice.

25:54 So I rebuilt a voice recorder, an online voice recorder, where you can quickly record

26:00 your voice, add a few effects, and then, boom, use that as your voiceover.

26:04 You can also upload an existing recording that you have on your computer.

26:08 So if you've got something that you recorded with your, with FL Studio or something else,

26:13 you can upload it and use it as a voiceover.

26:15 Or you can use AI.

26:17 So I'm connected to a bunch of text-to-speech APIs.

26:21 So I didn't develop the models myself.

26:24 I'm not someone smart enough to develop a foundational model, but I'm connected

26:28 to the APIs.

26:30 and you can pick one of the voices.

26:32 You can write your text, generate the voiceover, and once you have the voiceover,

26:37 you just select it.

26:38 And when you have the voiceover, you choose a background behind it.

26:42 So let's say groovy music, house music, rock music, romantic music, whatever.

26:47 You've got some pre-made sounds in the app.

26:51 You choose an intro, an outro, and then you press on generate jingle.

26:56 and in five seconds, you've got the jingle.

26:57 That's basically, that's basically the idea.

27:00 I'll put in the jingle so people will know exactly what this sounds.

27:03 Yeah, I'll put it in right now.

27:05 Party time!

27:07 This is Martin Superstar, your number one favorite DJ in New York City.

27:14 It's really cool and it's something that I've seen people hire voiceover actors

27:19 on, like Fiverr and stuff like that.

27:22 They'll maybe pay 30 bucks to have somebody do a couple of trials and throw some music

27:27 on top of or something like that, right?

27:29 And I'm a voiceover artist on Fiverr.

27:31 I'm doing that also.

27:32 So I know exactly what it is.

27:35 Let me see if I can automate my job away.

27:37 It was not really the idea of automating completely a job away.

27:40 It was more like the, how can you create something that's self-service and that can meet

27:46 the needs of people, as you said, who don't want to spend 50, 50 bucks or 100 bucks

27:51 for something, but who want to have an easy way to create basic sweepers,

27:57 jingles or some other things.

27:58 And the first target was mostly indie radio stations or small podcasts.

28:06 But then I saw many brands coming, like, I wouldn't say, like, not the big brands,

28:12 but small brands coming, like apparel brands or coffee shops or I had, the other day,

28:19 a bar in Ibiza signing up and paying for credits to generate a promo for the bar

28:26 in Ibiza.

28:27 So, yeah, it's not only radio stations and podcasts, it's also anyone who wants to create

28:34 a promo for their business.

28:36 So that's also one of the services.

28:39 when I started, it was only short sweepers, jingles, radio station, ideas,

28:45 stuff like that.

28:45 But then I added something which is called the promo maker, which you have

28:49 in the jingle maker, where you can create something which is up to 30 seconds long.

28:54 So more like a radio ad.

28:55 That's another.

28:56 And there, you can also use AI.

28:59 It's connected to open AI, to be honest, but you can also use AI to generate the text

29:03 of your promo.

29:04 So just put the name of your business, what you're selling, your service,

29:08 your product.

29:09 Then it will suggest the text.

29:10 Then you choose the voice, generate the AI voice, and then you add the sounds

29:16 and then it's finished.

29:16 So let's say in 20 seconds, you've got a node you add.

29:19 So that's the promise for the promo maker.

29:22 It's a cool app and it's really impressive to look at this and think that

29:26 you built this with less than a year of Python or really any coding experience, right?

29:31 Roughly that amount?

29:33 To put things really in perspective so that people know what they can expect

29:38 if they start their coding journey.

29:41 So I started coding in Python in September, September, October, 2022.

29:47 For a few months, as I said, I was mostly coding scripts on my computer that helped me

29:54 in my daily business because I didn't tell you in the beginning, but most of my activity

29:58 is online marketing.

29:59 It's working for startups and bigger companies also.

30:02 I need scripts for competitive intelligence, for SEO, or for even content production,

30:09 this type of thing.

30:10 So I created a lot of scripts locally on my computer before considering the front-end part.

30:17 Then that's when I discovered Flask.

30:20 That was just before the summer of 2023.

30:22 And yes, the first version of the iJingle maker that I launched, it was just

30:28 on the home page.

30:30 You couldn't basically tweak anything.

30:33 There were just four different jingles and just put the name of your radio station.

30:37 You press on generate and it generated one thing, the same for everyone.

30:41 And I started getting some traction between May 2023 and August.

30:46 And then I said, okay, I'm going to really dive into this project and develop something

30:51 more sophisticated.

30:53 I started working on that on a Monday in September and it was released on the Friday,

31:00 the V2.

31:01 And I got to tell you, your website now looks really nice.

31:05 You've done a lot of good design work on it as well in the last couple of months.

31:09 Yeah, it has evolved because maybe you saw it for the first time when we decided

31:14 to do this podcast and it was a white page.

31:16 The logo was the same, but it was different.

31:19 Originally, it was only in material design.

31:22 I was using material design via the CDN from Google.

31:27 But then I wanted to use Tailwind.

31:30 The new version that you see is using Tailwind so people might recognize

31:35 the Tailwind vibe.

31:37 And I worked quite a lot on this thing that, okay, we said it's audio so people don't see it.

31:43 But if you go on the website, you will see it.

31:45 There is this rotating list of things that you can create with the product.

31:52 it was inspired by some code that I found but I had to retweak it for, you know,

31:56 make it responsive and all of that.

31:57 And you know, also a big shout out to my son who is 18 who is learning Python

32:03 a lot.

32:04 He coded a few things recently.

32:06 He's coding something to play darts at the moment, like to calculate the scores in darts.

32:11 And two months ago, he said to me that your side is nice but it looks ugly.

32:18 so could you make something that looks better?

32:20 I said, yeah, yeah, but you know, I kind of like it.

32:25 I said, no, no, no, no, no, no, no, that.

32:27 It's not the way it should be.

32:29 So do something better.

32:30 I know you can do it.

32:31 So that's why also we've got something which looks better today thanks to my son,

32:37 Maxim.

32:38 It's a huge improvement from where it started.

32:40 So nice work on that.

32:41 Yeah.

32:41 All right, let's talk about some of the techniques that you used here to,

32:45 first of all, what LLM did you use to go on this journey?

32:49 When I started, I wasn't even aware of GitHub Copilot.

32:52 So I started only with ChatGPT.

32:55 I was an early premium user of ChatGPT.

32:59 so I started paying the 20 bucks very, very early for GPT Plus.

33:03 So I started using ChatGPT.

33:05 So basically switching between the ChatGPT UI and the IDE.

33:11 I started using PyCharm.

33:14 So that's the first one I used.

33:15 So I was creating some code in ChatGPT and then jumping to PyCharm, test the code,

33:23 and then if there was a bug, coming back to ChatGPT.

33:25 So this back and forth journey.

33:27 You asked it at the beginning, how do I make a flask app or what did you ask

33:31 it in the beginning?

33:31 Like, how do I make a flask app?

33:33 How do I make a flask app that does audio?

33:36 Like, what did you?

33:38 I knew that I wanted to use flask.

33:40 So the first thing that you would ask is to ask ChatGPT for a boilerplate

33:45 of a flask web app.

33:46 And it will give you pretty quickly the basic building blocks.

33:51 I don't know if it would give you straight away the architecture with a template

33:55 inside of the templates folder, but, you know, it gives you here.

34:01 Hello world.

34:01 Yeah, hello world on the page.

34:03 But then, if you know that you need HTML, then you will ask ChatGPT to tweak it

34:09 to render index.html from the templates folder.

34:14 And there you see, there it starts and it gives you some boilerplate for the HTML

34:19 that you put in the templates folder.

34:22 and then you learn that you need ideally to have some JavaScript in a JavaScript file

34:29 and that you need some CSS in a CSS file and that those two files will be in the

34:35 static folder of a flask web app.

34:37 So now I've got, let's say, my routine, I've got all of that ready and if I start

34:43 a new app, I don't even need obviously ChatGPT.

34:47 I just create my structure.

34:48 I put index.html, script.js, styles.css.

34:53 But then, what you can also ask ChatGPT to do, for instance, is if you've got

34:59 your HTML page, you can say, restyle this HTML page with Tailwind CSS using the CDN,

35:06 for instance, and it will give you a full restyling.

35:08 And then you can ask it, okay, I want on this page four buttons and those four buttons

35:15 should do XYZ and then you start moving into the JavaScript part of it for the interactions

35:23 on the page.

35:24 The interesting thing maybe, which would explain also why I haven't really

35:30 started using Next.js or Vue.js or things like that, is that by default,

35:35 for some reason, you've got to ask OpenAI why, maybe because of some legacy

35:41 importance of Vaniya JavaScript, but if you ask ChatGPT to start creating some

35:47 interactions on an HTML page, it won't just tell you, okay, you know, these days people

35:53 use React or Next.js or something like that, so maybe you could or you should

35:57 consider that.

35:58 It will go deep into Vaniya JavaScript.

36:01 And after developing the Jingle Maker for a few months, I showed it to my friend Alex,

36:07 who is this developer I was talking about earlier, who has graduated, I would say,

36:12 from Vaniya JavaScript to React, and he looked at my code and said, man,

36:16 that's crazy.

36:18 It's all Vaniya JavaScript.

36:20 There's not a single line of React.

36:22 So everything in your app is lines and lines and lines of JavaScript.

36:26 That's a benefit and a drawback.

36:28 He said that he would not even be able to write it this way from scratch

36:34 today.

36:34 Yeah, yeah.

36:35 That's not something that he would really consider doing because it's more verbose.

36:39 There's more stuff to write to achieve what you want to achieve.

36:43 But the thing is that with ChatGPT or today with a GitHub Copilot embedded in

36:50 the IDE, even if it's longer, that's not a problem because you don't write a single

36:54 line of code.

36:55 I think it's important to point that out is that in the Jingle Maker, there is not

37:01 one single line of code that I wrote.

37:03 Not one.

37:04 That's insane.

37:05 There's not one.

37:05 Not a single line of code that I typed from the first curly bracket to the last

37:11 curly bracket.

37:11 Nothing.

37:12 Everything is written like that.

37:14 Yesterday, for instance, I was working on something completely different now

37:18 for a friend who is also a client who is working on a Gmail add-on.

37:22 So I don't know if you're familiar with that, but you're using Apps Script

37:26 from Google and then create a manifest and blah, blah.

37:31 And I didn't know anything about Gmail add-ons until yesterday in the morning.

37:37 And after now five hours of work, we've got a fully working product in Gmail.

37:44 That's amazing.

37:44 That's crazy.

37:45 2024.

37:46 And it's only the beginning.

37:47 I really see that evolving super fast.

37:51 I think that now the most important thing is to be able to talk to the machine,

37:56 to explain the structure, the architecture of what you expect and to be clear

38:02 in your head about the code has to be developed for the pages to interact,

38:08 for the elements to interact together.

38:11 And if it's clear in your head and if you can explain it clearly to the LLM,

38:16 it's just magic.

38:17 It is like magic.

38:18 Yeah.

38:18 It's pretty wild.

38:19 If you're a regular listener of the podcast, you surely heard about Talk Python's

38:25 online courses.

38:26 But have you had a chance to try them out?

38:28 No matter the level you're looking for, we have a course for you.

38:31 Our Python for Absolute Beginners is like an introduction to Python plus that first year

38:36 computer science course that you never took.

38:37 Our data-driven web app courses build a full PyPI.org clone along with you

38:43 right on the screen.

38:44 And we even have a few courses to dip your toe in with.

38:48 See what we have to offer at training.talkpython.fm or just click the link

38:51 in your podcast player.

38:52 So you can see on the side here I have these really weird recent chats I had

38:58 like a skilled baker Q&A and survive a plane crash in the wilderness.

39:03 And so these things are actually related.

39:05 And what I was trying to do was I was trying to understand how much prompt engineering

39:11 and sort of setting the stage for the questions matters.

39:14 So like this one, I said, you are a very skilled baker.

39:18 You have run a successful restaurant in the city for five years.

39:21 Now I will ask you questions as opposed to this one.

39:25 You are a very skilled outdoorsman and you've been on multiple reality shows.

39:29 Now I'll ask you some questions.

39:30 And they were both the same question.

39:32 If I'm in a plane crash and I need to survive, I wanted to see how much like the baker

39:37 would focus on food and stuff versus the survivalist on others.

39:42 and I feel like that's a real clear way to understand this kind of stuff

39:46 in just a real general way.

39:48 But I think there must be a code aspect of that as well.

39:52 Like rather than just tell me how to do this in Python, like you have written

39:57 this app in Python or you're an expert on FastAPI, now I want to talk to you,

40:01 you may get different results, maybe better, maybe worse, I don't know.

40:05 But did you try any of this techniques or was it just straight down the middle?

40:08 Tell me how to do this with Tailwind.

40:10 To be fair with you, because I was a total newbie in the beginning, I was making

40:16 sure to ask the AI to explain to me almost as if I were a five-year-old.

40:21 You know?

40:22 Yeah.

40:22 Because I could have told the AI, you're an expert Python developer and then

40:29 just give me the code.

40:31 But then I don't have all the explanations because then it behaves like an

40:36 expert Python developer and there are many shortcuts that it will take and

40:41 not really give you all the details documenting all the code.

40:44 So I'm still more like in explain to me in layman's terms how to do this

40:52 because then also I understand the code so it's easier for me to debug it

40:57 I usually take the analogy that when you said that sometimes you think it

41:02 might be too late to learn to code or to learn to do something let's say

41:06 that you want to learn to play music to play the piano at a certain age it becomes

41:10 very difficult because you don't have the reflex the muscles agility that

41:14 you can have when you are a young kid to learn how to play the piano but

41:18 still you could understand what's on the score written on the page from the

41:23 music so encoding for me it's kind of the same I would to be honest with

41:28 you I would not be able to write most of the code that is in my app myself

41:33 but I can read the score and I can see the connections between the different

41:38 building blocks in the code so I can understand if there is a problem a syntax

41:44 issue because there's some closing brackets I can't see it I wouldn't be able

41:51 to write the code properly in the first place myself you could argue it's

41:56 a problem but I say for me the output is what matters it's the final product

42:03 which is what matters so as long as I understand what's on the screen for

42:07 me it's okay yeah well let's loop it back to the original way we started

42:11 this one way you could do this is you could hire people to build this for

42:15 you and you give you the code and you're in the same position like here's

42:18 a huge pile of code and you probably understand it I'm sure you understand

42:22 it less well than if you went through step by step 100% sure I was in that

42:28 position a few times where I was involved in some projects and I was not

42:33 involved in the actual coding of the project and then I inherited the project

42:38 I had the code base but I could put it on a shelf because I would not be

42:45 able to do anything with that whereas now I understand every single section

42:50 of what's written in the app so at the moment I'm repurposing some of the

42:54 payment logic because I will switch from stripe to paddle in the iJingle

42:58 maker and yeah so I've got to rebuild the payment models I've got to rebuild

43:04 the flask route for the API endpoints for the payment confirmations and all

43:09 of that so I know where they are and I know how to tweak them and I can highlight

43:16 exactly what I want and now I'm using I would say 75% of the time I'm using

43:21 github copilot straight in the IDE directly because it's in context then

43:26 you highlight the code and you and then if the suggestion is nice you just

43:31 insert it to replace the code so yeah once you've got something that you

43:36 understand it goes faster and faster yeah and you're still early in this

43:41 project right this is yeah super early five six months or something like

43:45 a baby yes I imagine as you do more of this you might not choose to write

43:49 a lot of code but I bet you'll start to be able to write code kind of like

43:52 language immersion you know if you move to Brazil you would start to learn

43:56 Portuguese yes eventually just because you're in that environment so much

44:00 you know but sometimes really you know with the suggestions it's you wouldn't

44:06 see why you would write the code for instance I had earlier today I was creating

44:13 a scraper to check the technology used by different websites by looking in

44:17 the source code for let's say WP for WordPress Odoo for Odoo Squarespace

44:23 Weebly you know this kind of thing we just wrote together with the first

44:27 part and then we had to replicate the code in beautiful soup for the scraper

44:34 for each of them there's absolutely no reason why I would write each iteration

44:39 and once you write two of them then you with copilot you just go with your

44:46 tab to the next section and you understand what you expect because you have

44:51 three or four technologies that you want to track in your code that you declared

44:56 before they will have to write a block of six lines boom that's the block

45:00 of six lines there's no reason in the world why I would write those six lines

45:05 you know amazing that's crazy one more prompt engineering thing you talked

45:10 about and I think it is a problem so I asked basically what's the boilerplate

45:15 and it said boom here's the boilerplate for flask and ChatGPT then I said

45:19 well how do I use a template and it said boom here's the two pieces of code

45:22 you said sometimes this can be really challenging you said one of the techniques

45:27 used was to explain to me like a five year old another thing that works really

45:30 well is I just said tell me this again let's think step by step and it gave

45:35 me a 10 step process start one install flask create a project directory create

45:40 the project script import flask and it was really much more like this is

45:45 what each step you need to do when you start learning it's nice to do it

45:51 step by step because some people don't understand and that's quite normal

45:57 simple things like that so in the beginning it's nice to go step by step

46:08 it's really powerful and it's something people can check out there's a cool

46:12 video prompt engineering 101 by Patrick Lovier has a bunch of advice from

46:23 places like Anthropic and others here is how you go and some things you can

46:27 try it's also evolving thanks also to the longer context windows that we

46:33 have today in the LLM because when I started doing that in 2022 the context

46:41 window was maximum 4000 tokens or something like that so you had to really

46:46 go by short section it was very difficult to debug long long pieces of code

46:51 long sections of code now the token window is 128,000 on open AI and even

46:58 longer on cloud or other LLMs today it's possible to basically throw at some

47:05 point 750 lines of code in 1000 or and get refactoring debugging that's also

47:15 really amazing when you need let's say you know that you created something

47:19 cool in one app some business logic something interesting but you know that

47:23 you want to just repurpose it in a small way like make little tweaks you

47:28 just throw all the code into the LLM and you just explain the little changes

47:33 that you want and it will give you the adapted code fully functional in one

47:38 go one shot which is also impressive that is super impressive so it sounds

47:42 like you use google copilot a lot have you looked at gpt engineer no so i

47:46 haven't really either but it basically it's supposed to be kind of an iterative

47:50 thing that goes it will generate all the multiple files for you and try to

47:57 understand how all those pieces fit together and work and so more like an

48:02 agent logic yeah exactly exactly so but pretty i started working with the

48:08 gpt from open ai from chat gpt i created a few of them it was a funny one

48:14 for instance i'm working for an accounting firm for some marketing and the

48:19 boss of the company sent me a document of 350 pages explaining the accounting

48:26 module on Odoo which is an erp system two weeks ago and he said oh you should

48:31 read that to be able to understand it and answer questions about the module

48:36 and i just threw it into chat gpt uploaded the pdf and i created a custom

48:41 gpt so now i can ask the custom gpt questions about the accounting module

48:46 so that's insane instead of reading the and also another nice use case that

48:52 i have it's nothing about coding but sometimes you're just on youtube and

48:57 someone tells you this is the five big important things you have to know

49:02 in 2024 which would change your life forever so i'm tempted maybe i will

49:08 watch this video because it might be interesting but i say no it's probably

49:12 not that interesting it's probably a lot of fluff so now usually what i do

49:16 is that i i've got a website called i don't remember the name sorry but one

49:21 of the websites where you can get the transcript of a video so i go get the

49:27 transcript throw it into chat gpt and and then i ask what are the five important

49:32 things i should know that would change my life forever and 24 and then i've

49:37 got them in five seconds i don't want to i don't i don't need to watch a 35

49:40 minutes video and maybe maybe decide to watch it later right yeah awesome

49:45 what an interesting story fred i think maybe we should wrap it up but people

49:50 can check out ai jingle maker there's two other things from you that are

49:56 noteworthy one is you have your ai coding club newsletter do you want to

50:00 tell people about that yeah that's a newsletter i started which is connected

50:04 to some of the videos i posted on youtube where i explain to people how to

50:09 use ai for coding purposes i will start sending the newsletters soon actually

50:14 i started registering people but i haven't sent the first edition yet but

50:18 we'll start very soon i've got also a new app coming up probably within two

50:24 weeks it will be called the ai show maker it's a way to create a podcast

50:28 or a radio show with building blogs so it's the same concept as the jingle

50:33 maker but for longer form that sounds really interesting yeah all right cool

50:37 people can check it out here and by the way i've been thinking a lot about

50:41 email and newsletters and stuff i was doing a bunch with mailchimp for many

50:46 many years and it's just got to be super super expensive and i got frustrated

50:50 with them so did a bunch of research on different platforms looked at button

50:55 down dot email and actually chose list monk which is self hosted and docker

51:01 style thing but one of the ones that i came across at the end is beehive

51:05 which looks pretty interesting are you happy with beehive it's more competing

51:08 with sub stack i think it was co-created by one of the guys who co-founded

51:13 morning brew the newsletter morning brew so he knows what he's talking about

51:17 and it's really also really well executed it's a pleasure to use and you

51:25 can use it for free for up to 2500 subscribers yeah that's the pricing is way

51:33 way better than things like mailchimp and stuff so it's nice also cheaper

51:38 than than sub stack so they don't i don't know which cut they take from the

51:45 subscription if you run a premium newsletter but it's much cheaper than a

51:49 sub stack i think sub stack takes 10% from like like patreon and other platforms

51:55 like that nice all right and then one other thing is your call me Fred youtube

52:00 channel yeah i've got some videos there some of the videos are explaining

52:05 how to use the jingle maker the recent ones but also some of them are about

52:10 this journey of how to code with AI there are some concrete examples also

52:16 like i coded recently a Chrome extension a bookmarking Chrome extension all

52:22 the code the explanations is on on YouTube and the code on GitHub so i've

52:28 got different projects like that and i'm usually documenting what i do on

52:33 YouTube yeah nice so people can check that out all right well i think that

52:37 about does it for the time that we got together but thanks for coming on

52:41 and sharing your story i think it'll inspire a lot of folks thank you i hope

52:44 that everything was clear i wasn't cursed to be too cryptic like the developers

52:50 i was talking about but yeah so it's really exciting it's rejuvenating as you

52:58 could say it's opening up a whole world of possibilities right i wish i would

53:02 have started earlier to be honest because when i see my son he's 18 and what

53:07 he you know what he already does today with python that's quite amazing so

53:14 when you're 18 imagine where you will be when you will be 48 or 49 it would

53:19 be like really good so yeah that's the beauty that's the beauty of it so

53:25 don't wait too long if you're young if you're listening to the podcast start

53:28 today or yesterday even yeah it's amazing awesome well totally agree thanks so

53:33 much for being here and see you later thank you so much bye bye bye this has

53:38 been another episode of talk python to me thank you to our sponsors be sure

53:43 to check out what they're offering it really helps support the show mail

53:47 Mailtrap an email delivery platform that developers love try for free at

53:52 Mailtrap dot i want to level up your python we have one of the largest catalogs

53:59 of python video courses over at talk python our content ranges from true

54:03 beginners to deeply advanced topics like memory and async and best of all

54:07 there's not a subscription in sight check it out for yourself at training

54:10 talk python dot fm be sure to subscribe to the show open your favorite podcast

54:15 app and search for python we should be right at the top you can also find

54:19 the itunes feed at /itunes the google play feed at /play and the

54:23 direct rss feed at /rss on talk python dot fm we're live streaming most

54:29 of our recordings these days if you want to be part of the show and have

54:32 your comments featured on the air be sure to subscribe to our youtube channel

54:35 at talk python dot fm slash youtube this is your host michael kennedy thanks

54:40 so much for listening i really appreciate it now get out there and write

54:43 some python code you you have a have a a a a a a a a a a a a a a Bye.

54:58 Bye.

54:59 Bye.

55:00 Bye.

55:01 you you you Thank you.

55:05 Thank you.

Back to show page
Talk Python's Mastodon Michael Kennedy's Mastodon