Monitor performance issues & errors in your code

#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:07 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

00:16 in its own section in the center of a page?

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

00:23 But how far can we push this?

00:24 Frederick Tubiermont 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:36 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:45 - Are you ready for your host, Dave?

00:48 - You're listening to Michael Kennedy on "Talk Python to Me." Live from Portland, Oregon,

00:52 and this segment was made with Python.

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

01:01 This is your host, Michael Kennedy.

01:03 Follow me on Mastodon, where I'm @mkennedy, and follow the podcast using @talkpython,

01:08 both on fosstodon.org.

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

01:16 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

01:25 and be part of that episode.

01:28 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:44 Check them out at talkpython.fm/courses.

01:48 - Brad, welcome to "Talk Python to Me." - So great to be here.

01:52 Thank you so much for the invitation.

01:55 Nice to be here.

01:56 - Yeah. - Yeah, it's lovely to have you.

01:58 We're gonna have a lot of fun talking about this app that you've built using a highly powered by AI

02:06 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 gonna give people an interesting look into what is possible these days.

02:17 - What is possible and the journey of a middle-aged coder also 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

02:27 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

02:37 on the internet, people pay, subscribe to, which is the dream of many people, it's awesome.

02:43 With AI, just tell people a bit about yourself and then we'll, I wanna talk about this journey.

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

02:54 If you listen to this before June, 2024, I will be 49, 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:05 - 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, the keyboard still works.

03:15 It's amazing.

03:16 - And I started when I was 48, but maybe we'll get back to this later.

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

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

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

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

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

03:42 And then I started being involved in tech as a head of product, head of paid acquisition

03:48 for a few startups.

03:49 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- - A circus?

03:59 - That's quite an interesting story.

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

04:05 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, amazing.

04:17 - But four tents and circus artists and actors and musicians.

04:23 And that was, yes, an original show, an original story.

04:26 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. - It's a British band based here in London, but with a singer from Nashville, Tennessee, Nathan Nicholson.

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

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

04:54 and all my passions.

04:56 I was also a radio DJ for you, so that's why.

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

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

05:03 - Exactly. - Amazing.

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

05:09 That must've been really fun.

05:11 - It's not a career, that's the problem.

05:13 Unemployable. (laughs)

05:15 - Yeah, that's, but in terms of thinking about products and coding, I know when I experience different areas,

05:22 I always see like, oh, this could be way better, and that could be way better, and why is that so hard?

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

05:29 You must've 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:40 I had my own startups in the past, and I always had a team of, let's say,

05:44 two to five developers working for me when we were doing that.

05:48 So I kind of understood all the structure, the architecture of the apps,

05:52 but I'd never really coded myself.

05:57 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:09 - Roughly, almost two years ago.

06:11 - Yes.

06:12 - That's awesome.

06:13 You know, I do hear from a lot of people, or see comments like, oh, I think I'm too old

06:17 to learn this, or, oh, 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:25 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

06:46 the basic tutorials, the first lessons, 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,

06:59 that could become a product, because you always end up doing the same little exercises and little tutorials,

07:06 and that doesn't end up anywhere.

07:08 - 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 something very simple, nothing that would be worth

07:19 sharing as a product, and especially as a paid product.

07:22 So I always thought, okay, if I want to build a SaaS, the only solution for me is to rely on a freelancer

07:29 or on an agency or on a team of people.

07:33 I was doing it until I discovered--

07:36 - That's a big risk, and it's also not that easy to hire a team to build your product,

07:42 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, and if you want to,

07:52 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

07:58 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, and the alternative that people are most of the time advocating these days, it's no code.

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

08:16 - Got Retool, they've been a sponsor of the show before.

08:20 - Retool, obviously, that's pretty nice, mostly for internal apps.

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

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

08:37 on what's happening behind the scenes, and you don't have the flexibility that you have

08:42 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 was using, 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, and I started with the backend stuff,

09:11 with the backend scripts, for let's say to create competitive intelligence scripts,

09:18 things like that.

09:19 And I slowly moved into frontend, but first for a few months, it was mostly local scripts on my computer.

