Can ChatGPT write better SwiftUI code than you?

  Рет қаралды 46,697

Paul Hudson

Paul Hudson

Күн бұрын

In this video I'll show how we can use ChatGPT to generate SwiftUI code that recreates Apple's Clock icon on the Home Screen. I'll then walk you through building the same thing ourselves, so you can see how the two solutions compare.
00:00 Introduction
03:27 Using ChatGPT to write SwiftUI code
06:40 Asking ChatGPT to fix its errors
09:16 Trying what ChatGPT built
11:38 Building the project ourselves
19:10 Adding details to the clock hands
19:53 Adding a second hand
20:59 Constantly sweeping hands
23:11 Drawing an inner ring
25:45 Adding hour numbers
29:09 Bugs and performance
31:55 Final scores
32:43 Tips for using ChatGPT safely
36:19 How programmers can use ChatGPT effectively
37:30 Is ChatGPT 4 better?

Пікірлер: 157
@toadlguy
@toadlguy Жыл бұрын
That was both a great discussion of how to approach a problem in SwiftUI, and a good overview of the limitations of ChatGPT (or any AI, for that matter). I have found that it really is only good at handling small(ish) problems. What I found most startling, though, was how much better ChatGPT 4 did. As you were discussing your solution, I was wondering why you didn’t just smooth the hands with withAnimation (you can code around the rollover case) but I think your approach with the timeline is much better.😊
@Skjoldborg8
@Skjoldborg8 9 ай бұрын
Very nice take on a huge huge new perspective to coding. Very nice points, and shows the perspectives we need to have in mind for the future. Great job as always Paul! 🙌
@foilhat
@foilhat Жыл бұрын
Frankly speaking, I'm using ChatGPT for Swift development A LOT. Here's some essential cases: 1) RegExp, predicates, SQL requests, bc my lazy ass can't remember them all. 2) Explaining Xcode errors. 3) Throw 300-400 lines of file and ask "any ideas how to simplify it?". 4) Asking something like "what properties does TextField have", bc its output is more readable than Apple documentation. Although, there was a case when ChatGPT was smarter than me: I need to make a fetch request with a predicate that has a variable from another core data entity, but both requests must be done with a property wrapper (bc without it the view won't update). And ChatGPT came up with the idea better than I had, kudos to it (him? her?). So, it is usable, very usable.
@tapiokuusisto4780
@tapiokuusisto4780 Жыл бұрын
Regex generation works really well indeed!
@ahmedghonim8383
@ahmedghonim8383 Жыл бұрын
I really enjoyed this and felt informed at the same time. I love your clear methodical approach.
@KFrench1123
@KFrench1123 Жыл бұрын
Great to hear your perspective on this!
@hemanthpulimi
@hemanthpulimi Жыл бұрын
Thank you for making this video. Just yesterday I was trying to learn Vision and Core ML and use the classifier in SwiftUI. Code provided by ChatGPT kept giving me errors. Went back to Google and found the code which actually worked.
@semilife
@semilife Жыл бұрын
Thanks Paul for this. I am incredibly interested in this field and it will be interesting how this develops in the next 12 months or so.
@111AlexF
@111AlexF Жыл бұрын
Paul, thank you! Very informative and at the same time sometimes very funny.
@lukashman538
@lukashman538 Жыл бұрын
Thank's for video. I'm writing chat screen right now for corporate application and it's hard for me to imagine how i can tell ChatGPT to make architecture kind of stuff. Still it could be very usefully to make very little simple things. For example: "Draw me a rectangular with some width and height which will be that color and that shadow parameters". That's first what comes in mind. Thank you again Paul for video !
@andrewmukelabai8209
@andrewmukelabai8209 11 ай бұрын
Wow... I have been enlightened by this wonderful dose of knowledge. Thank you!
@davidhwasserman
@davidhwasserman Жыл бұрын
Great video Paul! I’ve found ChatGPT useful for getting suggestions and improvements in my code. Given some specific context, it can be quite helpful.
@jeanozamora5333
@jeanozamora5333 Жыл бұрын
Thank you for making this video. I learned a lot from you.
@ChristopherFonseka
@ChristopherFonseka Жыл бұрын
This would be a pretty epic take home test for a job application 😊
@ayyanchira
@ayyanchira Жыл бұрын
Such a great discussion Paul! My recent thoughts about ChatGPT totally aligns with what you said. Its a tool we can use to HELP ourselves explore alternatives and have discussion on BROADER level. Expecting it to give a full fledged code is not the state it is at right now. Devs who are at responsible position should NOT use ChatGPT carelessly. A meticulous review should be done, and verified before making use of that code. Regarding context, the immense human ready context you built while creating the clock was so detailed that it will need a machine a good pause, and large amount of visual and verbal input to have that context. Nevertheless, the state of ChatGPT is very impressive today. I keep thinking about how the future generation of work is going to look like....
@guitaripod
@guitaripod Жыл бұрын
Good take and presentation.
@GeraldHilbers
@GeraldHilbers Жыл бұрын
Great explanation again Paul, thx. I fully agree (even before I saw your video) that ChatGPT is a 'Helper'. And for me it's a nice helper for improving my developing skills, and for extending a first idea to a better solution. I don't see yet that it will replace me as a programmer. But... didn't we all start as a helper and (some) become an expert ?!?
@dimiutube
@dimiutube Жыл бұрын
Thanks for the great video. I've a kind of ignored ChatGPT and other AI tools until now. But it get's more and more important, so I've just started to learn more about it. The essential term is "let ChatGPT help me write code". I don't think that it will replace an experienced developer in the next few years. I read on Twitter the other day: "Product mangers need to formulate very well to get what they want from ChatGPT. So we are safe!!" 🙂
@feldyrios
@feldyrios Жыл бұрын
Excellent video! I have not used AI in any projects yet because of the very same issues that you have pointed out. I think the fundamental problem is that an uninformed user may take the result of an AI query as “truth” when in fact the answer is wrong, but delivered with “confidence.” “Strong men” throughout history have used this same approach to recruit the masses. Say it with sufficient authority and they will believe you…
@anianii
@anianii Жыл бұрын
Happy to see a video from you again! Would love to watch some coding livestreams again if you're up for it :)
@twostraws
@twostraws Жыл бұрын
I do monthly app-building livestreams, although they are only for Hacking with Swift+ subscribers. I try to make as much free material as I can, but ultimately I do have bills to pay! You can find out more about Hacking with Swift+ here: www.hackingwithswift.com/plus
@anianii
@anianii Жыл бұрын
@@twostrawsThanks for the reply, I didn't actually know this. Totally understand, and will be happy to support you!
@joannisorlandos1439
@joannisorlandos1439 Жыл бұрын
Awesome explanation Paul! I've recently been using ChatGPT for documenting my code and writing tests, and those libraries contain a big amount of detail. Since that's the 'sloggish' part of programming, I can definitely recommend diving into those use cases for future videos.
@JHEVR
@JHEVR Жыл бұрын
How do you document with chatgpt?
@toadlguy
@toadlguy Жыл бұрын
@@JHEVR You can just ask “Explain this code” and then paste it in the prompt.
@MoAdel92
@MoAdel92 Жыл бұрын
Thanks a lot for such amazing Content although i am dying for longer more frequent content.
@mohammadjavan8124
@mohammadjavan8124 Жыл бұрын
I am new to Swift UI development, having come from a Python background. I am a big fan of your tutorials and have been mastering SwiftUI by following them. While I found ChatGPT to be a useful tool for expediting coding when working with familiar code, I have found that refactoring my own code is a more effective long-term strategy. ChatGPT can be useful for writing and asking general questions
@onurmert8797
@onurmert8797 Жыл бұрын
As a newbie to software, should I learn python or swift?
@mohammadjavan8124
@mohammadjavan8124 Жыл бұрын
@@onurmert8797 Honestly am not expert to answer such questions, but I can say it depends on where you want to go.. Swift restricted to Apple softwares development so far, where Python can extend to Machine learning and software developments Python is a good start to get the mindset and start to express your words in code
@a_swiftly_tilting_planet
@a_swiftly_tilting_planet Жыл бұрын
Great video! I enjoy experimenting with ChatGPT, but I believe it requires significant guidance since it often fabricates information and assumes it's entirely accurate, as you mentioned. I find it particularly useful for generating mock data or when working with a large SwiftUI View that I've written in a single file while tinkering with code. In such cases, I ask ChatGPT to extract parts of the code into subviews.
@godofbiscuitssf
@godofbiscuitssf Жыл бұрын
I asked it for code to use CoreImage with SwiftUI and it gave me utterly plausible code (I didn't try to compile it), completely with includes to a project named something like CISwiftUI. It lied! No such project exists. I reran the request using different language and a bit different criteria. Similar code.. Different project! MORE LIES. Yet another non-existent project. And not just projects that no longer existed. They never did.
@thecappy5063
@thecappy5063 5 ай бұрын
I’ve used it twice, for help with specific problems I was having. It gave me code and explanations, very pretty and exciting. In the first instance, it told me to click some things in Xcode that didn’t exist. I thought, well maybe when ChatGPT was trained a few years ago, that option existed. In the second instance, it told me to use a nonexistent method on a class. I replied that the class doesn’t have that method. It apologized and tried again, using the same nonexistent method. Darn and other words.
@ThalesPosella
@ThalesPosella Жыл бұрын
Fantastic content!
@rscottlewis1
@rscottlewis1 Жыл бұрын
It’s great for dredging up API details from various vendors
@dannestrom
@dannestrom Жыл бұрын
For the code that I'm writing, it's much faster to write the code myself, than trying to express what I want in words.
@jorgeceles7942
@jorgeceles7942 Жыл бұрын
I get that! What’s would you tell the people that are starting to think CHATGPT as a cheat sheet ?
@dannestrom
@dannestrom Жыл бұрын
@@jorgeceles7942 I haven't really thought about that, However I think it might be useful for simpler algorithms. Let's say I want a struct Person, that has a name as a string, and some other properties. Then I want to make an array of Persons and sort them by name. I think that things like this could be produced in ChatGPT, but I haven't tried ChatGPY myself, so I don't know. I have just seen a couple of videos on KZbin about it, and for some things it seems to work well, while for other things it doesn't work at all.
@daraghmacgabhann1005
@daraghmacgabhann1005 Жыл бұрын
Shouldn’t be if its truly declarative 😂😂😂
@dannestrom
@dannestrom Жыл бұрын
@@daraghmacgabhann1005 Maybe sorbet my code isn't entirely declarative. At least not yet, if ever. Sorry, I can't really talk about the project I'm working on, but it's the most complex project I have ever started.
@remy-
@remy- Жыл бұрын
Print(“Hello World?”) ?
@FlashGamer521
@FlashGamer521 Жыл бұрын
As somebody just learning how to program I have already found chat GPT more useful than KZbin Tutorials on a number of subjects. I was trying to figure out how to make a simple cube in SceneKit for quite a few hours before I finally gave up and just asked chat GPT, who got it in half an hour or so. Problem with KZbin videos is they all videos on SceneKit used it with UIKit instead of SwiftUI. Problem with Chat GPT is that I kept needing to clarify what I wanted, and feed it error messages.
@peterplass9458
@peterplass9458 Жыл бұрын
Hi Paul, thx a lot for information. 1. I totally agree with you. 2. I found a little strange in your code: did you mean variable angels instead of clock? I was a little confused. Peter from Germany
@gustavomonge1785
@gustavomonge1785 Жыл бұрын
Paul, I would submit your code version of the clock and I would ask chat GPT if it could give you an optimized version of your code establishing few parameters to test. The idea could be to make a challenge in the field of software development. What do you think?
@memogles5763
@memogles5763 Жыл бұрын
Can you make some Swift playgrounds tutorials with your iPad? That would be a great idea because there are more people with iPads than Macs, your tutorials are awesome !!
@JohnNyquist
@JohnNyquist 11 ай бұрын
Bing Chat did an amazing job on its first pass with your analog clock prompt.
@hickam16
@hickam16 Жыл бұрын
I asked GPT 4 and it gave me a quite beautiful one on the first try. Same exact prompt. No prompt engineering required. That's truly to concern, it is just going to get better and better at an exponential rate. However, I dont think it will take developer jobs for quite a while, even a simple app requires the integration of thousands of lines of code, dozens of files and the context of the problem and the anticipation of how people will interact with it. (edit: I should have finished the video, I am 'that' guy.)
@jjamespacbell
@jjamespacbell Жыл бұрын
Would you post that code for the rest of us to review?
@mindrivers
@mindrivers Жыл бұрын
@@jjamespacbell The same for me. I pasted the same prompt as in the video and got fully working example
@rewdh
@rewdh Жыл бұрын
As experts are saying, language models keep good progress in the erly stages, but sliws down pretty fast after.
@sourPollo
@sourPollo Жыл бұрын
For better understanding data structures and algorithms is pretty good.
@VirenderDall
@VirenderDall Жыл бұрын
Hi Paul, for drawHours(in: ctx, radius: r), If I am using it's going beyond to the circle. Could you pls confirm?
@natgenesis5038
@natgenesis5038 Жыл бұрын
That’s perfect topic
@MikeTaffet
@MikeTaffet Жыл бұрын
It would have been nice to see if you could explain to ChatGPT that it hadn’t aligned the clock hands correctly and that the numbers were in the wrong location. I wonder if it might have corrected that
@robertorion6559
@robertorion6559 11 ай бұрын
That was a great discussion of the use of AI in software development. Thanks. I find that the AI tools (ChatGPT, Bing AI, and Google Bard) are helpful, not in writing code for me, but in making my research faster. Say I want to do something with Location Services, but have never done that before. Pre IA I would start reading the documentation, reading blogs, watching videos, maybe asking a question on Stack; that sort of thing. With AI, I now would start that by asking the AI to write me various code 'fragments', not and entire program. I can then use those fragments in Xcode to explore how the code works (or fails). I learn from that and hence move to writing my own code more quickly. Using your clock example, I might ask AI to tell me how to draw a circle with a hand sweeping around that circle. I might ask it that a few times to get different versions. I might ask all three of the major conversational AI's we have access to today. I could then figure out what works best for me, and for MY code. I see the AI tools as great learning aides, great educational tools (even when they are wrong, that too teaches me). I do not see them writing any significant app all by themselves anytime soon.
@mikefamm5712
@mikefamm5712 10 ай бұрын
100% agree, gpt is an absolutely game-changing research tool. It may say things that are false, but that's the current tradeoff for getting extremely specific and personalized "searches" returned. Sometimes all it takes is to ask it: "you said x, can you search relevant sources to double-check that it's correct?" Even just changing the semantics of what you ask can make a large difference as well. They aren't very reliable now, but the more people use them, the better they will get.
@30guarino
@30guarino Жыл бұрын
Hello Paul…. Is it a ridiculous idea to ask if you can format your SwiftUI playlist (190 videos) into a more compartmentalized mini series of videos?
@twostraws
@twostraws Жыл бұрын
You might find it useful to browse them as part of the 100 Days of SwiftUI site, which includes optional extra reading, milestones, tests, and more: www.hackingwithswift.com/100/swiftui
@nitesh-maharaj
@nitesh-maharaj Жыл бұрын
I always find it hilarious when people get scared that machines are going to take their jobs. As a software engineer for almost 2 decades, I think that if a machine can do my job, my life will improve drastically. Here's a new perspective... I lead a team of some very smart university graduates, a senior, intermediate and a few juniors. I barely write code now days, because a lot of my time is spent on creating technical documentation to communicate the plan to the team. When it comes to large enterprise scale systems, where you have integration into various other systems, among many other challenges, getting very smart humans to execute on a cohesive vision is a mammoth undertaking. If we can offload a lot of the mundane work to machines, we'll all be able to deliver more value. Machines are tools, and the more our tools enable us, the bigger and better we can build. At the end of the day it's all about delivering value to society, and not about spending hours in your IDE.
@smenor
@smenor Жыл бұрын
ChatGPT and all of the existing generative « AI » ( read: statistical machine learning systems ) are really great at giving answers that superficially look / sound good but fall apart if you test them or look too closely
@drakata27
@drakata27 Жыл бұрын
The GOAT has uploaded once again. I have learned so much from you not only about SwiftUI but also about programming. Your 100 days with SWIFTUI is the best course I have ever taken
@Eronx
@Eronx Жыл бұрын
I really enjoyed your video. But I think the real challenge is to use the correct way of prompting chatGPT. Someone with just basic knowledge about SwiftUI but good prompting in chatGPT and a good understanding of the underlying problem, could maybe recreate this result. I mean you didn’t gave it a real chance to understand and correct it self. And to imagine, that someone with just basic knowledge could create this is just amazing. Imagine this in 10 years.
@brunoribeiro6146
@brunoribeiro6146 Жыл бұрын
Do you have an iOS Dev Course somewhere I can buy and learn with YOU as a teacher?
@ChasedByPenguins
@ChasedByPenguins Жыл бұрын
Using chatgpt is going to be a skill like googling an answer. You can’t always 100% fully trust what you found on any search engine either. One is learning from the other and humans also sometimes provide wrong answers to stack overflow answers. Treat it like a kid or a teenager. It’ll give you most answers cause it’s learnt them in GPT school but sometimes will try to bullshit its way through to gain your approval. What it is invaluable for is digging deeper into the answer you were given which I find amazing. I think the challenge you shown here is a little unfair because you yourself dug through the answer multiple times, iterated on your initial correct answer. You could do the same with ChatGPT and I’d like to see this approach. First explain what you want it to do by explaining the angles, variables you’d like used, etc and then make it gradually build the clock for you.
@Maxxamande
@Maxxamande Жыл бұрын
I use it sometimes to ask very small parts in code, that I can understand, but never for the main logic.
@danielniels22
@danielniels22 Жыл бұрын
hi paul.thanks for all your tutorials. im new to Swift. i'll be doing a college project to build an iphone app that could measure user's voice intensity, such in decibels (dB). can you please give me a little guidance, such what to search first? thank you
@twostraws
@twostraws Жыл бұрын
Here you go: AudioKit.
@danielniels22
@danielniels22 Жыл бұрын
@@twostraws i have tried using AVFoundation. But i will also try your guide. Thanks!
@TsiriniainaRakotonirina
@TsiriniainaRakotonirina Жыл бұрын
❛ *Let it help you, not replace you ...* ❜ (Paul Husdon) What a wise advise that is certainely appreciated. 👌
@mrglwatson
@mrglwatson Жыл бұрын
Would be interesting to try this code génération test using the other AI programs like Bing
@gobal97
@gobal97 2 ай бұрын
Chat gpt is good to fill task description in jira when your code is finished
@pitmanra
@pitmanra Жыл бұрын
At 18:28 shouldn't the calls to drawHand be ... angle: clock.minute and angle: clock.hour?
@OriginalJetForMe
@OriginalJetForMe Жыл бұрын
How does it behave during temporal exceptions?
@foilhat
@foilhat Жыл бұрын
Not sure about exceptions, but during temporal power outage it behaves awfully
@CallousCoder
@CallousCoder Жыл бұрын
This proves what I’ve been saying about an AI replacing a developer. I always say: “the coding part is the easy part of our jobs”. It’s getting the requirements clear, and humans are terrible at communicating ideas. This only works when the engineers have domain specific (and corporate and political) knowledge of the environment. It’s impossible for an AI to know or to train. I create different solutions for my banking client than my energy trading client than for our medical clients. The latter we designed a robotic medication order pick system. We spend more time getting contingencies and possible error thought out then coding and building it. Because giving someone the wrong meds is bad. And sure the bags with pills are still checked by a human. But some pills look a like and even miscounting is a thing (by machines and humans). That requires a whole different level of engineering and coding. Something the AI just isn’t aware of.
@remy-
@remy- Жыл бұрын
Matter of time
@CallousCoder
@CallousCoder Жыл бұрын
@@remy- I doubt time will help. In order to get what we call domain knowledge you’ll need a couple of things that you can’t get from a desktop AI. You’ll need to be able to be in that domain and see how things work, be part of it and it’s politics. So you’d need a robot that can move about like a human to gather all that information. I don’t think we want robots to walk about and work with us… at least I wouldn’t 😂 And you need to understand why certain processes, politics and decisions are there in order to come up with solutions that fit with those domain specific requirements or bend the rules in such away everybody can live with. An AI can’t do this without being an active part in it. Let alone understand the very abstract and arbitrary emotional origins of certain politics in a company. I would want to write a very specific example of my current customer. But since I’m under NDA. But another example is my first ever professional project I had to design. It was a piece of hardware that could measure the height of snow and ice… on Antarctica! I initially designed something that worked then my mentor started to ask me questions about how many solar hours there are? And I realized then that I’d overlooked the fact that the Antarctic has a dark and light period. And we had to know if snow was in the solar panels if so we shouldn’t try to send the data to the satellite but buffer it. Wind factors came into play for ultrasound measurements. Because strong winds (well that’s Antarctica for you) would potentially deafen the receiver. Something seemingly very simple became almost as hard as making a satellite. Not for the very least that even I with my extreme limited domain knowledge of Antarctica knew we wouldn’t be able to go to the center and replace a battery or fix something. Another thing is cosmic radiation which is extremely high at the poles and you needed to protect the circuits from it. But also lightening!!! A pole with a big iron box on a snowy plane is a nice candidate to be struck by lightening. You need to know this or you can’t engineer a sensible solution. And I was glad they gave me that project and coached me, up to the point I sat in the university library reading about Antarctica and engineering for extreme cold and satellite electronics - which was basically comparable an AI hasn’t been there has no concept of Antarctica and how electronics behave there etc. And there’s no way it can gain that very specific domain knowledge. And this is sheer scientific let alone more abstract domain knowledge like the politics and security.
@lukaszstocki6998
@lukaszstocki6998 Жыл бұрын
Unfortunately "simple prompts" wont cut it. Checkout this thing called prompt engineering. In those scenarios what might help is to give it some context or act as a world class iOS developer. Also saying that if it does not know then it should not invent stuff. I think that's what MS is doing when the prompt goes thru the graph and then to the model. Personally for the past two weeks I was not using google or stack overflow for looking up solutions for simple problems. My biggest surprise was when I was looking for something in pure ObjC. All google results ware sending me to topics related to bridging headers :| At the moment I agree that "we are not there yet". But playing with it with different stuff (not only programming) I think some sort of revolution did happened. And there is alpaka that allows you to basically run this almost like GPT model on your own computer! 🤯
@PhillHorrocks
@PhillHorrocks Жыл бұрын
Great video! I did notice that the version of ChatGPT you were using was 'Dec 15'. It might be interesting to repeat your test with the latest GPT-4 version...
@twostraws
@twostraws Жыл бұрын
That’s literally in the video.
@PhillHorrocks
@PhillHorrocks Жыл бұрын
@@twostraws D'oh! *rubs eys* Oh, yeah! :)
@anotherguycalledsmith
@anotherguycalledsmith Жыл бұрын
Lost weight? Looks good, you are aging gracefully… AND you are about to crack the 100k subscribers very soon now! Eventually, - very hard worked for and well deserved ;-) I was just wondering,… NO “TikTok AI Glow Up filter” to turn your dogs pink???
@lightninglorenzo2121
@lightninglorenzo2121 8 ай бұрын
ChatGPT vs TwoStraws was like seeing Mike Tyson beat up a 10 year old, Chatgpt had NO CHANCE LOOL. But yes i love these kind of videos because people worry and panic that there is no need for coding, but AI in general will always lack one thing and that is control. Just like in your example you got it to draw a racoon holding a banana on a ship, it will never be what you envisioned or imagined it to come out as, your thoughts can not be replicated, and yes it could make a clock but it will never be exactly how you envision it, and therefore it will never take over as people state AI will.
@ArtursDerkintis
@ArtursDerkintis Жыл бұрын
Was trying it out in real world and it was suggesting me to use Apple api methods that does not exist.
@alexplekhanov
@alexplekhanov Жыл бұрын
Web developers with copilot x watching this video: 🍿😂
@muncho404
@muncho404 Жыл бұрын
Machines: 0 Humans: 6 Paul Hudson: 💯
@foilhat
@foilhat Жыл бұрын
Oh, no! I forgot the main case for ChatGPT! Throw the full code and ask: "Where's that freaking bracket missing?!!"
@ebuzersimsek7920
@ebuzersimsek7920 Жыл бұрын
Do you think that ChatGPT can replace developers?
Жыл бұрын
🎯🎯🎯
@chesterman18g
@chesterman18g Жыл бұрын
ChatGPT is okay-ish as a co-pilot kind of thing, but only up to some level only, because as you said Paul, it doesn't understand what it is doing. This is a crucial ingredient of solving the problems.
@mindrivers
@mindrivers Жыл бұрын
It works for me in GPT-4. The whole point of this video is to mislead people. The author has serious fears that GPT could replace him and nobody is going to use his services and author will loose his income. Well this is what will happen in a couple of years
@tk-zh3dd
@tk-zh3dd Жыл бұрын
Meanwhile, AI is watching your video and taking notes ;-)
@engeldb
@engeldb Жыл бұрын
Then add in realistic code, like packages, multiple components and models and view models along with some UIKit code that needs to work with SwiftUI and ChatGPT has no idea what to do.
@shaozhexue5156
@shaozhexue5156 Жыл бұрын
ChatGPT help beginner like me in correct the explain the meaning of the code
@anotherguycalledsmith
@anotherguycalledsmith Жыл бұрын
@19:05 Dear Paul, please be careful with this kind of imagery containing strange light spots, - you’ve already done that in this video before. This might trigger a seizure in people who tend to react to these flashing effects when appearing all of a sudden… No joke.
@DavidPerez-dt9nb
@DavidPerez-dt9nb Жыл бұрын
ChapGPT should be the name of the robot or visual assistant that uses a GPT model
@OttoFaerber
@OttoFaerber Жыл бұрын
Software development means much more than generating source code
@iCrazy414
@iCrazy414 Жыл бұрын
Give an example, otherwise business majors would just replace you with proper prompts to the A.I.
@OttoFaerber
@OttoFaerber Жыл бұрын
@@iCrazy414 When a customer wants a new software from you there are a lot of things to discuss before the coding starts. The actual development of the software does not take place during coding but together with the customer at the whiteboard. The customer usually does not know the possibilities of the software and so the architecture of the program is developed bit by bit. For programs that collect data, the most important part is the standardization of the database. The customer will not be able to explain all these things to ChatGpt so that it becomes a software.
@VadymBarda
@VadymBarda Жыл бұрын
would be great to see the same evaluation with GPT-4!
@twostraws
@twostraws Жыл бұрын
That's literally in the video.
@ThePeckAtTech
@ThePeckAtTech Жыл бұрын
I tried it just now. It randomly stopped in the middle of writing the code, as the previous ChatGPT model would do sometimes, but after asking it to continue it compiled and worked wonderfully without any edits. Truly impressive.
@VadymBarda
@VadymBarda Жыл бұрын
@@twostraws missed, thanks!
@JohnNyquist
@JohnNyquist 11 ай бұрын
Haikus are supposed to be 5-7-5, the one in your video is 5-8-5.
@bakhtiyarashraful61
@bakhtiyarashraful61 11 ай бұрын
Can you please tell me why are you making it more complicated than it needs to be?
@adhonisri
@adhonisri 11 ай бұрын
Well covered video. I am regular follower of your youtube channel for very long time. It is good top at the right time. But your way of covering look and feel of the app is not covered proper, once you start explain, you never tried with chatGPT and started giving points to human and machine. It looks funny, i felt you are trying prove that code generator is very inferior. Anyway with due respect it is well covered, looking forward for more. May current version of chatGPT can give better results with more appropriate Prompts...
@gucp
@gucp Жыл бұрын
I’m planning to use AI to help me finding bugs in my code that could be difficult to find after hours of coding
@chesterman18g
@chesterman18g Жыл бұрын
chatGPT is based on a probability. That's a huge risk in a long shot for developing a good code when using it just blindfolded.
@carlsmith8593
@carlsmith8593 Жыл бұрын
I'm terrified to use it, in case I end up red, white and blue pilled.
@alexvaiman4966
@alexvaiman4966 3 ай бұрын
no chat dont know swift/swift ui. he is ok for some tasks, nice junior assistant, grate help when it comes to write documentation. good at implanting things he know(like known algorithms), at any case, he cant alone make u an app, not even close. and the other on brad/gemini is so terrible , totally useless. chat-gpt shines, when it come to know seen before templates, 70% of the app development is actually templates, so in the next 5 years I think, development will get faster in about 30-40% with chat gpt.
@alexeyl22
@alexeyl22 11 күн бұрын
Here is an idea: make a video where you are telling chatgpt to create a chat app to submit requests into chatgpt for you, to type it into Xcode, and to test it by running and submitting this same request into it to create another chat app etc recursively? After all, this is what ai bros have been preaching about - ai will replace all... 🤖🤖🤖🤖🤖
@jacobzheng3792
@jacobzheng3792 Жыл бұрын
ChatGPT-4 may get less bugs.
@bobgodwinx
@bobgodwinx Жыл бұрын
After watching this video I closed ChatGPT... Because for now it's more of a confuse that will make you lazy. My personal take.
@bruinflight1
@bruinflight1 8 ай бұрын
We are still screwed.
@OriginalJetForMe
@OriginalJetForMe Жыл бұрын
Given that its corpus ends at sep 2021, no.
@bladimadrigal9221
@bladimadrigal9221 4 ай бұрын
So it’s a crutch rather than training wheels
@adeadegoke4925
@adeadegoke4925 Жыл бұрын
@Paul Hudson, I am extremely worried will ChatGPT take our jobs?
@Andrew-7324
@Andrew-7324 Жыл бұрын
thank you for the example with 123456789 * 13. GPT 4.0 also sucks with it 😂
@mindrivers
@mindrivers Жыл бұрын
absolutely working example for me using GPT4
@Andrew-7324
@Andrew-7324 Жыл бұрын
My results is always 1000 more then correct value
@mindrivers
@mindrivers Жыл бұрын
@Paul Hudson why you are deleting comments? You were absolutely not correct in your video. The first prompt gave me absolutely working example in GPT-4
@twostraws
@twostraws Жыл бұрын
I haven’t deleted a single comment on this video, I’m not sure what you’re talking about. I’m glad GPT-4 worked for you, but I did specifically say everyone will get different answers, and I even showed my own GPT-4 example.
@mindrivers
@mindrivers Жыл бұрын
@@twostraws strange, sorry, I was posting a link to the gist because other people were asking to show if it works really in GPT4 and when I posted them a url this message was disappearing a few times. I saw that you are posting urls with no issues in the comments then I decided that it is not youtube clearing it out but you...
@kell7689
@kell7689 Жыл бұрын
I am genuinely afraid of AI now. The rate at which it is developing is equally amazing as it is horrifying.
@605dave
@605dave Жыл бұрын
Kind of seems like you rigged the game. You gave chatGPT one go at it, but iterated on yours. You also left out details for GPT, for example I don't believed your prompt mentioned dark mode. I have not tried the tool yet, so not coming from rabid fan perspective. But it would interesting to see you give GPT another try by adding more and more details to the prompt to see if you can get the same results as you did.
@WafflesGiraffles
@WafflesGiraffles Жыл бұрын
ChatGPT 4 gave me fully working code with a fully working clock with hour, minute and seconds indicators. Not as beautiful in design as yours but it's round, has all features, moves and works. My prompt was: "You're a software engineer for iOS and you're an expert with SwiftUI. Write a working analog clock for iOS using SwiftUI. Make sure to show working hour, minutes and seconds indicators."
@WafflesGiraffles
@WafflesGiraffles Жыл бұрын
I just realized you addressed exactly this by the end of the video, duh! :)
@nyambe
@nyambe Жыл бұрын
No one does swift better than you
@artyom_ss
@artyom_ss Жыл бұрын
TLDR for video: yes, it just copy-paste😅
@evertongrant2814
@evertongrant2814 Жыл бұрын
The thing is that you had the chance to get the code right, what if you can get ChatGPT to improve it code by adding required descriptions on layout and functions, just like a human would do.
@technicolourmyles
@technicolourmyles 9 ай бұрын
The video was brilliantly paced and presented, but I feel it was a bit unfair that the human got as many chances as he wanted to iterate and improve, when ChatGPT was only given the initial prompt and a single error. Not to mention, the current version of ChatGPT was only shown off at the very very end, and that version got it almost exactly right. Why not compare the latest version and give ChatGPT the same instructions, chopped into more manageable chunks, like how the human worked through it (and for some reason gained additional points for each chunk)? Again, brilliant presentation, but the methodology is flawed at the core. First of all, human also made errors. A human has to make errors in order to reach the skill level in which you can write out an entire analogue clock without looking anything up or making a single mistake along the way. If I, a human, were to attempt the same thing, I would do far, far worse, naturally. The human in this comparison is presented without the years and years of training, all the mistakes made and learnt from along the way. That's all fairly obvious, but to be more serious, GPT is still a tool like any other. It doesn't make much sense to criticise it if you don't know how to use it properly. We know it's not strong with maths. We know it is prone to errors. But if you break down the task into smaller chunks, much like you would as a human, if you work through the process step by step with ChatGPT, you can achieve great things, often things that would be too far out of reach for you if you're not already very knowledgable and have years of training. Your conclusion is correct, though. ChatGPT is best used to accelerate our work. We work alongside it. We learn from its mistakes and we learn how to get the best results with it. Just have fun with it and see how far you can get before it truly reaches the point where it can replace us. Will it be in 10 years? 5? 2? In a couple of months? Who knows. I think all we can do is just think of it as part of the fun and grow alongside it. :)
@Tignite91
@Tignite91 Жыл бұрын
I think your comparison is too much in favor for the human aka yourself. Your prompt for ChatGPT was very basic lacking specificity while your own project got improvements by setting specific guidelines along the way which helped refining your project.
@koyko4
@koyko4 Жыл бұрын
The version is a little outdated
@twostraws
@twostraws Жыл бұрын
I literally ran it with GPT-4 on the day the video was uploaded. You can see me reading the date from my watch at the end.
@petersuvara
@petersuvara Жыл бұрын
TLDR: No it cannot.
@seankeel945
@seankeel945 Жыл бұрын
This video stopped short with GPT and did not illustrate what chatgpt could do to the fullest. Why didn’t you tell it that the hands weren’t in the middle of the clock? You have to say what is wrong and then say, “Fix it.” I feel like this is just another engineer defending themselves so that they can say they “machines can never replace real programmers.” You’ll be amazed what it can do if you keep talking to it. Yes it doesn’t give you the correct output on the first try, but maybe you would have spend another two minutes getting 90% of the code, using your 10% brain power to tidy up the rest, and then relaxing ahead of schedule.
@jjamespacbell
@jjamespacbell Жыл бұрын
Sorry Paul the score was not ChatGPT 0 Humans 6 it was one of the premier experts in SwiftUI who has been teaching, publishing SwiftUi books for 10 year 6 Also I expect ChatGPT to progress past even you within a couple of years, same as AI did to grand Chess masters.
@one2escape
@one2escape Жыл бұрын
Your prompt engineering needs a lot of work. Gigo still applies.
@ecx007
@ecx007 Жыл бұрын
ChatGPT can't do the maths, always wrong
5 Steps to Better SwiftUI Views
31:19
Paul Hudson
Рет қаралды 54 М.
I Asked ChatGPT To Write Jazz
12:37
Charles Cornell
Рет қаралды 602 М.
She’s Giving Birth in Class…?
00:21
Alan Chikin Chow
Рет қаралды 7 МЛН
Pokey pokey 🤣🥰❤️ #demariki
00:26
Demariki
Рет қаралды 8 МЛН
Can AI code Flappy Bird? Watch ChatGPT try
7:26
candlesan
Рет қаралды 9 МЛН
8 Things I Wish I Knew When I Started Programming
19:51
Paul Hudson
Рет қаралды 37 М.
Binding vs. Bindable in SwiftUI on iOS 17
13:12
donny wals
Рет қаралды 8 М.
Write Better Code with Swift Algorithms
34:34
Paul Hudson
Рет қаралды 31 М.
Making it Rain - Advanced Special Effects with SwiftUI
29:16
Paul Hudson
Рет қаралды 13 М.
8 Common SwiftUI Mistakes - and how to fix them!
28:05
Paul Hudson
Рет қаралды 49 М.
Dear Apple - The iPad needs help.
11:47
Mrwhosetheboss
Рет қаралды 1,5 МЛН
Learn the Essentials of Swift in one hour
58:14
Paul Hudson
Рет қаралды 169 М.
Apple, как вас уделал Тюменский бренд CaseGuru? Конец удивил #caseguru #кейсгуру #наушники
0:54
CaseGuru / Наушники / Пылесосы / Смарт-часы /
Рет қаралды 4,5 МЛН
The power button can never be pressed!!
0:57
Maker Y
Рет қаралды 55 МЛН