10X Your Code with ChatGPT: How to Use it Effectively

  Рет қаралды 323,985

Dave's Garage

Dave's Garage

Жыл бұрын

A detailed look at how to properly use ChatGPT as your coding partner, including iteration and refinement of solutions. Make it do the heavy lifting as you reap the glory! Includes code, samples, analysis, and benchmarks. For my book "Secrets of the Autistic Millionaire": amzn.to/3diQILq
Github Repo for Primes project: github.com/PlummersSoftwareLL...
Github Repo for the ChatGPT generated code: github.com/PlummersSoftwareLL...

Пікірлер: 728
@MrChelleas
@MrChelleas Жыл бұрын
I've been a full-time software engineer for nearly over a year now and think I'm doing OK for myself, and yet almost every time I watch one of your videos I realize how little I actually know.
@Kadotus
@Kadotus Жыл бұрын
Don't worry, I started coding in the 1990's, have a degree in software engineering and I always learn something (mostly quite a lot!) from Dave's videos. Never stop learning, there's more to know than one can ever learn.
@wysestone
@wysestone Жыл бұрын
Don't feel too bad I've been in networking for about 10 years now and still have this issue just about every day when continuing in my studies... it's the blessing and curse of working in the wonderful world of IT and Computer science.
@gasfiltered
@gasfiltered Жыл бұрын
Tbf to yourself, he was in your position 35 years ago. In that time he was exposed to some of the very best engineers on the planet daily, and his brain is physically wired differently. It's hardly a fair comparison. But knowing that you don't know what you don't know so very early in your career is huge and will pay you dividends for many years to come. I wish I had figured that out sooner.
@nmartin32950
@nmartin32950 Жыл бұрын
While it is true that Dave could write all the code that chat GTP wrote in this video, there was a time when even Dave was learning this stuff for the first time. When I was going through university they taught us all the different forms of sorting algorithms and binary searches, however these things are now commonly embedded within programming language libraries. Chat GTP is just the next level in tooling. As Dave demonstrated you still need a logical mind to ensure the code is correct and fix bugs.
@everyhandletaken
@everyhandletaken Жыл бұрын
The replies here brought a smile to my face, very good advice & encouragement! It really is ok to not have a solution to every single thing you face, it’s how you go about finding the solution & learning, that is the valuable part. I’m totally ok with not being as smart as Dave 😊
@Joe-SoftwareEngineer
@Joe-SoftwareEngineer Жыл бұрын
"I speak Python with a C accent" love that! 😄
@faithinverity8523
@faithinverity8523 Жыл бұрын
I love how it “trains” you to ask questions effectively. I think it has helped me write specs better and faster.
@Zaf9670
@Zaf9670 Жыл бұрын
I think this might be a fun follow-up video now that GPT-4 is partially available. I always feel like I walk away with something new from these videos and appreciate your efforts!
@Henry14arsenal2007
@Henry14arsenal2007 Жыл бұрын
This level of prompting implies excellent knowledge of the domain and a grasp of the problems being solved. That usually is not the case for most people that only have a vague notion of a problem and/or methods to check for errors.
@insanelydigitalvids
@insanelydigitalvids Жыл бұрын
A huge amount of value in this video. Many thanks, Dave!
@ScottPlude
@ScottPlude Жыл бұрын
Am I the only one that had to replay what Dave said as the "copying and pasting from stack overflow" book was on the screen?!?!?! I just about died laughing and heard not one single word he said the first time I saw the book! HAHAHA OK, rewinding and playing one more time. Sorry, Dave. Your sense of humor is at the next level now.
@420bobby69
@420bobby69 Жыл бұрын
discovered you the other day, just want to say this is one of the coolest channels i've stumbled upon. thanks for the informative and interesting ad-free content!
@DavesGarage
@DavesGarage Жыл бұрын
Awesome, thank you!
@rashadfoux6927
@rashadfoux6927 Жыл бұрын
Haven't heard the sound of a dot matrix printer since I was a kid ._.
@waynesworldofsci-tech
@waynesworldofsci-tech Жыл бұрын
They didn’t have dot matrix printers when I was a kid, or was all teletype terminals.
@kesierzg
@kesierzg Жыл бұрын
They still have it in my bank
@ernestoditerribile
@ernestoditerribile Жыл бұрын
@@kesierzgIn logistics you still see them a lot
@toby9999
@toby9999 Жыл бұрын
​@@waynesworldofsci-techMe too. I hooked one up to a tiny 8bit system. The teleprinter was so noisy it we shifted it to our garage.
@waynesworldofsci-tech
@waynesworldofsci-tech Жыл бұрын
@@toby9999 Oh yeah. Those things were epically loud.
@linkinpark9812
@linkinpark9812 Жыл бұрын
On the history part for the session, currently it's about 3,000 words (the ones you type), check their help page. After that, it may lose some of that past context (which might be fine as it keeps building on the same code you are referencing). If it's a long enough session though, and you assume it knows something from the past, it may get lost or you may be confused why it changed it's pattern. Best to restate if you are reaching far back, to "remind" it what you want it to do. Awesome video!
@beyse101
@beyse101 Жыл бұрын
Great video, Dave! Your explanation was really helpful in understanding the topic. I would love to see you do a follow-up video using Chat GPT 4. I'm sure it would be just as informative and insightful as this one. Thank you for sharing your knowledge with us!
@RashPro
@RashPro Жыл бұрын
Love the camera setup, thanks for the tips, I've been using chatgpt for cross reference and some more menial tasks but will certainly start to ask more specific things now :)
@rilauats
@rilauats Жыл бұрын
Great content! Having coded myself professionally since mid-early 1980s I certainly have my doubts on what AI can do; where its limits lie - and how we can benefit from AI in coding despite the limits. Your story here is just the greatest information I've ever seen. You beat ChatGPT, you're the bona fide coding rock-star. My first experience with ChatGPT was asking for info on one vendor and got a probably 100% correct description of another vendor despite the names not even close to one another. Asking for the SOLID principles was far more successful - but it felt like I was reading a slide from somebody's presentation a decade ago. The 8 years old wizard describes my experiences perfectly. Keep rocking, Dave!
@tahlularose9267
@tahlularose9267 Жыл бұрын
Dave, thanks for taking this on, I love the way you teach and your dry sense of humor.
@skatterbrainz
@skatterbrainz Жыл бұрын
Thank you for covering this with great examples and explanations! Very well done! I'm a new subscriber and will recommend your channel to anyone I know!
@zCrabOG
@zCrabOG Жыл бұрын
Ima first year CS student. I probably use chatGPT the most in my class. And it is an INSANE tool to learn very quickly. I have one rule though. I will not implement a block of code from GPT unless I know exactly what it does. Sometimes it can come up with solutions that are too complex for me. And it can lead to hour long discussions about the what and why.
@abcproduction6819
@abcproduction6819 Жыл бұрын
You’ll not get a job for sure
@emmanuelameyaw9735
@emmanuelameyaw9735 Жыл бұрын
​@@abcproduction6819 why does it matter whether chatgpt is your professor vs some human as your professor?
@MandrakeDCR
@MandrakeDCR Жыл бұрын
@@abcproduction6819 Yet another anti-ai. Just get used to it already. It's here, it's not going anywhere, and it's going to be used more and more every day. It isn't a creepy monster out to steal your job. It's a great tool that can help in a lot of ways.
@ahmed17167
@ahmed17167 Жыл бұрын
Felt like reading myself. You are discussing with other for hours knowing that they also don't know the exact working or cant understand yours question. By the way third year SE student
@abcproduction6819
@abcproduction6819 Жыл бұрын
@@MandrakeDCR it’s not about anti ai. A programmer with chatgpt can do the job of 5 engineers there by eliminating freshers or new software engineer because right now we are shortage of engineers, job will not be replaced it will reduce the number of job opportunities.
@david_sanchez
@david_sanchez Жыл бұрын
This was very insightful. I recently started a software company but, ironically, I am not a developer. Although I have been building my own apps since the early 1980's and am decently skilled with at least 6 languages, I have never built apps for anyone but me. ChatGPT has helped me greatly with making my code more team oriented and fault tolerant. It's definitely been much faster than the typical Google searches. On a side note, I thought I was the only grey bearded guy doing this. It seems all the developers I run into these days are much younger than me. And thanks a lot for the autism references. I have a son who is mid-high functioning and I too am most likely on the spectrum (I've never been tested). Thanks for existing... Dave 😁
@cliffmathew
@cliffmathew Жыл бұрын
I came back to watch this video in full, after writing a Python based tool at work. For some portions, I consulted Chat GPT, especially around the usage of encryption and hashing, as well as the interface to the TPM module. Chat GPT was quite impressive, but because there are many libraries to deal with these things, it needed quite a bit of interaction to get it right or rather the way I wanted. It had difficulty tracking if some things were deprecated, or if the arguments to certain functions or use of certain function is appropriate in the context. In some C++ code it produced (for something else, not for the Python thing), it did not have the types cast correctly -- and the Visual Studio compiler kept complaining. My approach was to use google to read further on details of its choice of functions or imports and then make a decision if I want it to use something or not. If I found something different in Google, I also asked Chat GPT to tell me more about those things as well. On the whole it was very useful to me, and I am amazed at what its potential could be. At the moment I see it as a mentor who can introduce me into a topic that I am not familiar with, while letting me figure the rest of it out myself.
@JasonBunting
@JasonBunting 11 ай бұрын
Yeah, it has a ways to go - I think only those with a trivial understanding of actual, day-to-day programming think ChatGPT is amazing at this point. There's much more to programming than writing simple little programs... Someday, though, it could be quite useful.
@cliffmathew
@cliffmathew 11 ай бұрын
@@JasonBunting True. Yet it is a major leap from wherever we were before.
@thromboid
@thromboid Жыл бұрын
What a time to be alive! Can't wait for the next challenge video. Also I'd love to see how well it does code golf.
@mithrandirthegrey7644
@mithrandirthegrey7644 Жыл бұрын
This is phenomenal. I've been using chat gpt to set up a custom linux system. I'm baffled by how much faster I am able to crank out stuff with the aid for this tool. It's 10.26 am on a Friday here and I have finished all my tasks. I'm gonna go out fishing now. I love chatGPT.
@ChristopherDavis
@ChristopherDavis Жыл бұрын
I have been experimenting with ChatGPT and linux on a rasberry pi using docker just getting my feet wet still learning. Curious what you are having it customize?
@mithrandirthegrey7644
@mithrandirthegrey7644 Жыл бұрын
@@ChristopherDavis everything. We have our own kernel modules etc. running on an IMX8 and we're updating from an ancient kernel version.
@GPOLICE
@GPOLICE Ай бұрын
Why tho? What are you people doing on Linux that can't be done on windows?
@peterschutz2673
@peterschutz2673 Жыл бұрын
This video lead me to some major productivity increases. I'm a designer by trade, but I've been delving into coding more, specifically Javascript, to help create tools to tackle niche problems. Thanks to this video and using ChatGPT because of it, I'm now creating more complex tools, faster, with better understanding. It's like having a lab partner that knows a lot about specific things, but can't always put the big picture together. I help steer it toward the goal, it gets the details right, or as close to right as it can until I explain myself better, and eventuality we arrive at a great solution.
@farab4391
@farab4391 Жыл бұрын
this is amazing !!! I can't imagine how different my working life would've been as a systems programmer if we had this 25 years ago already. Dave was doing some specialized stuff hence the hand holding, but for the type of stuff I can think of that would've taken me at least more than a day, it spits out in 10secs and is complete. For example ... "write bash script that monitors if a file has changed and sends an email if it does" ... and ... "write bash script to extract cpu usage per hour from linux sar". This would've saved me hours, days, months of debugging syntax, typos, etc. not to mention research which methods/functions to use if I haven't done it before
@TravisBerthelot
@TravisBerthelot Жыл бұрын
This is the best video on actually using ChatGPT for programming that I have seen. Thank you for your hard work on this.
@di380
@di380 Жыл бұрын
Great video Dave. I’ve been using ChatGPT to disassemble and comment my assembler code and does a great job at it.👍
@jeffreycordova9082
@jeffreycordova9082 11 ай бұрын
Very interesting. Just the other day I had to write some pretty common extension methods, I asked ChatGPT to generate it's own for each and what it came up with was pretty good. For simple boilerplate things I'll definitely consider using it to at least stub out certain things.
@pferdebert
@pferdebert Жыл бұрын
3:50: you can do the same in C++ for (auto [r, num] : map) { ... } or for (const auto& [r, num] : map) { ... }
@DavesGarage
@DavesGarage Жыл бұрын
Very cool, I've never tried that!
@cheez3d
@cheez3d Жыл бұрын
@@DavesGarage They're called structured bindings.
@matthewyoung2554
@matthewyoung2554 Жыл бұрын
Requires C++17
@unrealminigolf4015
@unrealminigolf4015 Жыл бұрын
This is fantastic Dave. Thank you.
@vcv6560
@vcv6560 Жыл бұрын
This was much more valuable than the problems I tried, 68K assembly. Old enough I still remember, and easy to optimize. Thanks for this video.
@toby9999
@toby9999 Жыл бұрын
The 68K CPU was nice to program
@wesleyelsberry5433
@wesleyelsberry5433 Жыл бұрын
@@toby9999 I did just enough iAPX-86 assembly to come to loathe it. The 68K's assembly language looked to me quite similar to IBM 370 Assembly, and as you say, quite pleasant to work with. The story I've heard was that the IBM PC got built with the 8088 because the engineers tasked with making the prototype were given a very compressed development schedule, and while they liked the looks of the 68008's specification, they were already familiar with building Intel 8085 systems, and the 8088 used the same support chips.
@AndersonPEM
@AndersonPEM Жыл бұрын
I have also tested this technology for code. It's like having a junior with ADHD. It can help you with a lot, but you'll still need to give him directions. It's good. I like it. In the end of the day you still have to know how to code to infer where things can be improved or where things went bad.
@landrec2
@landrec2 Жыл бұрын
Oh Ive been waiting for this! Thanks Dave!
@xMrJanuaryx
@xMrJanuaryx Жыл бұрын
I find it most useful on the topic of your next video. ChatGPT has optimized a lot of my code over the past few months.
@DylansIlliterateMind
@DylansIlliterateMind Жыл бұрын
Love the approach you have for your videos, it's very inspiring. It would be super cool if you could at some stage do a few videos about using the VS code plugin for chatgpt (Open AI CODEX). I've been trying it out but it still feels quite clunky.
@johnjay6370
@johnjay6370 Жыл бұрын
I used Chat GPT to setup a timer for a pic32 that i was not familiar with using. Something like this can take a while to figure out and looking through spec sheets to setup the correct registers can take time, well chat GPT is now my best friend and I am thinking of paying for the subscription and have it as my helper.. It got some things wrong, but it got the main things correct and helped point the user in the correct direction... Great Video!!!
@Arcadenut1
@Arcadenut1 Жыл бұрын
It's a very useful tool, but like all tools you need to know its limitations and how to use it correctly, which this video illustrates very well. I can see this supplementing things like StackOverflow, but it can't replace it because that's where part of it's knowledge comes from.
@drewwilson8756
@drewwilson8756 Жыл бұрын
Thanks for the lesson Dave! Looking forward to seeing ChatGPT check on code. I would imagine that option has more value.
@SaintSaint
@SaintSaint Жыл бұрын
Yes! I often use it to insert comments in my code. Then I check to make sure the comments are correct. Or I'll use it to even write requirements of some scripts that I had to hammer out. It's a great way to answer my boss when he says "what all do your scripts do?" or "Why do we need your scripts to fix our vendor's output?" Chat GPT misses a few things. I miss a few things that I wanted to talk about. But having a second set of eyes on my code is where ChatGPT really shines.
@UlfAndersson-zf2yk
@UlfAndersson-zf2yk Жыл бұрын
Dave, thanks again! And please tell us more, we need this!
@konberner170
@konberner170 Жыл бұрын
Once again, Dave puts the "awe" into awesome.
@tristan4777
@tristan4777 Жыл бұрын
Thanks Dave. It's great to see some useful examples of what can be done with AI (ChatGPT in particular).
@shaneferrell7852
@shaneferrell7852 11 ай бұрын
Looking forward to seeing the next part!
@marcosantiago6818
@marcosantiago6818 Жыл бұрын
Lovely video. I really enjoyed it. I actually, started a small little project to create a natural language interface in order to query a relatively simple database. From start to finish it took me a couple of hours, as I was experimenting and approached it as though I did not know anything about coding. As a Business Analyst and Software project manager, I found this to be very impressive. I don't see ChatGTP as threatening the coding community so much as a tool (or partner(, and maybe even a consultant of sorts. It just requires one to guide and work with the tool as though working with another collaborator.
@wisteela
@wisteela Жыл бұрын
It really is brilliant. I love the fact it can even do ancient languages like COBOL and Fortran.
@tompov227
@tompov227 Жыл бұрын
Pretty cool seeing someone else use the Warp terminal !
@lesleymunro4964
@lesleymunro4964 Жыл бұрын
I just tried chatGPT for the first time yesterday. I'm not a coder, so I asked it to write a small "hello world" program which had a window and a button in it, and a counter which counts the clicks. I had it write it for linux. It chose python first, so I asked it to use C++, and it used a GTK library of some sort for the window stuff. It was amazing just watching it write the code. I tried iterating quite a few times (9 times I think), and it would sometimes jump into different languages, or drop stuff it had did right previously. I think it was more my mistakes in feeding in the correct prompts for what I wanted. I think to use it, you need to be clear with it what languages you want to use, and in any corrections you want it to use the code previous in the conversation. I found it an incredibly fascinating tool, and even if it doesn't get you all the way there, it certainly gives you enough code that you can tweak to get it to do what you want. It's going to be game changing as it learns more data.
@hstrinzel
@hstrinzel Жыл бұрын
WOW, amazing. THANK YOU so much for such a powerful demonstration. I have a question: By HOW MUCH FASTER was it to involve the CUDA GPU? Keep right on producing such amazing videos.
@Josh-gq7uh
@Josh-gq7uh Жыл бұрын
Really valuable video. Gives a lot of possibilities in maximizing the usefulness of chatGPT.
@jim4859
@jim4859 Жыл бұрын
Very timely. I've just started exploring Chat-GPT
@ChrisM541
@ChrisM541 Жыл бұрын
You DO know it's banned in stackoverflow etc !! - do you know why?!!
@tedkrapf1302
@tedkrapf1302 Жыл бұрын
Thanks Dave! Great demo :)
@alonzosmith6189
@alonzosmith6189 Жыл бұрын
I am new to writing scripts. I was pretty good at using dos batch files, still use robocopy to backup my laptop and desktop. I asked Chatgpt for help with powershell, just received commands with description to use. Will continue to use Chatgpt for examples.
@Will-kt5jk
@Will-kt5jk Жыл бұрын
I can see some benefits in it highlighting methods/approaches you haven’t thought of & using it as a sounding board by coaching it through writing code in a “teaching is learning” sort of way. But for the most part, so far my experiments have lead me more to thinking it would still be quicker to get the product by hand-coding & using stack overflow/google. I might miss some additional learning along the way, but get to the result faster. I guess it’s a bit like pair-programming in that way except only one human is learning through the process, rather than 2 (despite others’ reports of ChatGPT remembering across different chats, I’ve not found that to be the case - attention seems restricted to within 1 chat session, with the exception that disliking a result in one chat can seemingly add a new guardrail for new chats
@ai15208
@ai15208 8 ай бұрын
its amazing how i have been using windows for most of my life and never heard of you or this channel, 1 year of using linux and the youtube algo shows me this.....I think you might enjoy that fact, as a low performing engineer with concentration issues , i find your videos really calming even though i dont understand most of them =).
@mrfoodarama
@mrfoodarama Жыл бұрын
Love that Dot Matrix sound!
@dvongrad
@dvongrad Жыл бұрын
The largest number that can be converted to Roman numerals with common letters (ie: not the use of bar-M, etc.) is 3999 = MMMCMXCIX, although the longest Roman numeral string does indeed come from converting 3888.
@generovinsky
@generovinsky Жыл бұрын
Thanks for the great advice and info Dave ;)
@Nusremmus
@Nusremmus Жыл бұрын
I knew this was coming. I can see how it can up your coding game. Definitely going to impact StackOverflow. I think it also proves that it is nowhere near sentient. I can't wait to play around with this. Thanks for another awesome video!!
@Atheist7
@Atheist7 Жыл бұрын
Better start using it now, they're going to charge for it starting on Mar. 13.
@Nusremmus
@Nusremmus Жыл бұрын
@@Atheist7 I did not know that. Any idea what estimate pricing might be?
@mylittleparody2277
@mylittleparody2277 Жыл бұрын
An awesome video! Thank you so much for sharing your knowledge with us.
@DavesGarage
@DavesGarage Жыл бұрын
Glad it was helpful!
@jameskeel
@jameskeel Жыл бұрын
Thank you for sharing as I have hacked for many years, but I still learn more today.
@jsmythib
@jsmythib 4 ай бұрын
I have been a hobby programmer since 1982...I have been using gpt4 for assistance for a few months now. The capabilities it does have leave me in awe. It has helped me break barriers- wickedly. :) Its my guess there was a massive amount of information sampled in the fields..Which seems logical considering the resources they could openly used. So much fun :)
@chuxxsss
@chuxxsss Жыл бұрын
Love the tape drive, with the old rabbit.
@robtathome
@robtathome Жыл бұрын
Dave - incorporating different processors with multi-threading, you must be a monster programmer!
@kristapskarnitis9613
@kristapskarnitis9613 Жыл бұрын
What a great video! Im sad I only now stumbled on to this channel As a self taught mainly web stack developer it really helps to hear the thought process of what I would call a real programmer :D Thank you!
@repairstudio4940
@repairstudio4940 Жыл бұрын
I absolutely love your channel liked and subbed of course!
@SuperFighter94
@SuperFighter94 Жыл бұрын
From my uses, i have come to similar conclusions to Dave here. I find it also very helpful to give it code that is poorly commented and tell it to tell me what it does or add comments to it. Context is King with chatGPT so making sure you ask narrow, well define questions will give you better results. Too broad or without context will give you something, but it might be a wild goose chase for hours or even days.
@tordjarv3802
@tordjarv3802 Жыл бұрын
I did almost the same but for a Sudoku solver in Rust (a language I’m currently learning). It worked well except when I tried to get it to make a GUI for the app, but that wasn’t ChatGPT’s fault since the GUI library it tried to use had update a lot since ChatGPT was trained. I think that these technologies will augment programmers rather than replace (which most people seems to think), just like compilers augmented programmers in the late 50:ies and early 60:ies.
@nmartin32950
@nmartin32950 Жыл бұрын
Augment, yes indeed. Just like visual studio 2022 create a complete working app as a starting place for a new solution. Turbo C wouldn't even write a main() template for me back in the day, hahaha.
@nickwallette6201
@nickwallette6201 Жыл бұрын
It's reasonable to think that... for now. But, the key assumption here is that the AI's abilities are constant. Think of it this way: Today, it can take a simple request, and write a small module of code to accomplish that. (Which, alone, is extraordinary. Like, breathtaking. If this didn't stop you in your tracks the first time you saw it, you're not comprehending just how amazing that actually is.) It is doing this based on information it has consumed from humans, in the often vague and imperfect way that we communicate. If you ask AI to describe the code it wrote, it's often impeccable documentation. Well written, clear, concise but thorough, and accurate. Now imagine what happens when you use _that_ documentation as an input to AI, vs. the man-pages and HTML docs that we've cobbled together as an afterthought. Then, ask it to develop the code that makes up the compilers, interpreters, and libraries that it's using to support the code it writes for you. So now, it not only has better source documentation, but might potentially better understand the source code as well, giving it a whole other layer of insight. After a while, we don't even necessarily care about the libs and compilers and their documentation, since the AI has created them, and the AI uses them to produce code for us. At that point, why ask it to produce code? Why not just ask it to produce a binary? Imagine the efficiency of what it could come up with, if it didn't need to be optimized for human understanding. While all of this is happening, the scale of the AI's intelligence, itself, is increasing in sophistication. In that light, it's not hard to imagine AI being able to craft much larger projects in the future. With today's AI engines? No. But, as AI gets better at writing code, it can potentially start being the tool that's used to create itself. (Not necessarily in the SkyNet sense, but in the "better tools to make better tools" sense.) This will only accelerate the scale of its abilities, as less time is wasted implementing ideas. So. It's not hard to imagine that in a few short years, we could see simple AI-generated applications. Maybe text editors or website generators, or who knows what. It'll probably be a little while before we ask Bing to create a Microsoft Office clone, but maybe not as long as you would think. It just has to get over the hurdle of breaking a large problem into a series of small ones, and then keeping track of how they all fit together. Eventually, it's going to be infinitely better at that than we are.
@norcal6181
@norcal6181 Жыл бұрын
I asked it basically the same question (worded slightly differently about int to roman conversion) and in Python it gave a solution using an algorithm that is closer to the C++ solution it gave here.
@ianwarren958
@ianwarren958 Жыл бұрын
Awesome. May have to have a play with chat GPT and see how it is writing something I’m more familiar with like MS SQL queries, stored procedures SSIS ETL etc that I haven’t done for a few years! This could be fun!
@wesleyelsberry5433
@wesleyelsberry5433 Жыл бұрын
I have various projects with SQL in stuff like T-SQL from SQL Server, but would like to shift to Postgresql. ChatGPt seems to do a creditable job in translating between dialects of SQL. Lately, I've just been asking for translations to round out SQL Server, Postgresql, MySQL, and SQLite, so I can go almost any which way.
@johnlow3894
@johnlow3894 Жыл бұрын
those subtle jokes and dot matrix printer effects! lol thanks Dave
@ryanwalker4660
@ryanwalker4660 Жыл бұрын
Nice video, I enjoy ChatGPT, it's not perfect but it works great for getting an example and incorporating it into your own work.
@D3M3NT3Dstrang3r
@D3M3NT3Dstrang3r Жыл бұрын
I have been using it to write a basic square wave generator that displays the current frequency on the oled display on an esp32 board. It definitely can write the code but it does need specifics to get things right. Even then you will be cleaning or changing some code here and there to meet your requirements. However as a novice coder I have now written code that I otherwise would not have currently been able to alone.
@SaintSaint
@SaintSaint Жыл бұрын
yeah. I've found that it's deceptive. Kind of like getting your answers from stack overflow. There's a lot of "Yes that's right... but not in my case" or situations where the code works but only coincidentally and it's not germane to the goal. This is a fault of the operator(me)... but it's also a fault of the inability to penetrate the spapiential circle of understanding.
@DarinM1967
@DarinM1967 Жыл бұрын
Software like ChatGPT is bringing all of us closer and closer to the day when we describe our programs in What we want, instead of always in How to do it, in any language that fits the job best.
@kwazar6725
@kwazar6725 Жыл бұрын
Real nice dave. Liked the fx80 and impressed chatgpt does the multithreaded and gpu translation. Pity the context is not permanently persisted..
@nkronert
@nkronert Жыл бұрын
Are you sure it was an fx80? I thought so too, but I guess there were many more models of dot matrix printers around at the time. For sure it didn't sound like a Star-NL10 🙂
@DodaGarcia
@DodaGarcia Жыл бұрын
How did I not know about this channel? It's fantastic!
@TheHelvetican
@TheHelvetican Жыл бұрын
I'm loving it. More please.
@jpandrews2791
@jpandrews2791 Жыл бұрын
Used it to write a php script to cycle through every pdf file in a directory, execute a utility to convert them to text files, find and extract tables of data, combine the data and insert into a sql db. Yes, required a fair few iterations but it got there in the end. Also used it to help write clauses for a contract; put in your attempt and ask chatgpt to improve on it and often it does. It seems to know the date but not the time. I asked it why it knew the date and not the time and got into an argument about that. Asked it whether it would reveal some information to someone if knowing that information would cause that person harm; got into another argument about that. Chatgpt is the first version and I think it's remarkable - as long as you carefully curate both your input and it's output.
@VideoWow7184
@VideoWow7184 Жыл бұрын
Great video!. I'm wondering, in terms of the amount of guidance you need to give ChatGPT to arrive at a solution you are happy with do you think ChatGPT makes you more or less productive vs writing the code yourself?
@glennrjohnson
@glennrjohnson Жыл бұрын
Thanks Dave - What interests me as much, or even more than the code, however - is the conversation you had with ChatGPT to get it to refine the results. That meta-code is the new code, right? Would you be able to post a transcript of the conversation/results that show the continual refinement of the output?
@wilhallman2890
@wilhallman2890 Жыл бұрын
Been coding for 30 years and ChatGPT is a MAJOR game changer.
@JacobCanote
@JacobCanote Жыл бұрын
I am with ya. It's fun to see what it comes up with it.
@mjmeans7983
@mjmeans7983 Жыл бұрын
The roman number system reported by ChatGPT forgot N (nil) which was rarely used, and only to represent an actual quantity of zero. It also forgot that historical examples used a subtractive notation that allowed more than one subtractive symbol or a subtractive symbol in a different register, like "IC" would be 99 instead of XCIX. The Latin word for 18 literally means 2 from 20 and so it was written as IIXX instead of XVIII (one fewer symbol). Even IIIC was used for 97 instead of IXVII. Whatever list of symbols are the shortest is the most historically correct answer, rather than "a correct" answer. Clay tablets apparently were too expensive to waste space using more symbols than necessary. Now, ask ChatGPT to create a CUDA program to mine Bitcoin in a way that is more energy efficient than the dedicated ASICs from Bitmain.
@RicardoSantos-oz3uj
@RicardoSantos-oz3uj Жыл бұрын
Neural networks copy and combine. They don't create. It will be able to write something someone else has done (without giving any attribution). But not invent something new. There are no aha moments for a neural net. As for Bitcoin. It was designed to be wasteful. The solution is to simply design another crypto that is less wasteful.
@user-nu5ib2ri9o
@user-nu5ib2ri9o Жыл бұрын
@@RicardoSantos-oz3uj Your own brain is literally a neutral network.
@user-nu5ib2ri9o
@user-nu5ib2ri9o Жыл бұрын
Don’t forget that this thing programs on a whiteboard. Give it a computer to test its own code, and then see what happens.
@thromboid
@thromboid Жыл бұрын
@@user-nu5ib2ri9o My thinking exactly - give it the ability to actually *do* stuff, and the ability to learn from that, and the results could be world-changing.
@microcolonel
@microcolonel Жыл бұрын
It took me about 20 messages to get ChatGPT to correct a decimal number parsing subroutine in RISC-V assembly, but it was very good fun. It struggled with accidentally shadowing registers, refusing to shadow them when it didn't matter, and assuming that there is an instruction to multiply with an immediate in RISC-V, then that it would be worth emitting a constant pool to divide by ten rather than using shift and subtraction, then struggling to accumulate in the correct register, then zeroing the pointer argument before putting it into a temporary register... ...but still really impressive, and does structural programs much better than assembly.
@microcolonel
@microcolonel Жыл бұрын
I'm interested to see how systems like this can help with early rewriting of handmade SIMD kernels into vector code for the RISC-V V extension; maybe you give it a generic symbolic program that has the same behavior, then the existing SIMD kernels (on whatever platforms they're available for) and then ask for the vectors. I think ChatGPT's current training set has too little RVV code and discussion thereof to do this right now, but a later set might do it quite well.
@bakedbeings
@bakedbeings 9 ай бұрын
Having it write the make/cmake scripts would be a big help ❤
@rufio.tf2
@rufio.tf2 10 ай бұрын
Thank you for making this! The old printer sounds during ChatGPT's output writing has me laughing out loud.
@btd6vids
@btd6vids Жыл бұрын
Hey Dave, the “if __name__ == main” is just Python’s equivalent of a main method. Python files are just scripts that will run any code that isn’t inside a function definition or similar when you run them, so that if statement means if this file is the file you chose to run, execute this code. If you don’t have that, it will still run, but it would also run if you included that file in some other code, which could be unintended.
@bungalowjuice7225
@bungalowjuice7225 Жыл бұрын
I have never programmed before, and I pretty much only know how to turn on the computer. I managed to make a working tictactoe game with ChatGPT. In just a couple of minutes. It's my "hello world" moment. I can learn so much from this AI.
@AndersNielsen
@AndersNielsen Жыл бұрын
I've used it multiple times to optimize code and most of the time, i get better knowledge on new ways to do things.
@ChrisM541
@ChrisM541 Жыл бұрын
Lol, You DO know it's banned in the main programming forums such as stackoverflow etc !! - do you know why?!! clue: massive bull + shitter
@CielMC
@CielMC Жыл бұрын
This showcases the characteristics of ChatGPT perfectly, it's just like Copilot, it can help you do a lot, especially the repetitive parts, but it's not "coming for our jobs", programming isn't just about writing code, and it can make a lot of mistakes that you need to see and fix yourself one way or another anyway.
@cliffmathew
@cliffmathew Жыл бұрын
Don't forget this algorithm is meant to learn, so I won't be surprised if it improves to a point where it can directly spit out optimized machine code. Programming languages will be irrelevant if humans are not involved.
@unusedTV
@unusedTV Жыл бұрын
if name == __main__ means that code block only runs if this is the main module. In other words, you can safely import this script to get the function and it won't execute that code block.
@wesleyelsberry5433
@wesleyelsberry5433 Жыл бұрын
It also was/is? a requirement that your code have that standalone test to make use of the 'multiprocessing' module. That was the case years ago, but I haven't checked it lately.
@nektariosmusic
@nektariosmusic 11 ай бұрын
Wow, this was jaw dropping! I couldn't believe my eyes...
@slimyelow
@slimyelow 3 күн бұрын
She PT is my best friend at work. Last week she did all my regex work and the week before all my linux and docker work. This week it's on to xsl, xml, vuetify and vue 3. My TL likes me and offered a raise. - what more can I say...
@GodSpeaksInMath
@GodSpeaksInMath Жыл бұрын
Hey I remember that shirt... vintage 90s.. i had a few...great vids dave
@bit-tuber8126
@bit-tuber8126 Жыл бұрын
Going to be playing with this for sure
@kellyweb
@kellyweb Жыл бұрын
Love the dot matrix printer audio bite. LOL
@midtskogen
@midtskogen Жыл бұрын
I agree that this will become an important tool. As for use in big companies, maybe wait until the copyright lawyers have fought it through and the legal dust has settled. It's impressive that the AI can be guided to a working solution, but I don't think I'd have the patience. I would give it a few attempts, then correct the code myself. This will be a great tool for getting started with things. When writing code myself I find it efficient to write an outline which I might know will not work, perhaps not even compile. Then I will go on fixing it. This AI can do the first step and be a very time saving tool. Back in the 80's there was much talk about fifth generation programming languages and programming languages of the time were only to be considered temporary tools towards such languages. The programmer should simply describe a problem, not the algorithm, and the computer would solve it. Since then many things have been marketed as fifth generation languages and been far from it, but maybe now we're beginning to see what the real thing looks like.
@ChrisM541
@ChrisM541 Жыл бұрын
It's NOT 'AI' - a term that's extremely abused...everywhere today. You know damn well there's ZERO Artificial Intelligence today. Why? if there was, we wouldn't be here. Today's ai is nothing more that an extremely poor pattern matcher.
@yourwallet4219
@yourwallet4219 Жыл бұрын
Yes, I think it will be very strong for creating boilerplates and perhaps the inevitable menial tasks that come with the start of every new project. I still think it will always be good to know how to write from scratch, but it definitely does, at the least, work as an extra set of eyes and can add an extra angle to one's perspective. I just tried an AI art generator for the first time the other day, and I was blown away with the creativity, detail, and understanding of the workings of the real/practical world, but maybe that's just through association, rather than actual full understanding of what it is designing.
@ChrisM541
@ChrisM541 Жыл бұрын
@@yourwallet4219 " I still think it will always be good to know how to write from scratch" --> What a shocking, self-damning statement. If this is the general/mass 'level' of programming today, Hell mend us.
@yourwallet4219
@yourwallet4219 Жыл бұрын
@@ChrisM541 Not every statement has to be profound. Go kick rocks.
@codytownsend3259
@codytownsend3259 Жыл бұрын
Obviously it doesn't understand anything...it's a computer. Programmed to do something.
@UrknetLabradories
@UrknetLabradories 8 ай бұрын
I would love to see a follow up on this now that things like gpt-engineer are available
@maxgood42
@maxgood42 Жыл бұрын
I was playing with C,GTP getting it to build some c# code and it got 2/3 right and 1/3 wrong. when I asked it to explain the odd code the conversation got wierd. Then I tryed talking to it with mixed gramma and it worked eg; "why did you not use the Execute function in lookback past start conversation first code example" as you can see I was using code type words mixed in my questions (why did you not use the Execute function) a human type wording, and (lookback past start conversation first code example) like a command that would be written in a code, and it under stood and responded with more accuracy. this shows that we are asking a program to do things and it will understand different types of lingo and it works realy well.
@Teyros
@Teyros Жыл бұрын
I love that comment, "I speak python with a C accent". I burst out laughing Great material man.
@DavesGarage
@DavesGarage Жыл бұрын
Much appreciated! :-)
@200380051
@200380051 Жыл бұрын
Still not convinced how it can help with existing projects, the problem being how to give it all the relevant context. And then the iterations to fix things, writing tests.. is that really faster than DIY? Until we figure out how to input massive context data efficiently, I see it more like a "StackOverflow assistant" where you can have it generate snippets that apply to a precisely scoped subject, and you integrate a mano from there.
@sjoervanderploeg4340
@sjoervanderploeg4340 Жыл бұрын
I used ChatGPT for so many different things, from programming to playing science fiction RPG's to come up with story ideas :D
@BrianKapellusch
@BrianKapellusch 10 ай бұрын
Hey... What camera do you use? The picture quality is flawless.
@HikikomoriDev
@HikikomoriDev Жыл бұрын
Excellent tool for learning code and retaining it.
@ChrisM541
@ChrisM541 Жыл бұрын
You DO know it's banned in stackoverflow etc !! - do you know why?!!
@jamesclark2663
@jamesclark2663 Жыл бұрын
Well this is the sort of thing I like to see about 'how chat GPT will replace programmers'. Clearly as it stands now it will not. I always tell people that programming isn't about writing code it's about solving problems using computers. And you're not going to see non-programmers spitting out real solutions using this tool. Excellent example of how to work with the tools available, Dave!
@vinny142
@vinny142 Жыл бұрын
" 'how chat GPT will replace programmers'. Clearly as it stands now it will not. " And it never will. The simple truth is that AI can't come up with new solutions, it can literally only look at what it has seen before and find the "best match" to the input, *IF* it understand what the input means. And understanding what the input means is where most of the programmer's problems are even if you are human and are a million times better at undertstanding text than any AI will ever be. If you can use google, and any modern IDE, then ChatGPT really is just a code generator that makes stuff you can't use without fixing it first. It's nice that ChatGPT can write some code for you, but it's useless if you don't understand what the code does. It's like getting an external programmer to write some code without giving you documentation. But you can make it do the boring stuff? Yes, and if you have any modern IDE there are shortcurts that do all that for you, but then while keeping your currentcode in mind (something AI can't do) TL;DR: just learn how to use the tools that you have, it's faster, gives you better code and makes your life a lot easier.
@Rakkoonn
@Rakkoonn Жыл бұрын
Even if it was perfect, you'd still have to exactly specify what you want and verify it works. In that case it would simply be a higher level language, still needing programmers.
@jamesclark2663
@jamesclark2663 Жыл бұрын
@@Rakkoonn Exactly
ChatGPT Tutorial for Developers - 38 Ways to 10x Your Productivity
28:13
Programming with Mosh
Рет қаралды 3,5 МЛН
How I Would Learn to Code in 2024 (if I had to start over)
13:44
Internet Made Coder
Рет қаралды 51 М.
ISSEI funny story😂😂😂Strange World | Pink with inoCat
00:36
ISSEI / いっせい
Рет қаралды 11 МЛН
0% Respect Moments 😥
00:27
LE FOOT EN VIDÉO
Рет қаралды 39 МЛН
Қайрат Нұртас & ИРИНА КАЙРАТОВНА - Түн
03:41
RAKHMONOV ENTERTAINMENT
Рет қаралды 1,5 МЛН
Эта Мама Испортила Гендер-Пати 😂
00:40
Глеб Рандалайнен
Рет қаралды 3,1 МЛН
How I Coded An Entire Game Using ChatGPT
19:48
Nick White
Рет қаралды 120 М.
32 ChatGPT Tips for Beginners in 2023! (Become a PRO!)
31:00
AI Foundations
Рет қаралды 1,1 МЛН
ChatGPT Blew my Mind!  Now it can code AND learn from the results!
12:18
You’re using ChatGPT wrong
9:31
Jeff Su
Рет қаралды 278 М.
Top 10 Best ChatGPT Plugins That Will Change Everything!
10:20
10 ChatGPT Life Hacks - THAT’LL CHANGE YOUR LIFE !!
11:00
Hayls World
Рет қаралды 2,5 МЛН
I Tried Every AI Coding Assistant
24:50
Conner Ardman
Рет қаралды 640 М.
Master the Perfect ChatGPT Prompt Formula (in just 8 minutes)!
8:30
ChatGPT Tutorial: How to Use Chat GPT For Beginners 2024
27:51
Charlie Chang
Рет қаралды 2,9 МЛН
How to Use ChatGPT as a Powerful Tool for Programming
31:08
Corey Schafer
Рет қаралды 293 М.
Хомяк может разблокировать АЙФОН
0:14
Собиратель новостей
Рет қаралды 426 М.
I wish I knew this When Istarted Programming #school #software  #codingtips
0:34
Claude Ams - Programming Guru 💻
Рет қаралды 14 МЛН
phone charge game #viral #tranding #new #reels
0:18
YODHA GAMING RAAS
Рет қаралды 10 МЛН