09:27 - That's really interesting.

09:28 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 it's, 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:48 It's always you're beholden to whatever that platform does.

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

09:54 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, you know, that 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?

10:08 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,

10:22 it's faster in many cases than trying to figure out how to connect, let's say, Airtable with something else.

10:29 Then you've got to think about how the data is structured in Airtable, how the data has to be structured on the other side,

10:36 and then how to connect them together.

10:39 Sometimes it's easier if you just have a SQLite database or MySQL database, and then if you do your own stuff

10:48 on your own without trying to connect existing SAS together.

10:53 It was more about flexibility for me.

10:57 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, but when you start to look at price

11:11 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:39 If you have, let's say, 10,000 transactions per month for a certain price, then yeah,

11:44 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,

11:56 API codes basically, between the different SAS.

12:00 - And if you glue them together, one tool connects to another, which connects to another,

12:04 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

12:21 for your product, but you're limited to the building blocks usually that they offer, even if you can tweak them

12:25 with some code.

12:27 And it's a bit the same, I would say it's a bit also the same issue that I've experienced on WordPress,

12:32 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 or the mothership, the core of the big app of Bubble as a whole,

12:45 when you want to build something on top of a platform like that.

12:49 It's a lot of things that you don't really need for your specific apps, but it has to be there

12:54 because the whole engine has to run.

12:57 That's usually what you also experience with WordPress, for instance, when you have a site on WordPress,

13:04 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, 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

13:27 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

13:48 is too intense.

13:50 There's too many moving parts.

13:52 Everyone thinks you need to have some kind of background worker service like celery,

13:57 and you need a caching layer, and you need this, and you need that.

14:01 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 backend, a front end, and some kind of data store, and that's it.

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

14:16 could be SQLite, which doesn't require another server or another thing to maintain and connect and secure.

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

14:25 - Exactly.

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

14:28 So maybe you're coming from a place where you weren't a DevOps expert, you know, like how'd 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:44 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

15:03 and you've got everything there, your main Flask file, and then all the, let's say the sub files in Python

15:11 with all the business logic that you can isolate in one file or another.

15:15 It's one project.

15:17 And then you deploy the project to GitHub, 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:27 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:38 If you want to decouple completely the backend from the front end, let's say you work with something like Next.js,

15:45 for instance, and then you want to have a backend in something else, then you've got to have multiple instances

15:51 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 Django maker that I built, that I've been building since September 23,

16:10 is a Flask web app.

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

16:14 It's one project.

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

16:21 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:43 - And it was not that easy.

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

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

17:01 a proc file.

17:02 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

17:13 and the worker in the same file.

17:17 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:23 - You kind of deploy them both, right?

17:24 But then you get to more coordination.

17:27 - Yeah, but fortunately, and there is a discussion on the Discord between me and one of the guys there,

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

17:40 and the worker in the same deployment.

17:44 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, like cryptic instructions that nobody really understands.

18:16 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:25 But that's not the case.

18:26 - I totally agree.

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

18:36 An email sending solution with industry-best analytics, SMTP, and email API SDKs for major programming languages,

18:44 and 24/7 human support.

18:47 Try for free at mailtrap.io.

18:50 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, oh yeah, so then you just,

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

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

19:03 - Yeah, I'll do it. - 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 for much longer than me,

19:22 but once you start coding, there are so many little things that you have to know

19:26 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. - Yeah.

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

19:43 - Yeah, it'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 than what you would have 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 Railways before.

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

20:11 It connects to your GitHub account.

20:16 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 aspect.

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:59 We have a database on MongoDB Atlas, and we have the files uploaded to S3, to Amazon S3

21:10 for the file storage.

21:11 On Railway, you can, at least it's what I do, you can have at the same time, the deployment of the app,

21:17 so which replaces Heroku, 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:26 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 type-

21:50 - Netlify is fantastic for static, but yeah.

21:51 - For static, Netlify is just amazing.

21:53 And just the one where you can just drag and drop a project, for instance, for a static website, so easy.

21:59 But for a more multi-tenant dynamic web app, like the Jingle Maker, 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 But that gets you eight gigs of RAM and eight CPUs per service.

