Latest / The Every Podcast / You Can Build an App in 60 Minutes with ChatGPT - Ep. 5 with Geoffrey Litt
Transcript
- 0:00Why don't we just build something together?
- 0:01All right, let's see how it goes.
- 0:02So I'm gonna kick us off with my goal, which is I'm appearing as a guest on a podcast.
- 0:08I want an app that I can have open while I'm on the show to help me keep track of time and remember what I wanna say.
- 0:15Okay, so we got this code.
- 0:16I'm not gonna read it.
- 0:17I just copy paste and go.
- 0:18I'm just pasting from chat GPT.
- 0:20This should update live this little window here.
- 0:23Oh my God.
- 0:24Look at that.
- 0:37Jeffrey, welcome to the show.
- 0:38Thanks so much.
- 0:39It's good to be back.
- 0:40Yeah, good to have you.
- 0:40I interviewed you, I think like two or three years ago on Super Organizers.
- 0:45That interview went really, really well.
- 0:47And I just think you're one of the deepest thinkers about this stuff.
- 0:51And in the pre-production call, I was just saying like, I think generative AI just sort of like, it just takes the things that you've been thinking about to a new level.
- 1:00And I'm just really excited to check in with you.
- 1:02Yes, a lot has changed over the past couple of years, indeed.
- 1:05Yeah.
- 1:07And for folks that are, you know, are not familiar with your work, you are a researcher at Inc&Switch, which is an independent research lab.
- 1:13And you explore what you call malleable software, which are computing environments where anyone can mold their own tools to their needs.
- 1:22Can you talk to us about what malleable software is and why that's important?
- 1:27Yeah, absolutely.
- 1:28So this has been a quest that I've been on for at least the last five years now.
- 1:31And it all started, I was working at a startup and we were making SaaS software for schools.
- 1:37And I just started getting really bummed that we kept saying no to every single request that came our way from some teacher in a classroom.
- 1:44And they would say, you know, can you change this word because it doesn't match the way I teach?
- 1:48Or can you add this little button for me that would do X?
- 1:51And we would say, no, we're not going to add that button just for you.
- 1:55And that's such a normal way of thinking about software for people used to SaaS.
- 2:00But it felt really strange to me.
- 2:01And so I started wondering, what if we had a world where everybody could craft software tools that match the workflows they want to have?
- 2:08unique to themselves and not just using these pre-made tools.
- 2:13That's what malleable software means to me, is that we can all have the software that works for us, not for some product manager off in San Francisco.
- 2:20And the really interesting thing that's happened the past couple of years is that until recently,
- 2:26Programming was a huge bottleneck in this space.
- 2:30You need to do a lot of programming to make any sort of software.
- 2:33And the big question was, how can we sort of route around programming to give people tools to make software without doing that?
- 2:40And what really excites me about Generative AI is that, oh my gosh, we now have a thing that can kind of sometimes turn fuzzy ideas into code.
- 2:50And so that's starting to cut almost like a shortcut through that impassable mountain.
- 2:56And I think it's a really exciting time to be exploring how can we apply that base technology to help everybody make and edit the software that they wanna have.
- 3:06I love that.
- 3:07It's an idea I've been thinking about as well.
- 3:09You're obviously far deeper than I am, but I wrote this article called What Comes After SaaS probably like six months ago.
- 3:16And the short answer is like bespoke apps customized by AI.
- 3:23I think for people who are sort of newer to this, one way to think about it, and I'm curious what you think of this metaphor, is the difference between right now, a lot of the software that you use, it's sort of like when you use Spotify or Gmail or whatever.
- 3:39It's sort of like staying at a hotel where the company, everyone gets the same hotel room.
- 3:45Um, and you know, the company is running the hotel and when you sign up for, for Gmail or whatever, you get your little Gmail hotel room and it's got all the same things as everybody else.
- 3:54And there's like some ways that you can customize it.
- 3:56Like, obviously like you put your luggage in the hotel room.
- 3:58Like, so there's certain things that are, that are yours, but.
- 4:02Everything is basically the same basic model.
- 4:06And over time, companies get, especially SaaS companies, get good at adding little customizations or whatever.
- 4:11But it's always on their terms.
- 4:13It's always on their guardrails.
- 4:14And I think your vision of software is a little bit less like these infinitely large hotel rooms that people are staying in and more like...
- 4:24everyone owning their own home or something like that and either having power tools and the ability to use them or maybe like having their own general contractor on staff that they can deploy to like make any change they want, right?
- 4:39Yeah, I love that analogy.
- 4:40I think it's a really good one too, because it's subtle in that sometimes hotels are fun.
- 4:45And there's a whole spectrum from renting a hotel room to renting an apartment to buying a house that someone else built.
- 4:51There are people also who build their own home from scratch and design it all, right?
- 4:55And there's a whole spectrum there.
- 4:56And it's okay to, I think, at different times be on different points.
- 4:59What I think is really pernicious about the hotel idea though, is like,
- 5:02Imagine we all lived in hotel rooms all the time.
- 5:05You would probably stop thinking about questions like, oh, what would be a better layout?
- 5:10When I walk into a hotel room, I don't start thinking about moving the walls around or changing the decorations because it's not a thing that I obviously am allowed to do.
- 5:18And so those questions don't occur to me.
- 5:20And that's what I worry about with software is the worst case outcome is that we all use SaaS tools that subtly affect the way we think.
- 5:27And we don't even realize it because we're just so used to living in those tools.
- 5:32Yeah.
- 5:33Yeah.
- 5:33I was just talking to a couple of weeks ago, I was talking to Linus Lee on this show and he was talking about something similar, which is the idea of agency and how our tools shape the agency that we have and thinking about ways to give users more agency in the context of general AI.
- 5:51Um, where I think, you know, in large part for now, there's, there's maybe a little bit less agency in something like using mid journey than you might get in something like using Photoshop.
- 6:01Um, because you can like literally, uh, with mid journey, you can prompt it, but in Photoshop, you can literally change the pixels.
- 6:08Um, and, and so figuring out ways to give people finer grained control, uh, is like a really interesting challenge in generative AI.
- 6:17Yeah, absolutely.
- 6:19And I think one really important point here is that there's a lot of different dimensions of how people gain agency.
- 6:25And some of them are things surrounding the AI and are not core to the AI itself.
- 6:30So one example following on with the hotel analogy, right, is you said, maybe everybody has a general contracting team that they can bring to their hotel room.
- 6:38If you show up at a hotel with a construction crew,
- 6:41they're not going to let you tear down your room and rebuild it.
- 6:45There's like a sort of social agreement or legal framework or whatever around your contract with that entity, where it's not really like your ability to move walls physically that is the constraint.
- 6:57And so to bring that back to software, what I think about a lot is if I had a personal team of 100 developers that were working for me,
- 7:06What could I do with that power?
- 7:08And let's say I'm using Spotify and I'm like, oh, I hate the way that Spotify shows me these playlists.
- 7:14I wish that it showed me them a different way.
- 7:17I can't edit the Spotify app.
- 7:19I don't have control over that.
- 7:23What I'm thinking about a lot these days is how can we reorient the way software is distributed and constructed so that my, so to speak, personal dev team can actually do useful stuff for me?
- 7:35And for example, maybe they could make browser extensions for me, or maybe they could, if my software is open source and I control it, maybe they could start adding features for me.
- 7:45How can we...
- 7:46change the foundations of software in a way that is best positioned to take advantage of the fact that everybody is going to have this power available to them in the coming years.
- 7:56Yeah, no, that makes total sense.
- 7:57And it's just making me think of, I teach this course called How to Build an AI Chatbot.
- 8:04And one of the really incredible things about this course is we take people from not really being able to code to shipping an app in 30 days.
- 8:14And it's really cool because I feel like there are all these people out there who are just waking up to the idea that they have these magical powers where they can literally now build stuff in a way that they couldn't before.
- 8:28And a lot of these people are like, okay, it's a product manager who you work with engineers and maybe you took one coding class in college, but you've never felt confident enough to actually go build and ship a React app or whatever.
- 8:42And all they really need is a little push to be like, okay, just use ChatGPT, ask it what to do, here's some sample code, and go.
- 8:51And it really changes things for people where one is on day one, they can have a working chatbot with a couple prompts, and that's like a big...
- 9:02holy shit, I cannot believe that I can actually make something.
- 9:06And then what it does is it motivates them to try to learn the underlying fundamentals in this way that's very connected to practice, as opposed to the way that you used to have to learn programming, which is like, you spend six months learning about loops and if statements and all this stuff.
- 9:22And you're like, I have no idea how this connects to the things I want to make.
- 9:26And so...
- 9:28I just think that there's this really quickly expanding horizon of who gets to make things in the world.
- 9:37And there are a lot of people who are within the horizon of being able to make stuff that don't know it yet, but all they literally have to do is sit down with ChatGPT.
- 9:45And that horizon is going to be significantly larger in five years.
- 9:50And I think that's one of the things that you're working on.
- 9:53And I think it's so exciting.
- 9:55I love that way of thinking about it.
- 9:57For me, the way that I learn best has always been to make first and then figure out what I'm doing second.
- 10:03And I think people often end up in these dumb debates that are like, people should be able to make stuff without learning the fundamentals.
- 10:10And then other people are like, it's really important to learn the fundamentals.
- 10:12And my take is, yes, it's important if you want to go really far.
- 10:15At some point, you're going to have to dig deep and actually learn what you're doing, and that's going to propel you.
- 10:20that shouldn't be a barrier to you doing anything.
- 10:22And so in my career, you know, I got started in web development, just like throwing together Rails apps, and I didn't really know how to program.
- 10:30I didn't know Ruby.
- 10:32I was just sort of copy pasting and messing around.
- 10:35And I fought through the pain just because I wanted to make and share stuff.
- 10:38And I think you're exactly right that
- 10:41the flip that I see when people start using ChatGPT is all of these frustrating moments that before took incredible dedication to fight through because they were so frustrating.
- 10:50And programming is full of these, absolutely full of these things.
- 10:55A single...
- 10:56you're missing a semicolon and it takes you three hours to realize that that's why your thing wasn't working.
- 11:00That's so demoralizing.
- 11:01And people who don't have access to a friend or tutor who can help them with that, there's just a huge drop off chance, I think, at that point.
- 11:09And when I'm using ChatGPT, even now I'm a skilled programmer, but I'm often working in areas that I don't know as well.
- 11:15Having ChatGPT with me just feels like...
- 11:18The default flips to I have flow, I have momentum, and I have this sort of support that's going to make sure everything goes okay.
- 11:27And I am just less worried about getting stuck.
- 11:30And I think that that feeling is really qualitatively different.
- 11:33And I agree when people realize that it's a really exciting flip for them.
- 11:37Yeah, it really is.
- 11:38So I think that that sort of brings us to the main thing that we wanted to do today, which is, in most of these episodes, what we're doing is we're going through historical chats and then we both kind of interact with ChatGPT and we explore something and find things that we never would have found before.
- 11:58And what you suggested, which I think is brilliant, is like, why don't we just build something together?
- 12:02Why don't we build an app?
- 12:03And I think in the process of building an app, one is people will be able to get just a little bit of an idea of what you mean by malleable software, what this future of being able to modify things is going to look like.
- 12:14And then two is they're going to be able to see...
- 12:17What are the specific ways that you're using ChatGPT to achieve these results in just a very, very detailed way?
- 12:23And we'll try to make it so that if you're a programmer, you can get a lot out of it.
- 12:27And if you're not a programmer, you'll be able to understand what's going on.
- 12:30And you'll be able to see, like get a little bit of a taste of like, what would it be like to push myself in this way a little bit and try to build stuff?
- 12:36And I think it'd be really cool.
- 12:38Yeah, I'm excited to try it out.
- 12:40And maybe just as a preamble, I can talk a bit about how I think about this task that we're going to do.
- 12:45Right.
- 12:45So what I've been trying to do in my work is sometimes there'll be a brief moment when I'm in the middle of something and I have this thought that's like, oh, I wish I just had.
- 12:55a software tool that did X.
- 12:56And again, this is getting out of the hotel mindset.
- 12:59And I've been trying to notice those moments and think, wait, like, could I actually make that?
- 13:04And before maybe that would have taken a day.
- 13:06So the answer is like, no, not worth it.
- 13:08But now if the answer is like five minutes, maybe, right?
- 13:11And so I've been trying to notice those moments, and I've come up with a workflow that's very, very simple and crude, but has worked for me a few times for making these sort of quick apps that help me with stuff.
- 13:24One small example of one that I built before is
- 13:27I was prepping for a trip to Japan.
- 13:30And I actually grew up in Japan and I speak somewhat fluent Japanese, but I have some sort of pockets of missing skill, particularly in more formal communication.
- 13:40And I was on these text message threads with some of my mom's acquaintances who I don't know as well.
- 13:46I needed to sort of text them in a way that was correct to the context, and I was just struggling.
- 13:51And I was doing all these chat GPT chats to try to help me with the translation, and it was really helpful.
- 13:57But I kept hitting these really annoying chat situations where I would be like, that sounds too formal.
- 14:01Make it sound a little more casual.
- 14:03Like, that sounds too casual.
- 14:04Make it sound a little more formal.
- 14:06And so what I did in the end is I made this UI tool
- 14:10that you can do a translation and then there's a little slider to adjust how formal the translation should be.
- 14:16I love that.
- 14:17And that was just way more way easier, way more fun.
- 14:20And it sort of encapsulated a lot of the wisdom of the system prompt I had been iterating on in a nice GUI tool that I could then just whip open whenever I wanted.
- 14:29And so that's sort of what I mean when I talk about these little helpful software tools that I wish existed just for me.
- 14:36Right.
- 14:36And so that's, that's, I think the kind of thing that would be fun to try to, to build together.
- 14:40Okay, cool.
- 14:41Well, let's find it.
- 14:42Let's find a tool to make.
- 14:43Like, I know you have some ideas.
- 14:44I've got some ideas.
- 14:45Why don't you start and we'll just kind of go back and forth until we find something we like.
- 14:49Yeah.
- 14:49So, um, one idea I had was I'm a guest on your podcast right now.
- 14:54And so what's like a utility that I would want to have while I'm a guest on your podcast.
- 15:01Um, and you know, I could imagine like, um, maybe there's like a,
- 15:05time bar that kind of shows me like how are we doing on time and so I have an ambient awareness of pacing sort of like you can imagine it's like keynote presenter mode but specialized to being a guest on your show maybe there's a checklist of like topics we want I want to make sure I hit with you and I can check them off so I have like this aid I don't know if there's stuff maybe as a host do you have ideas for what you might want?
- 15:26Yeah, let's ideate a little bit because I think you're onto something.
- 15:29This podcast is sort of unique in that ChatGPT is its own...
- 15:34It's a guest in certain ways or it's a part of it.
- 15:38And I'd really love to bring it in even more.
- 15:41Where like, for example, one thing that I think would be really useful, I often find myself...
- 15:48like wishing that we had a live transcription that could then get easily fed into ChatGPT and have ChatGPT like respond to what's being said.
- 16:00And I don't know if you feel like equipped to do that or if that would take too long, but something like that would be like really helpful because I'm often sort of like –
- 16:11As we're talking, I'm often writing stuff into ChattyBT and then being like, this is what they said, what do you think, basically?
- 16:17And if there was an easier way to do that, that would be really helpful.
- 16:21I think one of the constraints is...
- 16:25I would...
- 16:27It would work if it was its own interface.
- 16:29It would be even better if it was inside of ChatGPT somehow.
- 16:32I don't... That's probably going to be like really hard to do.
- 16:34But like just sort of thinking like the... Maybe the minimal thing is like real-time transcription.
- 16:43That's like really easy to either get into ChatGPT or to...
- 16:49Just have GPT give some sample questions or some thoughts in real time as things are happening that could help push us in new and interesting directions.
- 17:00Okay, so two thoughts.
- 17:01First of all, at a meta level, we should get ChatGPT in on this brainstorming session in a second.
- 17:05Let's do it.
- 17:09The moment for chat to get involved is not like when the idea is fully formed.
- 17:13This is a huge part of my philosophy on this stuff is chat GPT is a muse, not an Oracle.
- 17:17So it's not like we will craft the perfect app pitch and then bring it to chat GPT.
- 17:24And then in one shot, it will generate the perfect app.
- 17:26And then we're done.
- 17:29It's like a designer or an engineer.
- 17:32The earlier you bring them in, the more they can contribute to the ideas and the more context they build up.
- 17:36And so we should do that.
- 17:38Second brief thought is this is actually getting to one of the hardest parts of this process that I think is least well served by ChaiGPT currently, which is you asked me, could we do this?
- 17:50How hard would it be?
- 17:52And...
- 17:54I'm a programmer, and so I have a lot of context in my head for helping to assess very quickly, on a scale of 1 to 10, how feasible is what you're thinking of.
- 18:04And I think one of the biggest challenges that chat isn't as good at yet is helping people who aren't programmers figure out...
- 18:13How hard is this going to be?
- 18:14Is it even like possible?
- 18:17And so when when I build these apps myself, currently there's a lot of that that background knowledge I have feeding into the process and helping it along.
- 18:24And so one thing I'm excited to explore in the future is can we make these tools better at you know, basically telling you, actually, Dan, that's that's that's not a good idea.
- 18:33Like, I get it.
- 18:33It would be cool, but it's it's just going to be too much work.
- 18:36How about let's try this other thing instead?
- 18:37That's what senior engineers do.
- 18:39Right.
- 18:39So that's the process going on right now in my head that.
- 18:43I think you're totally right.
- 18:44And it's something that I see in my course as well as like people just go into these like people get grand visions.
- 18:50They have these big ideas.
- 18:51Right.
- 18:51And that's what motivates people to build stuff.
- 18:54And I'm constantly sort of like being like, OK, your practice is to figure out what is the core smallest thing you can do and just do that.
- 19:03And, and use that as a stepping stone to like build the more complicated thing later.
- 19:07But like the big failure mode for people is they like try to do something way too big at the beginning.
- 19:11And then they're like, well, this isn't going to work or whatever.
- 19:13And they just get lost in this rabbit hole and finding, finding that little small thing that's useful to start, even if it's not your big vision is like the best way to build stuff.
- 19:22Yeah.
- 19:23And this is classic lean startup sort of iterative, agile thinking.
- 19:29And the really cool thing is chat can lower those iteration cycles so much.
- 19:34So I was prototyping a game at a hackathon earlier this year, and
- 19:39I was just trying to have fun at this hackathon.
- 19:41I wasn't trying to work hard.
- 19:43And I wanted to prototype different ways the game could feel.
- 19:46And so I would just say to chat, what if the car moved this way?
- 19:49And then I would go off and talk to people, come back five minutes later, I have a new game.
- 19:53I play it and I'm like, oh, that sucks.
- 19:55Let's do it this other way.
- 19:57I think it's doubly important when using ChatGPT to realize like the superpower you have now is that iterations are fast.
- 20:05It's not that chat always has the right answer.
- 20:07It's that getting a new alternative is much faster.
- 20:10And so your goal as a person driving it is to take advantage of that.
- 20:16Iterate really quickly and try a bunch of stuff really fast and then respond to it yourself and sort of see where it goes.
- 20:23So I think we should try that.
- 20:24Like one thing we could try is just starting with a very minimally scoped app that has like a clock on it or something.
- 20:30And then we'll see that working and sort of like we'll have more ideas, you know, riffing on that and sort of we'll just go from there or something.
- 20:36Let's do it.
- 20:37I love it.
- 20:38Let's do it.
- 20:38So here we are.
- 20:39We're in ChatGPT and we're going to get started coding this little app.
- 20:44And I want to point out, I got super excited about this whole real-time transcription thing.
- 20:50And I think you're kind of like, that's probably a little too big to do live in.
- 20:55I don't know, we have like 30 or 40 minutes.
- 20:56I think that's just such a really important thing to note is that...
- 21:01This happens all the time in programming.
- 21:04It's a normal thing to be like, I've got this amazing thing.
- 21:08And then to be like, no, no, we got to pair it back to something that's useful that we can do in the time we have.
- 21:14And then we can add more later.
- 21:16Yes.
- 21:17And so I think we should start with a super small thing and expand out from there.
- 21:22And that's something that, by the way, you know...
- 21:25What I'm always thinking about with my system prompts for chat and tools around this stuff long term is people don't just need help programming.
- 21:32They need help with product management and scoping and coming up with the right ideas to solve the problem and design.
- 21:38And ChatGPT can help with all that stuff, too.
- 21:41And that's really important to remember.
- 21:44So lead us off.
- 21:45So how are we going to get started?
- 21:47What are we trying to build?
- 21:48Or maybe the first step is trying to figure out what we're building with ChatGPT.
- 21:52Tell us how to get started.
- 21:54OK, so we're just going to use this custom GPT.
- 21:57I actually just threw this together and put in a system prompt that I like.
- 22:02Maybe I'll show that before we get started using it so you get a bit of behind the scenes.
- 22:05So here's what this bot basically
- 22:12does.
- 22:13It's a helpful AI coding assistant.
- 22:15Make sure to follow the user's instructions precisely because coding is a domain where details matter.
- 22:22And I give it essentially a very specific opinionated stack for the code it's going to output.
- 22:28React TypeScript, Tailwind, this is
- 22:31a very popular set of technologies.
- 22:33It's one that I have a pre-existing template for in Replit, which is this online coding platform.
- 22:38And I tell it, generate all the code in a single file.
- 22:40So basically, it's going to give us some code.
- 22:42And as we'll see, we'll just be able to copy paste it into Replit and see what it does.
- 22:46So this is really important to constrain what it's doing in a particular technical way to get output that we can work with easily.
- 22:55I'll note, by the way, copy-pasting code from chat GPT to other IDEs is not the best workflow in the world.
- 23:02It's obviously not how these tools should work in the future.
- 23:04It's just a duct tape together way that you can do it right now that I like to use for quick experimentation.
- 23:09Yeah, that makes sense.
- 23:10Now, let's talk a bit about the workflow.
- 23:12So I think this might be the most important part of the prompt.
- 23:16Yeah.
- 23:18is so you get an initial idea from the user.
- 23:22Part two is absolutely critical.
- 23:24Ask the user for clarification on parts of their idea that are underspecified.
- 23:30People, so we'll see this play out in a second.
- 23:34We're going to ask it to make an app, and our idea is going to be vague.
- 23:39And what we don't want is for chat to just run ahead and make up a bunch of stuff and like, you know, make guess what we mean.
- 23:47We want to be in a conversation where it's going to ask us for help and clarification, and we're going to clarify what we mean together.
- 23:54Then once ambiguities are resolved, we're going to proceed.
- 23:57We'll make a plan for how the code is going to work first.
- 23:59That helps it generate correct code.
- 24:01And then it's going to write the code.
- 24:02Okay.
- 24:02So that's the basis.
- 24:03That's really good.
- 24:05So I'm curious, like how well in your experience is this, how good is this at following this workflow once you have it in your custom instructions for this GPT?
- 24:17I've done a bunch of iterations on this prompt over time.
- 24:21My experience has been that asking clarifying questions, it's really good at that.
- 24:26I'm always amazed at how helpful as clarifying questions are.
- 24:29The hardest task that it's not so good at is...
- 24:33Knowing when to ask you to clarify something or whether to just fill it in itself.
- 24:39I try to resolve that by saying if there's some minor ambiguities, just make assumptions about what the user means and tell the user how you're filling them in.
- 24:49But sometimes it'll just barge ahead too quickly and other times it'll be too conservative and asking for too much input from me.
- 24:55It's like, you know, if you're an employee and you have a manager and you're trying to figure out, you know, what are the things I need to ask them about versus I can just go do myself.
- 25:03It's that dynamic, right?
- 25:05That makes sense.
- 25:07I'm super curious to see how this goes.
- 25:09All right, let's see how it goes.
- 25:11So I'm going to kick us off with my goal, which is I'm going to say I'm appearing as a guest on a podcast.
- 25:20I want an app that I can have open while I'm on the show to help me keep track of time and remember what I want to say.
- 25:36OK, so great.
- 25:37We're getting clarifications live.
- 25:39And I'm starting to read them and think through my answers.
- 25:46So time tracking.
- 25:49Maybe I'll just keep going and answer these questions.
- 25:51OK, great.
- 25:52So we got answers.
- 25:53Let's go through one by one.
- 25:55And I'm going to think through my answers to these questions.
- 25:57So first, time tracking.
- 26:00It's saying, do I need a simple stopwatch or a countdown timer?
- 26:03So I'm just going to say I want a progress bar.
- 26:07or I'll say like digital clock plus progress bar going from 9 a.m. to 10 30 a.m. Now, one really neat thing is we don't need the app to have a place to set the time start and end because it's an app literally just for this one appearance on this show.
- 26:22And I'm with you today this morning from 9 to 10 30 a.m.
- 26:25So that's going to be hard coded into the app.
- 26:28Right.
- 26:28That's what part of the femoral software.
- 26:30We don't need extra information.
- 26:32extra stuff.
- 26:33Um, preload notes or add and edit notes during the podcast, I guess like, um, preloading is fine.
- 26:39And by the way, I'm using, um, we have a notion link with notes.
- 26:43It'd be cool if it could display that.
- 26:45Oh yeah.
- 26:46Um, should it be able to show, show the notion link or do you copy paste in Markdown from the notion?
- 26:51What do you think?
- 26:53I mean, ideally, it shows the notion in an iframe or something like that.
- 26:58Oh, yeah.
- 26:59Okay.
- 27:00So it's funny.
- 27:01You just used the word iframe.
- 27:04So that revealed that you are thinking on the technical side of this too, right?
- 27:08And I think...
- 27:11We might want to linger there for a second, and this is another instance of what I said earlier, where having background knowledge about programming is a huge accelerant to this process right now.
- 27:19And the reality is this workflow we're doing, in my experience, doesn't work that well for people who have zero programming experience yet.
- 27:28I want to build tools that help get us there in the future, but it's interesting.
- 27:34Uh, we have our notes in notion.
- 27:38Um, maybe we could show those, um, embed those somehow, um, or copy paste them.
- 27:48I'll let chat sort of make a call on how to sort of do that.
- 27:51Yeah.
- 27:52I like that.
- 27:52Um, styling or layout preferences.
- 27:55Um, I like giving it a vibe here.
- 27:57One vibe I had in my mind is I kind of liked the keynote presenter mode.
- 28:01So I could just say like simple dark keynote presenter mode.
- 28:07Vibe.
- 28:08Vibe.
- 28:09Simple dark keynote presenter mode vibe.
- 28:10I like because I feel like when you give it vibe, it like kind of knows to be fuzzy about it rather than like very direct.
- 28:16Yeah, for sure.
- 28:17Yeah.
- 28:17um by the way quick meta note i'm using the numbers here which is just a great shortcut for like responding directly to each of his things without too much talking um and and by that you mean like it gave you four questions and you're using numbers to exactly i'm just using the numbers one two three four to refer to each of them i don't need to say like for the time tracking thing i want but you know i just reduce extra words right that's actually i didn't know that
- 28:43Number four, any other features?
- 28:45I think that those, we could have cool ideas in the future, but I'm just going to say not yet.
- 28:50Start simple.
- 28:52All right, so let's go.
- 28:56See what we get.
- 28:57So it's going to do the plan first.
- 29:02The plan, this is really important.
- 29:05If you have it generate code without a plan, it tends to get stuck in weird like corners that it can't get out of.
- 29:12And having it generate a plan first, just like, you know, a real human engineer doing any coding work, having a plan first really starts.
- 29:22So let's see.
- 29:24One thing that's interesting is for the notes section.
- 29:28It's suggesting a text area where notes can be copy-pasted rather than doing the embedded Notion iframe thing.
- 29:33So that's an interesting decision it made.
- 29:37Absolutely is.
- 29:39We don't know why it made that decision.
- 29:40Presumably, it's because it's easier.
- 29:43We can push it towards the embed later.
- 29:44It is nice that...
- 29:46I like having this early sort of planning section because it's a quick way to see what it's about to do.
- 29:50So we don't need to like...
- 29:52try to read the code.
- 29:52We can just, you know, it's writing a spec document as a product manager that we get to look at.
- 29:58And this all looks pretty good to me.
- 29:59Current time, progress bar, copy paste text area, a read only mode to avoid accidental edits during the podcast is kind of a fun idea.
- 30:06We'll see if it incorporates that.
- 30:09Now, let's see.
- 30:10The second thing it did is a pseudocode plan.
- 30:13As a programmer, this is really helpful for me because I can actually look at this and see if there's anything that looks like it's going to need to be fixed in there.
- 30:24So while it's writing the code, we can review that.
- 30:30And it's not just useful for you.
- 30:33I think it's also useful for ChatGPT to write out the product spec, write out the pseudocode, and then actually write the code.
- 30:42And in the same way that it's useful for a programmer to write pseudocode, I think it's useful for ChatGPT so it doesn't go off the rails.
- 30:48It can plan what it's going to be doing and all that kind of stuff.
- 30:51Yes, absolutely.
- 30:53My general philosophy about this is...
- 30:57Just, yeah, just like humans need to plan the right amount for the magnitude of the task.
- 31:01Like, as a skilled programmer, I can go do a super quick bug fix or tiny feature without writing a whole doc explaining what I'm going to do.
- 31:09But if I'm going to spend six months on a huge project, I better have a plan when I start.
- 31:13And so I think similarly about, like...
- 31:17I try to calibrate my sense of how good is ChatGPT at this task.
- 31:21And the worse it is, the more planning is going to be needed up front and the more coaxing to make sure we sort of gently approach the goal.
- 31:29And so coding for me, this is sort of the right level of planning, I think, for this.
- 31:34You know, this is not a huge app.
- 31:35It's a tiny, tiny little thing.
- 31:36So I think we haven't needed that much iteration.
- 31:39Okay, so we got this code.
- 31:41I'm not going to read it.
- 31:42I never read this stuff.
- 31:44I just cut the place and go.
- 31:45Why don't you read it?
- 31:46Tell me why.
- 31:47It's a waste of time.
- 31:48Why would I spend time reading this?
- 31:51Yes, I can read this, but it's dumb.
- 31:53I would rather just see what it did and use the thing.
- 31:56That makes sense.
- 31:57Maybe I'll read it later.
- 31:58Okay, and you're flipping to Replit.
- 32:00So explain to us what this is, what Replit is, and how you got, what are all these files?
- 32:05Give us a background.
- 32:06Okay.
- 32:08Yep.
- 32:08So Replit is an online coding environment where you can set up a quick environment to run any kind of code, and then you can edit it in your browser and have it running.
- 32:22And I can also share this link now with other people who can collaborate with me in this coding environment and use the sort of resulting application.
- 32:32The reason I use it is because it's...
- 32:34It's just one quick way to get running without a bunch of fuss and ceremony.
- 32:39And before this interview, I set up just a little template that has sort of the tech stack that I told ChatGPT to use.
- 32:49It's pre-installed here and ready to go.
- 32:50I can share that as like a template with you, you know, as a link or something.
- 32:54But that's all I have going on here.
- 32:56That's really interesting.
- 32:57And I just want people...
- 32:59anyone who's non-technical who's watching this to realize, like, this might look complicated.
- 33:05But A, Replit is, like, it's very templatized.
- 33:07It's very easy to just click a button and get something that looks like this and know where to paste your file.
- 33:12And B, like...
- 33:14you can actually, like everything that we've done so far is pretty natural language.
- 33:19You can actually get this far even with very little programming knowledge.
- 33:24And so if it feels intimidating, it's really not that hard.
- 33:29And I think that's one of the wonderful things about this.
- 33:33So with that, let's paste in our code and see what happens.
- 33:36I'm just pasting from chat GPT.
- 33:38This should update live this little window here.
- 33:44Oh my god.
- 33:46Look at that.
- 33:48Look at that.
- 33:49So it has the time.
- 33:52It's correct.
- 33:52The time is the current time.
- 33:55It's going from 9 to 1030.
- 33:57I'm just eyeballing it.
- 33:58That looks right, right?
- 33:59It's 950.
- 34:00That the halfway mark is 45 minutes.
- 34:01OK, awesome.
- 34:03It did the simple dark theme pretty well, I would say.
- 34:08And then let's see.
- 34:09Can we type in this box?
- 34:12OK, it has a box for notes.
- 34:16Pretty good first draft, I would say.
- 34:17What do you think?
- 34:19This is magic.
- 34:19Like, this is crazy.
- 34:21You know?
- 34:21We have to, like, stop for a second and just appreciate how wild it is that we live in a time like this where...
- 34:30Like the amount of time and knowledge and effort that it would have taken just a year ago to do the same thing is sort of like mind blowing.
- 34:40It's like stunning how different this is.
- 34:44Like obviously the code that the eventual code that has been written by ChatGPT is like not that hard to write for like a senior programmer or whatever.
- 34:50But like still, you know, it might take an hour or two or whatever, even for even for someone who knows what they're doing.
- 34:57And this did not take an hour.
- 34:58It took five minutes.
- 34:59And it also didn't require a senior programmer to do.
- 35:04You didn't write any code.
- 35:05You didn't even look at the code.
- 35:06You literally just typed, here's kind of what I want.
- 35:08It asked some clarifying questions.
- 35:10And now you have an app that the thing I love about this is it's styled and it has this cool progress bar that updates live.
- 35:16That's crazy.
- 35:17Yeah, it's so exciting.
- 35:18So I want to analyze this from...
- 35:21On the one hand, I couldn't agree more with you.
- 35:23It is so cool and exciting.
- 35:24Even for me as a programmer, like you said, I wouldn't have spent the time to make this thing.
- 35:28And the fact that it's 10 or 100 X faster for me to make increases the number of things I'm willing to make.
- 35:34So it's really exciting.
- 35:35And, you know, definitely.
- 35:36So that's awesome.
- 35:38I will note, like, again, um...
- 35:41We're going to push it further and see where the limits are now.
- 35:44But we operated within a simple starting point.
- 35:49And as we push this thing further, we're going to hit more challenges.
- 35:53So we haven't solved all the issues yet.
- 35:55But I agree, it's a very exciting starting point.
- 35:58One little thing I'll point out that's interesting about this app right now is an example of some of the drawbacks.
- 36:06This stack that I tell ChatGPT to use as my simplest sort of micro app stack, it doesn't save your data at all.
- 36:13So actually, if I reload this, and let me, I can open this in a new tab.
- 36:17So here's the app full screen, I guess.
- 36:21And I can have notes here.
- 36:23But if I ever reload, they're lost.
- 36:25So that's...
- 36:28I know that limitation as the person who put together this tech stack.
- 36:32And one of the reasons I chose that stack is intentionally because saving data often makes apps way more complicated.
- 36:39Now, I have other stacks I can play with that I haven't set up for this that can save the data.
- 36:46But when I'm thinking of ideas in my head, I'm thinking a lot about like, how can I scope this thing so I don't need to have that technical complexity?
- 36:54And that's a that's a skill that, you know, engineers and PMs, you drill a lot, but normal people haven't thought about as much.
- 37:00So, you know, I think it points to both.
- 37:04Of course, you know.
- 37:07In another version of this, we should have a GPT that can make apps that can store data.
- 37:13That's a no-brainer.
- 37:14But there's a broader point, which is this negotiation of complexity of implementation and requirements is a delicate dance that we're going to have to work towards better tools that help people do that.
- 37:27I think you're right.
- 37:27I also will note.
- 37:29So one is so definitely like saving state and doing logins and authentication, for example, are some of those things where you're like, yeah, that's that's a little bit more complicated.
- 37:38Two, I think that those things are getting easier and easier over time.
- 37:43And, you know, I can imagine because this is a single use app, you don't even need a database.
- 37:46You can just save something to like a notes file or like save it in local storage or whatever.
- 37:51So I think that that makes it easier.
- 37:52But there are also services like Supabase or all these other things that it just makes it super, super easy to interact with the database.
- 37:59And what I don't want people to come away with is the idea that like...
- 38:04I think you're right.
- 38:05There are all these like hidden corners that you can see, or maybe I can see that we know, okay, like saving say, it's going to be like hard.
- 38:13So we're going to scope away from that for now.
- 38:15And that definitely saves us time.
- 38:17But even if you're someone who's using ChatGPT who doesn't know that, um,
- 38:22you're going to find that out because you're going to be like, hey, can we save state?
- 38:24And then you're going to get stuck for like four hours.
- 38:27And that's actually the only way to learn.
- 38:29So it's actually not bad that you don't know that.
- 38:32It's just that like, I think what you're actually saying is not that like normal people who don't have a lot of programming experience can't use ChatGPT for this.
- 38:39Like they can.
- 38:40It's just, it will take them longer and they will run into like problems.
- 38:44It's not like ChatGPT is going to solve every problem for you right now.
- 38:47There are still things that like...
- 38:49experienced developers are going to know and be able to push the chat to do and not do, that is going to save them even more time than for a normal person.
- 38:58But it's still quite useful for someone who has very little to no programming experience.
- 39:04It just, yeah, it sometimes is not going to solve every problem for you, just some of the problems.
- 39:09Yeah, that's a great point.
- 39:11I'm not trying to discourage anyone from using this workflow if you don't know how to program.
- 39:14It's just be curious.
- 39:16Ask for how hard it would be to do various things and try to get those answers.
- 39:21One quick plug I'll give is the research I'm doing.
- 39:23So I work at an independent research lab called Ink and Switch, which has pioneered a software architecture called Local First.
- 39:32which has a bunch of interesting benefits for users like data privacy and ownership.
- 39:36But actually, one of the most interesting benefits for this use case is that we're trying to make it really, really simple to make an app that stores your data, can sync it with other people where you can share data, have it all saved privately.
- 39:42And, again, we're trying to make it really simple to make an app that stores your data, can sync it with other people where you can share data, have it all saved privately.
- 39:50And that shouldn't require setting up some server that you have to run and like thinking about like operations.
- 39:56It should literally be like one line of code and you're off and running, you're storing data, you're syncing it.
- 40:00And so we're doing a lot of work right now on trying to create an environment based on that local first architecture using a library in which developed called AutoMerge, where when you make an AI generated app, you should be able to plop it into that environment.
- 40:13Instantly, you get authentication, data sync, data storage, all out of the box for free.
- 40:18No servers in the mix.
- 40:19And I'm really excited about that as one specific future thing to, to, um, make it easier to build really full functioning, um, tools that, you know, um, go beyond just a little stateless thing.
- 40:32Right.
- 40:32Um, so that's really one specific example here is that I'm not going to do this today, but in the future, if I have my notes in notion, um, um,
- 40:43Maybe we'll try embedding this thing, but the app should be able to maybe load my Notion notes directly into this view in a different way and access those existing notes I have without me needing to copy-paste them.
- 40:55That's the thing I want for the future.
- 40:57But maybe do you want to keep going with this demo and see if we can get Chachibiki to save our notes in this?
- 41:01Let's do it.
- 41:02Yeah, that would be great.
- 41:03Okay.
- 41:04So let's give it a little bit of encouragement.
- 41:08This is a great start.
- 41:10Always got to encourage the AI in case it takes over.
- 41:14Let's be nice and gain brownie points.
- 41:20But actually, also, I want to tell it that it's on the right track so it doesn't freak out and totally redo everything.
- 41:29Is there some way we can save the notes that we've entered in the browser so they don't get lost when we reload?
- 41:40And I want to point out, that's a question that anyone can ask.
- 41:43I'm sure you have some thoughts about the way that it should do this, but we'll see how good ChatGPT is at finding the answer that you would have gone with.
- 41:54Exactly.
- 41:55And it said certainly it said an answer.
- 41:58It's going to say we're going to save them in local storage.
- 42:01As an engineer, I know that that's a perfectly fine way to think about it.
- 42:04And then it's just going to output all the new code.
- 42:06So generally for little tools like this, I just tell it the system prompt, I think, says to just output the entire new code.
- 42:16And that's really like the simplest thing you can do.
- 42:18And it's nice because what I'm going to do is just copy this and paste it into Replit again once it's done.
- 42:23And we'll see what it changed.
- 42:25Sometimes for larger things, I like to tell it a different prompt, which is to generate minimal edits and only tell me the parts that change just because it's faster.
- 42:35But that is a little bit more annoying because then you actually have to like start thinking about where you're copy pasting.
- 42:40And that can be a bit annoying.
- 42:43OK, so I pasted in the new code.
- 42:45There's no visual difference.
- 42:47I'm going to reload to make sure we got the new version.
- 42:49These are my notes.
- 42:51OK, let's reload.
- 42:55It worked.
- 42:55Amazing.
- 42:57There it is.
- 42:58And if I come over here and reload.
- 43:00Oh, my God.
- 43:04Hello.
- 43:05Reload.
- 43:06Okay, the notes are saved.
- 43:08That's amazing.
- 43:09That's amazing.
- 43:10And one thing that we should be clear on, like, that website is live.
- 43:14Like, you can send me that URL and it's live.
- 43:16It will not save the notes.
- 43:17I'll have my own version of the notes.
- 43:19So we each have our own notes rather than there being one page.
- 43:23common note that which is a an important detail to point out you know it's funny too you just again used your programming knowledge to to say that um you know we could have also asked chat like um does everyone using the app share one notes saved or does everyone have their own um okay so every user has their separate and unique set of notes great
- 43:48Okay, so I just...
- 43:50There's something really interesting going on here for me.
- 43:54This is such a different way of thinking how to build programs, not because it's just AI built, but like...
- 44:01for example, having everything be in one file or saving things locally is just, it's a different paradigm from the current way that we build SaaS apps where it's like microservices or like breaking up into modular components and like having databases and authentication or whatever.
- 44:23And it's like,
- 44:24It's this fundamentally new thing that is only possible because you want to build bespoke apps for small use cases that are used by single people.
- 44:35And that's actually just like a new world that is starting to blossom a little bit that we don't know where it's going to go.
- 44:43But I just want to underscore for people how much...
- 44:46Okay, so there's this new workflow, which makes people incredibly more productive.
- 44:51It gives people who can't code the ability to build stuff.
- 44:53So it's taking people from zero to like 10, right?
- 44:57And then it also takes people who can build stuff and it makes them...
- 45:02I don't know, 30% faster or whatever.
- 45:04But I think what's really important that you mentioned earlier is it's not just about a speed upgrade.
- 45:10It makes it possible for you to build things that you just wouldn't have put the time into before.
- 45:15You just wouldn't have made this before at all.
- 45:18And so maybe you make 10 or 20 more things in the world per year because of this that you wouldn't have made previously.
- 45:23So big performance workflow difference.
- 45:26But then also it's like,
- 45:28It's a different kind of software.
- 45:30It's just a different, it's a new thing.
- 45:32It's, there's, there's something coming now that's different from SaaS that is enabled by exactly this stuff.
- 45:38And we're just starting to see what it's like.
- 45:40And this is like, this is like the, the, the earliest inklings of that.
- 45:44And it's so cool to see it.
- 45:47Exactly.
- 45:48One thing I love, you know, if you look at this app, it's so simple.
- 45:52It has nothing I don't need because we're building it up from zero.
- 45:55And I've been finding in these building these little tools for myself.
- 45:59One question you might ask is like, wouldn't it be better to go find some existing app because someone else who's better or who's either, you know, more skilled than you at coding or design or has just spent a lot more time thinking about it?
- 46:11Maybe there is a podcast guest like app out there or something.
- 46:14I haven't looked at it.
- 46:16But in my experience, a lot of the time, it's actually faster now for me to just make the thing that has the tiny features that I need than to go try to Google which one is the best and learn how to use it.
- 46:28And I love the pared down, nothing is there unless I specifically added it quality of these micro tools.
- 46:36Yeah, that's really cool.
- 46:37You know what this reminds me of?
- 46:38Have you been looking at what Jason Fried and DHH are doing at 37signals?
- 46:44They have this new, I guess, software company underneath 37signals.
- 46:49It's called Once.
- 46:50And basically, it's like,
- 46:53It's on-premise software for consumers.
- 46:56It's like they're making some sort of app for prosumer business people, where when you buy it, instead of paying a SaaS fee, you pay once, and then you get all the code.
- 47:06The code is not minified or bundled or whatever.
- 47:08It's just like this.
- 47:09It's mostly in one or a few files, and you can read it.
- 47:12And it's owned by you, modifiable by you.
- 47:16And I think they're sort of like, I think you're pushing this forward from a research direction, like what's possible to enable this stuff?
- 47:22And they're already sort of thinking about, okay, how do you commercialize this new kind of software?
- 47:28How do people pay for it?
- 47:29And all that kind of stuff.
- 47:30I think that's really interesting.
- 47:32Yeah, I love that sort of direction.
- 47:36And in my research at InconSwitch, we're pushing towards, again, this new kind of software distribution platform where you own your tools and you have the capability to modify them.
- 47:47That's another quick point I want to make that's really important to me is that...
- 47:50Starting from zero and starting from scratch isn't always the ideal workflow.
- 47:54Often what I actually would prefer is to start with an app that someone else made that's almost right, but I just need to make a small tweak.
- 48:01That's something that's much harder in today's software world, because often, like I said earlier, you're not allowed to make that tweak.
- 48:06You can't do it because of infrastructural reasons.
- 48:08And so what I'm showing here is kind of like the
- 48:10the easy path that works in the current world, which is just to start over from scratch.
- 48:14But I think actually in the future, there'll be less starting over from scratch and more sort of modding and remixing.
- 48:19And that's gonna be possible once, imagine I send you this replit link, you can look at, you can actually take that code.
- 48:27One thing I do sometimes in chat is like,
- 48:30You could make your own ChatGPT session with this bot and say, hey, I'm starting from this app and paste in the code and say, what I want to do is add this other feature and it will just keep pick up that process where I left off and it's in your hands now.
- 48:46And someone else might do it.
- 48:48Yeah, do you want to try it?
- 48:49Let's do it.
- 48:50Okay, so do you want to simulate it where I make a new chat, basically, or do you actually want to do it?
- 48:55No, no, no, I want to do it.
- 48:56Okay, okay, yeah, yeah, yeah, let's do it.
- 48:59I love that.
- 49:00So send me the REPL, and then I need a link to your custom GPT, so I have the same stuff.
- 49:08Yes, so, oh, this is going to be fun.
- 49:11So we got the REPL.
- 49:13Cool.
- 49:15So you should be able to see my screen now, right?
- 49:18Yep.
- 49:19Okay, cool.
- 49:20So, okay, so you took that REPL that you just made and the REPL is this, is basically just all the code we wrote with ChatGPT and you sent it to me.
- 49:28And what's really cool is with REPLit, like I can either press run and it'll just run it for me.
- 49:34And that's really great.
- 49:35Like this is a live thing that's just running on the web right now, or I can just press fork and I can make podcast guest Dan's version.
- 49:47way better than the old version.
- 49:51And then I can press fork.
- 49:53And now I have all of the code that you wrote with ChatGPT.
- 49:59And it's somewhere.
- 50:00Look in the source.
- 50:02It's in source.
- 50:02OK. App.tsx.
- 50:05So it's right here.
- 50:06And that might be a thing that would take you a little while to figure out.
- 50:10But again, you could just throw all of this folder structure into ChatGPT, and it would be like, this is probably where the code is.
- 50:18And so now we've got to figure out what we want to do.
- 50:20We have this sort of initial thing that has a timer and has a note section.
- 50:33Okay, let's brainstorm a little bit.
- 50:35One thing we could do is we could have a little window that takes the notes and then asks GPT-4 to come up with sample questions.
- 50:49Ooh, yeah, that's ambitious.
- 50:52I'm into it.
- 50:54I mean, I think that's pretty doable, right?
- 50:55Because like, I mean, really all we're going to have to do is like take the notes.
- 51:01Well, maybe we should ask ChatGPT, but like take the notes, send them up to GPT-4 with a little prompt, and then just display the answer somewhere.
- 51:10Yeah, I'm into it.
- 51:11I think we should try it.
- 51:11Yeah.
- 51:13I think applying, again, my engineering knowledge, the challenge is going to be making sure we finesse the API call to OpenAI correctly is something that I sometimes find is working with APIs can be a bit challenging because...
- 51:31APIs change, it might not know about the latest format.
- 51:34Something that's going to come to mind is it's going to be really helpful if we give it like a successful example of an app that actually did a good job calling the OpenAI API.
- 51:44So we could try that pattern of I could send you a link to another REPL where I've already done a good OpenAI call and we could tell it like use this app as sort of like a sample.
- 51:53Well, what I want to do, I mean, the way that I usually get around this and I think you're thinking about exactly the right stuff is...
- 52:01is just paste the GBD4 API docs in there so it knows how to call.
- 52:06Let's try to get that right there.
- 52:08I should have web browsing, but let's just try it.
- 52:10So I'm going to say something like, and you tell me if I'm doing something wrong, but I'm going to say something like I have a web app that I use to track my podcast recordings as I'm doing them.
- 52:26and I want to add a feature.
- 52:29Here's the code I have so far.
- 52:31So I think just giving GBT the context is probably pretty important.
- 52:37Yeah, absolutely.
- 52:38So I'm just going to throw it in there and see what it says.
- 52:45Yeah, so, okay.
- 52:46I want to add a button.
- 52:48So it's basically saying, great, I see you have a basic web app for tracking podcast recordings.
- 52:52Could you please specify what feature do you like to add to your app?
- 52:56I want to add a button that says generate questions where
- 53:03given where it takes the podcast notes and then sends them to GPT-4 and displays the list of questions that GPT-4 returns.
- 53:22And then the little note here is...
- 53:27When you're working with APIs, as you said before, and an API is like, it's the GPT-4 service, right?
- 53:33The GPT-4 service has a way that you interact with it.
- 53:37And that changes over time as they make updates.
- 53:39And ChatGPT is like not always aware of all those changes.
- 53:43So the best way to work through that is to just go to openai.com or wherever the API is and look at the documentation for the API and just give it to...
- 53:56just give it to ChatGPT so it knows, okay, here's actually how we call the API.
- 54:08So let's see.
- 54:10I think this is going to be good.
- 54:13So I just found an example of how...
- 54:18how the GPT-4 API is structured.
- 54:21And I'm just going to paste it.
- 54:22One quick note is you just copied some Python code, Dan, and we're in JavaScript.
- 54:25So that's a mistake.
- 54:27I'm just used to, I'm used to working in Python.
- 54:30You know, this is a thing that like, again, if there's some programming knowledge to even know which of these things to copy, right?
- 54:37But I think a node one is going to go better.
- 54:39Yeah, that's going to go better.
- 54:41Okay, so thank you.
- 54:42Good note, good note.
- 54:43I'm just going to paste it in there and see what it says, see what it does.
- 54:55So basically it's saying, okay, it's reflecting back to me.
- 54:57Here's what I think you want to do.
- 54:59Add a button to the existing UI, create a function that sends the notes to GPT-4, and then display the received questions in your app.
- 55:05And then it's creating a plan.
- 55:07So add a generate questions button, create a function that takes the current notes, sends those notes to the OpenAI API, and handles the API response to extract the questions.
- 55:17create a new state variable for storing the questions and update this state with the received questions, then show the questions in your UI.
- 55:24That all sounds like pretty reasonable to me.
- 55:28And I'm going to do what you recommended and just copy paste.
- 55:32Yeah.
- 55:32Yeah, quick warning.
- 55:34It did something interesting, which is that it elided some code.
- 55:38It said existing code in a few spots.
- 55:41So it actually hasn't given us a full new file that we can just copy-paste.
- 55:46I would recommend just telling it, don't omit existing code.
- 55:50Just write a full file that I can copy.
- 55:52Let's see if that does that better.
- 55:57And we're also going to have to set our API key, which it's reminding us to do.
- 56:00And I have an API key I can use.
- 56:03And for people that don't know, the API key is just, you have to identify who you are when you make requests at GPT-4 so that OpenAI knows who to charge.
- 56:13And so you have a key.
- 56:15This is another good example of a tricky thing where I can see a problem in this code already, that it's going to try to use an API key from assuming that it's running on a server.
- 56:27Because OpenAI, usually their docs assume you're running like a server that's querying them.
- 56:32Whereas in this case, we're running an app in a browser and we have to set up the API key a slightly different way.
- 56:37That's like kind of a...
- 56:39That's a subtle thing in some ways that can trip you up if you're not aware of that.
- 56:44Right.
- 56:45And again, it's one of those things where we can try this.
- 56:48We'll see what error we get and we'll throw it into ChatGPT and see if it can solve it.
- 56:51If not, we'll just solve it so we can skip to the fun part.
- 56:54But you're right.
- 56:55There are these little micro moments where it's like, it's not quite right.
- 56:59And it's helpful to have some sense of what you're doing so that you can catch those things.
- 57:05Like you said, it's...
- 57:07If you don't know what you're doing, you can just see what happens and tell it to fix it.
- 57:13So it's often fine.
- 57:15It's just that if you know what you're doing, you can avoid some rabbit holes and make faster progress.
- 57:21All right.
- 57:22So here we go.
- 57:22We're going to copy the code.
- 57:25We're going to copy the code.
- 57:26We're going to hold our breath.
- 57:28We're not going to read the code.
- 57:31And we got an error.
- 57:34Okay, so we don't have the OpenAI thing installed.
- 57:38So I know what to do.
- 57:43Sorry, this is a JavaScript.
- 57:45You don't want that.
- 57:46Probably NPM install.
- 57:48OpenAI will do it.
- 57:50So I'm just like, I'm sort of perverting to my Python.
- 57:53What did you say?
- 57:56We probably could have asked chat how to fix it as well.
- 57:58We could have asked that, yeah.
- 58:00That's true.
- 58:02I'm getting impatient.
- 58:03I want to get to the magic.
- 58:06So here's what we're going to do.
- 58:07We're just going to copy this error and paste it in to ChatGPT and see what we get.
- 58:16Typically occurs when environment variables are not accessible in the client-side JavaScript.
- 58:20This is common in projects with Vite as it doesn't automatically make environment variables available in the front end.
- 58:26This is a good example of where it's telling us some stuff.
- 58:30We could do it this way.
- 58:32I think that it's going to be a pain to set it up this way.
- 58:37One thing I'm thinking about is, so you could just hard code an OpenAI key right into the code here.
- 58:43Now, we need to be careful because there are security issues here.
- 58:47Like now, if you were to share this repl link, it's possible that anyone who uses it would get to use your OpenAI key, which is a big problem.
- 58:55You just need to rename the replic secret you set to be V to OpenAI.
- 58:59Match that, okay.
- 59:00This is a good example of annoying programmary stuff that shouldn't be necessary to do.
- 59:06But let's try that.
- 59:09All right.
- 59:10Running again, holding our breath.
- 59:12This is how these things really go, you know.
- 59:14It's...
- 59:15It doesn't always work the first time.
- 59:16That's a part of the process.
- 59:18I think that it wants you to put API key around the API key, like in the error message.
- 59:26It says, yeah.
- 59:27Again, we probably could have given that to Chad and had it help us with that.
- 59:31But we're running out of time here.
- 59:33Yeah.
- 59:34We need to set dangerously allow browser to true because it doesn't like querying it from the browser.
- 59:40But that's OK. We're making a little app just for you.
- 59:44So it's going to be fine.
- 59:46All right.
- 59:47I'm going to press run.
- 59:50And we're going to move over into our web view.
- 59:53And here it is.
- 59:54We've got a button.
- 59:55It's called generate questions.
- 59:57That's pretty cool.
- 59:58Let's see if it works.
- 59:59Yeah.
- 1:00:00So what I want to do first, we have a bunch of notes for our interview.
- 1:00:03So I'm going to take this and I'm just going to throw it in here.
- 1:00:11We have our timer counting down.
- 1:00:12We can see it with the progress part.
- 1:00:14I know.
- 1:00:15Are we going to make it before the end?
- 1:00:16Okay, so I pasted a bunch of notes, and I'm going to press generate questions, and we'll see what happens.
- 1:00:23Okay, let's see what happens.
- 1:00:24So my guess, my intuition is it's not going to work the first try, but we'll see what happens.
- 1:00:30Have the dev tools open so you can see if it breaks or something.
- 1:00:32It says connected.
- 1:00:33There's no errors.
- 1:00:35Okay.
- 1:00:35This is tricky, right?
- 1:00:36Because we have to guess like maybe it's working and it's just taking a while.
- 1:00:40It's totally possible.
- 1:00:42It could be that it's going to break.
- 1:00:43We just need to find out.
- 1:00:45Oh, here we go.
- 1:00:46We've got questions.
- 1:00:48Wait.
- 1:00:48Oh, that's...
- 1:00:50Okay, wait.
- 1:00:50They made a really weird UI for it.
- 1:00:52So we have questions.
- 1:00:54Okay.
- 1:00:55Here are some prompts to discuss with Jeffrey Lit on your podcast episode.
- 1:00:59After welcoming Jeffrey to the podcast, ask him to give us a brief introduction about himself and what he does.
- 1:01:04Dive deep into ChatGVT use cases.
- 1:01:06We love that.
- 1:01:09Can you highlight some transformations or milestone moments in your professional work due to AI?
- 1:01:13How do you envision the future of AI in day-to-day tasks and professional workspaces?
- 1:01:16That's a good question.
- 1:01:17I really like that.
- 1:01:20you know, I think we don't have time to go too much further on the app right now, but one thing that gets me...
- 1:01:25So one thing I love about this process is I'm responding to what it did, right?
- 1:01:28So obviously this UI is really janky, like it needs some space between the two boxes and we can tell it to do that.
- 1:01:33But also I'm thinking like, you know, maybe it would be nice to see each of these questions in its own little box or something.
- 1:01:40And maybe you could like check them off as you go.
- 1:01:42And that's another idea I just had by looking at this.
- 1:01:46And I think that starts to point towards like,
- 1:01:49Some of the advantages of doing it, so you could have just done this in chat GPT itself and not made an app.
- 1:01:54And I think for what we have so far, it would have been pretty similar because it's just giving you text.
- 1:01:58But the further we push into like custom UI for kind of, maybe you want to reorder the questions and you could have it build a UI for dragging and dropping your questions into a different order.
- 1:02:07All that stuff is what comes to mind now.
- 1:02:09And that's stuff that like, because we're in this custom UI, all of that is possible.
- 1:02:13And those possibilities occur to me in a way that wouldn't if I was just in the chat box.
- 1:02:18Right?
- 1:02:19I think you're totally right.
- 1:02:20I also think that there's a world like, you know, ChatGPT already has Code Interpreter where it can write and run code for you.
- 1:02:27And I really think there's a world where...
- 1:02:30instead of pacing into Replit, especially for these mini one-off apps, you're just using UI that is constructed on the fly in ChatGPT and then modifying it, and then that becomes a custom GPT you can use for a while.
- 1:02:44And you can already see this in the Google Gemini demo for their newest language model.
- 1:02:51It does that inside of Bard, and I really think that's where we're going for a lot of this stuff.
- 1:02:57I totally agree.
- 1:02:58And in fact, I think often people aren't going to even need to ask, make me a UI that does X.
- 1:03:06Really, the bot should just decide when I ask for X, it should just pick the best UI for that task, which might be text or it might be a custom whole thing.
- 1:03:14Right.
- 1:03:14Yeah, totally.
- 1:03:17So this is this is pretty awesome.
- 1:03:20We came up with an idea.
- 1:03:22We built a first version, then.
- 1:03:27You sent it to me and I made some modifications, which now we can send back to you and you can keep going with it.
- 1:03:32You have a bunch of ideas for where to take it.
- 1:03:34This is sort of the future of building stuff.
- 1:03:36And we did it in like an hour.
- 1:03:38And I think that's so incredible.
- 1:03:40I know, it's so fun.
- 1:03:41And we were able to just kind of have fun and talk while we were doing it, right?
- 1:03:44We never got like totally stuck.
- 1:03:46And I think that's the feeling that I want when I'm building stuff.
- 1:03:49And I think that everybody wants when they're building stuff of effortless flow.
- 1:03:53And I'm really excited that
- 1:03:55I think LLM-based tools are sort of on a path to enabling that for way more people in way more situations.
- 1:04:03Yeah, yeah, yeah, 100%.
- 1:04:05So as people are coming out of this episode, they're inspired, they want to go do stuff, they want to learn more about your research, they want to think about the future of where this is going, where do they find you and what should they read?
- 1:04:17Yeah, I have a personal website, jeffrelipe.com, where I post various research.
- 1:04:24I wrote an essay earlier this year called Malleable Software in the Age of LLMs, where I kind of lay out a bit more of sort of the thinking behind this worldview.
- 1:04:31And those are some places to check out more thoughts.
- 1:04:34I'll be publishing more research in the coming year or two on kind of research.
- 1:04:39How do we take this workflow we just did and actually make it really awesome and integrated better into sort of a whole coherent work environment with less copy pasting and sort of less dealing with infrastructure?
- 1:04:51So look forward to that, too.
- 1:04:53Amazing.
- 1:04:53Well, I'm super excited when that comes out.
- 1:04:56I would love to have you back.
- 1:04:57This was incredible.
- 1:04:59I feel just I'm like walking on air right now.
- 1:05:02I guess there's so much good stuff happening here.
- 1:05:05And I really appreciate you taking the time to walk us through this.
- 1:05:09Thanks so much.
- 1:05:10This was really fun.