22:20 That is really good.

22:22 - I started it on the OBI plan.

22:24 And I think that today, just to give you an idea, with roughly 500 users coming to the app per day,

22:33 and a lot of them using the product, 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 the Jingle Maker.

22:49 - That's pretty impressive.

22:51 Good one to know about, this is cool.

22:52 - Yes, nice one.

22:53 - They have good Python support?

22:54 - Yes, yes, 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 of Railway,

23:08 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:15 And it was on a Sunday in the evening.

23:18 So really nice.

23:19 - Yeah, that's amazing.

23:20 One thing I just wanna give a shout out to that I came across recently, and 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 gotta have a decent server to run it on,

23:38 and you gotta run the Docker stuff and whatnot to sort of do it.

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

23:44 - Yeah, you're gonna manage also.

23:46 Because the other day, I think it was 10 days ago, there was a DDOS attack, I think, against Railway

23:52 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 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 security and all of that.

24:09 - 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 this,

24:17 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:27 Tell people what it does.

24:28 - It's a web app that you can find on AIJingleMaker.com.

24:31 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:44 It's not the usual DOE experience.

24:48 If you'll be using things like GarageBand or FL Studio or Pro Tools to edit your audio,

24:56 you can imagine those waves that you've got to move around 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 with the volume, the fade in, the fade out,

25:17 the reverb, the chorus, the flanger, 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 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 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:53 So I rebuilt a voice recorder, an online voice recorder, where you can quickly record your voice,

26:00 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 FL Studio or something else,

26:12 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 API.

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

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

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

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

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

26:41 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:55 And in five seconds, you've got the jingle.

26:57 That's basically the idea.

26:59 - I'll put in the jingle so people know exactly what this sounds like.

27:04 I'll put it in right now.

27:05 (electronic music)

27:06 - Party time!

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

27:11 - 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 on top of,

27:27 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:34 - Let me see if I can automate my job away.

27:36 - 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 the needs of people,

27:47 as you said, who don't want to spend 50 bucks or 100 bucks for something,

27:51 but who want to have an easy way to create basic sweepers, 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 in Ibiza.

28:27 So yeah, it's not only radio stations and podcasts.

28:31 It's also anyone who wants to create a promo for their business.

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

28:39 And when I started, it was only short sweepers, jingles, radio station IDs, stuff like that.

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

28:51 where you can create something which is up to 30 seconds long.

28:54 So more like a radio ad.

28:55 That's an, and there you can also use AI.

28:58 It's connected to open AI, to be honest, but you can also use AI to generate the text of your promo.

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

29:08 Then it will suggest the text.

29:10 Then you choose the voice, generate the AI voice, and then you add the sounds and then it's finished.

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

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

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

29:27 with less than a year of Python or really any coding experience, right?

29:31 Roughly that amount?

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

29:37 if they start their coding journey.

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

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

29:54 because I didn't tell you in the beginning, but most of my activity, it's online marketing.

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

30:02 So I need scripts, you know, to, for competitive intelligence, for SEO, for even content production, 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:19 That was just before the summer of 2023.

30:23 And yes, the first version of the Jingle Maker that I launched, it was just on the home page.

30:29 You couldn't basically tweak anything.

30:32 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 it started getting some traction between May, 2023 and August.

30:46 And then I said, okay, I'm gonna really dive into this project and develop something more sophisticated.

30:53 I started working on that on a Monday in September.

30:58 It was released on the Friday, the V2.

31:00 - And I gotta 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 to do this podcast.

31:15 It was a white page.

31:17 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.

31:33 So people might recognize 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:42 But if you go on the website, you will see it.

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

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

31:55 make it responsive and all of that.

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

32:03 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 site is nice, but it looks ugly.

32:18 So could you make something that looks better?" 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." So that's why also we've got something which looks better today, thanks to my son, Maxim.

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

32:40 So nice work on that.

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

32:46 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 the 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+.

33:03 So I started using ChatGPT.

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

33:10 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:26 - You asked it at the beginning.

33:28 How do I make a Flask app?

33:29 Or what did you ask 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:37 - I knew that I wanted to use Flask.

33:40 So the first thing that you would ask is to ask a ChatGPT for a boilerplate 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:56 inside of the templates folder, but no, it gives you here.

34:00 - Hello world.

34:01 - Yeah, bring on hello world on the page.

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

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

34:14 And there you see, there it starts.

34:17 And it gives you some boilerplate for the HTML that you put in the templates folder.

34:21 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.

34:32 And that those two files will be in the 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.

34:41 And if I start a new app, I don't even need, obviously, a ChatGPT.

34:46 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 your HTML page,

35:00 you can say, "Restyle this HTML page "with Tailwind CSS using the CDN," for instance,

35:06 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 should do X, Y, Z."

35:16 And then you start moving into the JavaScript part of it for the interactions on the page.

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

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

35:36 you've got to ask OpenAI why, maybe because of some legacy importance of vanilla JavaScript.

35:42 But if you ask ChatGPT to start creating some interactions on an HTML page, it won't just tell you,

35:50 "Okay, you know, these days people use React "or Next.js or something like that,

35:55 "so maybe you could, or you should consider that." It will go deep into vanilla 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 vanilla JavaScript to React, and he looked at my code and said, "Man, that's crazy.

36:17 "It's all vanilla JavaScript.

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

36:21 "So everything in your app, "it's lines and lines and lines of JavaScript."

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

36:29 - He said that he would not even be able to write it this way from scratch today.

36:34 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 the IDE,

36:50 even if it's longer, that's not a problem because you don't write a single line of code.

36:55 I think it's important to point that out is that in the Jingle Maker, there is not one single line of code that I wrote, not one.

37:03 - That's insane.

37:04 - There's not a single line of code that I typed from the first curly bracket to the last 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 are 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 from Google

37:28 and then create a manifest and blah, blah.

37:32 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:43 - That's amazing.

37:44 - That's crazy, 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 in your head

38:03 about the code has to be developed for the pages to interact, for the elements to interact together.

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

38:15 it's just magic.

38:17 - It is like magic.

38:17 - Yeah. - 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 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 computer science course

38:36 that you never took.

38:37 Our data-driven web app courses build a full pypi.org clone along with you right on the screen.

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

38:47 See what we have to offer at training.talkpython.fm, or just click the link 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:04 And what I was trying to do was I was trying to understand how much prompt engineering

39:10 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.

39:23 As opposed to this one, 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, what do I, I wanted to see how much like the baker

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

39:41 And I feel like, you know, 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 this app in Python

39:58 or you're an expert on FastAPI.

40:00 Now I want to talk to you.

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

40:04 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 sure to ask the AI to explain to me

40:18 almost as if I were a five-year-old, you know?

40:22 - Yeah.

40:22 - Because I could have told the AI, you're an expert Python developer and then just give me the code.

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

40:37 And there are many shortcuts that it will take and not really give you all the details,

40:43 documenting all the code.

40:44 So I'm still more like in a, explain to me in layman's terms, you know?

40:50 - Yeah.

40:51 - How to do this.

40:52 Because then also I understand the code.

40:54 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 might be too late

41:02 to learn to code or to learn to do something.

41:05 Let's say that you want to learn to play music, to play the piano.

41:08 At a certain age, it becomes very difficult because you don't have the reflex, the muscles,

41:13 agility that you can have when you are a young kid to learn how to play the piano.

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

41:23 So in coding for me, it's kind of the same.

41:26 I would, to be honest with you, I would not be able to write most of the code

41:30 that is in my app myself, but I can read the score and I can see the connections

41:37 between the different building blocks in the code.

41:40 So I can understand if there's a problem, you know, a syntax issue, because there's some, you know, closing brackets

41:47 that are not properly closed.

41:48 I can see it.

41:50 I wouldn't be able to write the code properly in the first place myself.

41:55 You could argue it's a problem, but I say, you know, for me, the output is what matters.

42:01 It's the final product, which is what matters.

42:04 So as long as I understand what's on the screen, for me, it's okay.

42:08 - Yeah, well, let's loop it back to the original way we started this.

42:11 One way you could do this is you could hire people to build this for you, and then they give you the code

42:16 and you're in the same position.

42:17 Like here's a huge pile of code and you probably understand it.

42:20 I'm sure you understand it less well than if you went through step by step and built,

42:25 100% sure.

42:26 - I was in that position a few times where I was involved in some projects

42:31 and I was not involved in the actual coding of the project.

42:35 And then I inherited the project.

42:39 I mean, I had the code base, but I could, I mean, I could just put it on a shelf

42:42 because I would not be able to do anything with that.

42:46 Whereas now I understand every single section of what's written in the app.

42:51 So at the moment I'm repurposing some of the payment logic because I will switch from Stripe to Paddle

42:57 in the AI JINGLEMAKER.

42:59 And yeah, so I've got to rebuild the payment models.

43:02 I've got to rebuild the Flask route for the API endpoints for the payment confirmations and all of that.

43:09 So I know where they are and I know what they do.

43:12 So I know how to tweak them and I can highlight exactly what I want.

43:17 And then now I'm using, I would say 75% of the time I'm using GitHub Copilot straight in the IDE directly

43:24 because it's in context then.

43:25 You highlight the code and then if the suggestion is nice you just insert it to replace the code.

43:33 So yeah, once you've got something that you understand it goes faster and faster.

43:39 - Yeah, and you're still early in this project, right?

43:41 This is- - Yeah, super early.

43:42 - Five, six months or something.

43:44 - Like a baby.

43:45 - Yes, I imagine as you do more of this you might not choose to write a lot of code

43:49 but I bet you'll start to be able to write code kind of like language immersion.

43:53 You know, if you move to Brazil you would start to learn Portuguese.

43:57 - Yes.

43:58 - Eventually just 'cause you're in that environment so much, you know?

44:00 - But sometimes really, you know, with the suggestions it's, you wouldn't see why you would write the code.

44:09 For instance, I had earlier today I was creating a scraper to check the technology used

44:15 by different websites by looking in the source code for let's say WP for WordPress,

44:21 Odoo for Odoo, Squarespace, Weebly, you know, this kind of thing.

44:24 We just wrote together with the AI the first part and then we had to replicate the code

44:30 in beautiful soup for the scraper for each of them.

44:35 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 tab

44:46 to the next section and we understand that what you expect because you've got like three or four different technologies

44:53 that you want to track in your code that you declared before, they would have to write a block of six lines.

44:59 Boom, that's the block of six lines.

45:01 There's no reason in the world why I would write those six lines, you know?

45:05 - Amazing.

45:06 - That's crazy, that's crazy.

45:07 - One more prompt in engineering thing and you talked about it and I think it is a problem.

45:11 So I asked basically what's the boiler plate and it said, boom, here's the boiler plate

45:16 for Flask and ChatGPT.

45:18 Then I said, well, how do I use a template?

45:19 And it said, boom, here's the two pieces of code.

45:22 And you said, sometimes this can be really challenging.

45:25 You said one of the techniques used was to explain to me like a five-year-old.

45:28 Another thing that works really well is I just said, tell me this again, let's think step by step.

45:34 And it gave me a 10 step process.

45:37 Start one, install Flask, create a project directory, create the project script, import Flask.

45:42 And it was really much more like this is what each step you need to do.

45:47 And things like that are really neat.

45:49 When you really start learning, it's nice to do it step by step because some people they don't understand

45:54 and that's quite normal.

45:56 I would say that you've got to install those libraries before using them, simple things like that.

46:04 So in the beginning, it's nice to go step by step.

46:08 - It's really powerful.

46:08 And it's something people can check out.

46:11 There's a cool video, that's your channel, this one.

46:15 - Yeah.

46:16 - Prompt Engineering 101 by Patrick LeVere.

46:18 And yeah, it's like a 14 minute video, talks to you, has a bunch of advice

46:22 from places like Anthropic and others.

46:24 And like, here is how you go and some things you can try.

46:27 - It's also evolving.

46:29 Thanks also to the longer context windows that we have today in DLLM.

46:34 Because when I started doing that in 2022, the context window was maximum 4,000 tokens

46:43 or something like that.

46:44 So you had to really go by short section.

46:47 It was very difficult to debug long pieces of code, long sections of code.

46:52 Now the token window is 128,000 on OpenAI and even longer on Cloud or other LLMs.

47:01 Today it's possible to basically throw at some point 750 lines of code in a 1,000 lines of code in DLLM

47:10 and get some refactoring, debugging.

47:14 That's also really amazing.

47:15 When you need, let's say, you know that you created something cool in one app, some business logic,

47:21 something interesting, but you know that you want to just repurpose it in a small way,

47:26 like make little tweaks.

47:27 You just throw all the code into DLLM and you just explain the little changes that you want

47:33 and it will give you the adapted code fully functional in one go, one shot, which is also impressive.

47:40 - That is super impressive.

47:41 So it sounds like you use Google Copilot a lot.

47:43 Have you looked at GPT Engineer?

47:45 - Nope.

47:46 - So I haven't really either, but it basically, it's supposed to be kind of an iterative thing that goes,

47:52 it will generate all the multiple files for you and then like try to understand how all those pieces

47:59 fit together and work.

48:00 And so-

48:01 - More like an agent logic.

48:03 - Yeah, exactly, exactly.

48:05 So, but pretty.

48:07 - I started working with the GPTs from OpenAI, from ChatGPT.

48:11 I created a few of them.

48:13 It was a funny one, for instance, I'm working for an accounting firm for some marketing

48:18 and the boss of the company sent me a document of 350 pages explaining the accounting module on Odu,

48:27 which is a ERP system two weeks ago.

48:30 And he said, "Oh, you should read that "to be able to understand it "and answer questions about the module."

48:35 And I just threw it into ChatGPT, uploaded the PDF and I created a custom GPT.

48:41 So now I can ask the custom GPT questions about the accounting module.

48:46 So-

48:46 - Oh, that's insane.

48:47 - Instead of reading the...

48:49 And also another nice use case that I have, it's nothing about coding, but sometimes you're just on YouTube

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

49:03 which would change your life forever.

49:05 So I'm tempted, maybe I will watch this video because it might be interesting.

49:10 But I'm gonna say, no, it's probably not that interesting.

49:13 It's probably a lot of fluff.

49:14 So now usually what I do is that I've got a website called, I don't remember the name, sorry,

49:20 but one of the websites where you can get the transcript of a video.

49:26 So I go get the transcript, throw it into ChatGPT.

49:29 And then I ask, what are the five important things I should know that would change my life forever in 24?

49:36 And then I've got them in five seconds.

49:37 I don't need to watch a 35 minutes video.

49:40 - And then maybe you decide to watch it later.

49:42 - Maybe, maybe.

49:43 - You can filter it, right?

49:44 Yeah, awesome.

49:46 What an interesting story, Fred.

49:47 I think maybe we should wrap it up, but people can check out AIjinglemaker.com.

49:52 I'll put that in the show notes.

49:53 There's two other things from you that are noteworthy.

49:57 One is you have your AI Coding Club newsletter.

49:59 Do you wanna tell people about that?

50:00 - Yeah, that's a newsletter I started, which is connected to some of the videos

50:04 I posted on YouTube, where I would explain to people how to use AI for coding purposes.

50:11 I will start sending the newsletters soon, actually.

50:13 I started registering people, but I haven't sent the first edition yet, but I will start very soon.

50:20 I've got also a new app, as I said, coming up, probably within two weeks.

50:24 It will be called the AI Showmaker.

50:26 It's a way to create a podcast or a radio show with building blocks.

50:31 So it's the same concept as the Jinglemaker, but for longer form.

50:35 - That sounds really interesting.

50:36 All right, cool.

50:37 People can check it out here.

50:38 And by the way, I've been thinking a lot about email and newsletters and stuff.

50:42 I was doing a bunch with MailChimp for many, many years, and it's just got to be super, super expensive,

50:49 and I got frustrated with them.

50:50 So did a bunch of research on different platforms, looked at buttondown.email,

50:56 and actually chose ListMonk, which is self-hosted and Docker style thing.

51:01 But one of the ones that I came across at the end is Beehive, which looks pretty interesting.

51:06 Are you happy with Beehive?

51:07 - It's more competing with Substack.

51:08 I think it was co-created by one of the guys who co-founded Morning Brew, the newsletter Morning Brew.

51:15 So he knows what he's talking about.

51:17 And it's really, also really well coded, really well executed.

51:22 It's a pleasure to use.

51:24 And you can use it for free for up to 2,500 subscribers.

51:29 Yeah, that's it.

51:30 So yeah, it's a good one.

51:31 - The pricing is way, way better than things like MailChimp and stuff.

51:36 So it's nice.

51:37 Also cheaper than Substack.

51:41 So I don't know which cut they take from the subscription if you run a premium newsletter,

51:47 but it's much cheaper than Substack.

51:49 I think Substack takes 10% from like Patreon and other platform like that.

51:55 - Nice.

51:55 All right, and then one other thing is your, call me Fred.

52:00 - YouTube channel, yeah.

52:01 I've got some videos there.

52:03 Some of the videos are explaining how to use the Jingle Maker, the recent ones,

52:07 but also some of them are about this journey of how to code with AI.

52:14 There are some concrete examples also, like I coded recently a Chrome extension,

52:20 a bookmarking Chrome extension, all the code.

52:23 The explanations is on YouTube and the code on GitHub.

52:27 So I've got different projects like that.

52:29 And yeah, I'm usually documenting what I do on YouTube.

52:33 - Yeah, nice.

52:34 So people can check that out.

52:35 All right.

52:36 Well, I think that about does it for the time that we got together, but thanks for coming on and sharing your story.

52:42 I think it'll inspire a lot of folks.

52:43 - Thank you.

52:44 I hope that everything was clear, that I wasn't cursed to be too cryptic,

52:49 like the developers I was talking about, but yeah, so it's really exciting.

52:55 It's rejuvenating, as you could say.

52:59 - It's opening up a whole world of possibilities, right?

53:01 - I wish I would have started earlier, to be honest, because when I see my son, he's 18,

53:06 and what he already does today with Python, that's quite amazing.

53:13 So when you're 18, imagine where you will be when you will be 48 or 49.

53:19 It will be like really good.

53:21 So yeah, that's the beauty.

53:23 That's the beauty of it.

53:24 So don't wait too long if you're young, if you're listening to the podcast,

53:28 start today or yesterday even.

53:30 - Yeah. - It's amazing.

53:30 - Awesome.

53:31 Well, totally agree.

53:32 Thanks so much for being here.

53:34 And see you later.

53:35 - Thank you so much.

53:36 Bye-bye. - Bye.

53:37 This has been another episode of "Talk Python to Me." Thank you to our sponsors.

53:42 Be sure to check out what they're offering.

53:43 It really helps support the show.

53:45 MailTrap, an email delivery platform that developers love.

53:51 Try for free at mailtrap.io.

53:54 Want to level up your Python?

53:57 We have one of the largest catalogs of Python video courses over at Talk Python.

54:01 Our content ranges from true beginners to deeply advanced topics like memory and async.

54:06 And best of all, there's not a subscription in sight.

54:08 Check it out for yourself at training.talkpython.fm.

54:12 Be sure to subscribe to the show.

54:13 Open your favorite podcast app and search for Python.

54:16 We should be right at the top.

54:18 You can also find the iTunes feed at /iTunes, the Google Play feed at /play,

54:23 and the direct RSS feed at /rss on talkpython.fm.

54:27 We're live streaming most of our recordings these days.

54:30 If you want to be part of the show and have your comments featured on the air,

54:33 be sure to subscribe to our YouTube channel at talkpython.fm/youtube.

54:38 This is your host, Michael Kennedy.

54:40 Thanks so much for listening.

54:41 I really appreciate it.

54:42 Now get out there and write some Python code.

54:45 (upbeat music)

55:03 For more information drop us a line at www.freebiblecommentary.org

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