3 Simple Ways ChatGPT Can Make You a Better Coder

Поділитися
Вставка
  • Опубліковано 17 гру 2022
  • In this video I show three ways you can use chatGPT to improve your code.
    Follow me on twitch for live coding streams: / medallionstallion_
    My other videos:
    Speed Up Your Pandas Code: • Make Your Pandas Code ...
    Speed up Pandas Code: • Make Your Pandas Code ...
    Intro to Pandas video: • A Gentle Introduction ...
    Exploratory Data Analysis Video: • Exploratory Data Analy...
    Working with Audio data in Python: • Audio Data Processing ...
    Efficient Pandas Dataframes: • Speed Up Your Pandas D...
    * UA-cam: youtube.com/@robmulla?sub_con...
    * Discord: / discord
    * Twitch: / medallionstallion_
    * Twitter: / rob_mulla
    * Kaggle: www.kaggle.com/robikscube
    #chatgpt #python #coding

КОМЕНТАРІ • 54

  • @juan.o.p.
    @juan.o.p. Рік тому +23

    With ChatGPT + Copilot you can automate so much "boring" stuff, it's amazing. I'm currently using them for writing Docstrings for every function, writing tests, generating fake data to test data pipelines, explain how to use new packages... Great video 😃

    • @robmulla
      @robmulla  Рік тому +5

      I totally agree. Learning how to use these tools effectively is going to become more and more important when coding. I’m just getting started with copilot and suggestions it generates can be hit or miss but overall very helpful. I tried to make the examples in this video less about code generation and more about code improvement instead of code generation because that’s where I see chatGPT being more helpful than copilot.

    • @rans0101
      @rans0101 Рік тому

      Is copilot helpful? I read negative comments about it

    • @gravgor
      @gravgor Рік тому

      @@rans0101it is

    • @confounded_feline
      @confounded_feline Рік тому

      hahah me too. It has cut so much time in doing all the stuff you mentioned some of which I often procrastinate on while I focus on the interesting stuff. I think there will be a lot of stigma around it for this usecase while it's new. Much of the criticism surrounds it's ability to present plausible looking answers while being incorrect. However, if you are a professional engineer with experience you should realise it's another tool. You are in a different position to be able to interact and utilise this tech because you have a wealth of expertise you can use to apply common sense and analysis to which responses are terrible and which responses you can use and adjust as appropriate.

    • @mathisart
      @mathisart Рік тому

      Until it automates you out.

  • @PuerinTheHunter
    @PuerinTheHunter Рік тому +10

    It is nice to see a video that gets to the point immediately like this.

    • @robmulla
      @robmulla  Рік тому

      Thanks. I tried to make this one short and sweet.

  • @Woofawoof_wwooaaf
    @Woofawoof_wwooaaf 10 місяців тому

    I am glad that i found your channel for my coding journey

  • @CandyMan...
    @CandyMan... Рік тому +1

    i havent even watched 1 full minute and already learned a really great tip tysm rob this is great had to pause the video and give a 👍

    • @robmulla
      @robmulla  Рік тому

      Love that. Thanks so much for watching

  • @siqueirapaty
    @siqueirapaty Рік тому

    Great tips, thanks!

    • @robmulla
      @robmulla  Рік тому +1

      Glad it was helpful! Thanks for watching.

  • @dhaneshdeore1877
    @dhaneshdeore1877 Рік тому +3

    It's really good, atleast it's saving our efforts to find out code errors manually, making it time saving and informative at the same time..

    • @robmulla
      @robmulla  Рік тому +1

      Totally agree. ChatGPT Can be a great assistant for people hoping to improve their code.

    • @dhaneshdeore1877
      @dhaneshdeore1877 Рік тому

      Indeed its true, thanks for your efforts, please keep sharing good stuff, best wishes..!!

  • @lucerocj
    @lucerocj 9 місяців тому

    Would be curious to see an updated video using chatgpt and plugin 'Notable'. Feel like this solves the issue of being unable to setup environment variables, like an IDE, and just get to calling my own documents (notebooks).

  • @alberttu8120
    @alberttu8120 Рік тому +2

    I've found it pretty solid creating some working examples instead of navigating the documentation which can be a bit awkward or confusing at times. From there, you can mold the sample code into becoming something fit for purpose.

    • @robmulla
      @robmulla  Рік тому +2

      Interesting! I wonder if that is because it has been trained on the existing documentation or if it just can understand the code better. Will be interesting to see how this changes people's worflows in the future.

    • @alberttu8120
      @alberttu8120 Рік тому +2

      @@robmulla It could be documentation. For example, I was interested in consuming a large csv in chunks so I gpt searched "pandas read csv 1000 rows at a time" and it gave me something that looked like it was sourced from the documentation but a bit more readable and a solid code snip to work with. It might be an example that's preicse enough to get a good result, but something that took a couple of tries to get without gpt. From there I added in strict typing at read time. Once I got a few specifications working, I then used the actual documentation to see what else could be hedged as useful. Just a working style that has worked well. Overall, I wouldn't rely on gpt to solve my problem, but allow it to align me better with documentation so that I can solve a problem more effectively.

    • @rans0101
      @rans0101 Рік тому

      Awkward?

  • @timcesar1
    @timcesar1 Рік тому +1

    I love your videos and twitch channel. Well, by the way it works better than Stack Overflow "?

    • @robmulla
      @robmulla  Рік тому

      Thanks! As you saw in my last video it doesn't do better than stackoverflow in all cases (yet) but it's getting close and can answer very specific questions very well.

  • @CrazyFanaticMan
    @CrazyFanaticMan Рік тому +3

    ChatGPT is super helpful, used it to write backend code for me and everything it made mistakes I would correct it and ask it to modify the code which it was also happy to do and it would even apologize haha 😄

    • @robmulla
      @robmulla  Рік тому

      I love how polite chatGPT is! I've noticed that too.

  • @AmexL
    @AmexL Рік тому +1

    I’m glad I subscribed to this channel for vids like this. Sorry my comment reads like a bot haha. But as I’m seeing more of ChatGPT it really does seem like a helpful tool vs an apocalyptic machines takeover your job and the world kind of thing that the media likes to hype up.

    • @robmulla
      @robmulla  Рік тому +1

      Yea, it will probably slowly become more a part of our day to day lives that we rely on these types of models to make us faster. But the ideas still need to come from somewhere!

  • @thanana339
    @thanana339 Рік тому +1

    Awesome video, short and precise
    New subscriber 🫡

  • @patrickonodje1428
    @patrickonodje1428 Рік тому +2

    Woow.... Awesome

  • @titusfx
    @titusfx Рік тому +2

    I use it in that way, exactly. I also use it to read obfuscated code

    • @robmulla
      @robmulla  Рік тому

      Awesome! I’m sure there are other ways it can be used to improve code. I’d love to hear them if there are more I forgot to mention.

  • @philwebb59
    @philwebb59 Рік тому +1

    Hmm. I asked ChatGPT to translate a couple Excel macros into python code. It did stuff I hadn't considered. In one case it converted worksheet references into pandas dataframe cells, ws.Cells(i,j) to ws.iloc[i][j]. In the other case, it converted them to a list of lists, ws.Cells(i,j) to ws[i][j]. In both cases, after I shaped the input data, the code ran correctly. Kinda cool.

  • @ariseyhun2085
    @ariseyhun2085 Рік тому +2

    I've found myself using chatgpt to improve the wording before i write emails, post to Reddit, etc. It's kind of scary how much I'm easily relying on it, but its extremely useful for it.
    I feel like humans are going to rely on AI like this in the coming generations more than we realise. It could be seen as good or bad, it's not so clear yet

    • @robmulla
      @robmulla  Рік тому +1

      I’ve been doing exactly the same. Checking my emails or posts on social media and allowing it to improve my wording. The only reason I don’t always use the suggestions is it makes me sound more robotic and formal… it really is a game changer to me though.

    • @confounded_feline
      @confounded_feline Рік тому

      The big risk and the major criticisms I suspect will come from it's fallibility and it's potential to be used as a crutch for professionals and as a detriment to new learners. However, combining hard-earned expertise and wisdom it's an incredible tool to accelerate so many different workflows and use cases. Like anything, it simply must be used responsibly.

  • @philwebb59
    @philwebb59 Рік тому +1

    I played with it a bit more. I asked ChatGPT to add comments to a block of code. Most of the comments are what I'd call useless. "Iterate through the key-value pairs and update the dataframe row." "Sleep for 180 seconds *before making the next request to the server*." (It figured out why the sleep was there!) "# Save the DataFrame to a csv-file." "# Create a pandas DataFrame from the rows and columns." If you're parsing html, it does pull tags from the find's and select's to add to the comments. "# Get the school name from the `head-mast` element." That's kinda cool. But, overall it's fairly lame. Comments should describe the purpose behind what the code does, not describe the next instruction. Eh. It's a start.

    • @robmulla
      @robmulla  Рік тому

      I agree. Especially if you already know how to code the comments can seem a little obvious. But then you wouldn't need to use ChatGPT anyways :)

  • @jansindlar8896
    @jansindlar8896 Рік тому +1

    Looks like it did some wrong edits when doing the pythonification. "X

    • @robmulla
      @robmulla  Рік тому

      I didn’t catch that at first. Good eye! I haven’t found chatgpt to boost my productivity. But I have with copilot! Main difference is copilot is actually integrated into vscode.

  • @tokoshiro5
    @tokoshiro5 Рік тому +1

    I struggle to understand some topics bc I dont have a pair/professor to ask the dumb questions
    yesterday I tested the chatgpt to that and damn, now I have kinda a professor for free
    I think now I can step up my coding game and lower the frustration
    cool stuff is: if it gives you a code with errors, and you point them, the chatgpt corrects and try to find new ways etc
    I want to live inside it in my 2 week vacancy of january
    just need to find a new name to call my new friend...Jarvis?

    • @robmulla
      @robmulla  Рік тому

      I love it. ChatGPT is giving you more confidence to grow. That’s the best possible outcome IMHO. Jarvis sounds like a perfect name 😊

  • @user-fg3nu3ec4i
    @user-fg3nu3ec4i 3 місяці тому

    How is "not that bad" doing?

  • @lyrebird712
    @lyrebird712 Рік тому +2

    Hmm...
    So while I agree that this can be used to help as a tool, but there are going to be people who use AI (maybe not ChatGPT exactly) to cut out the programmer entirely. Maybe there will be a few highly skilled programmers that have the job of error-checking, but that will still completely gut the programming industry. I'm not anti-automation or even anti-AI, we just have to be very careful about how we manage these things going forward. AI is going to disrupt programming and many other industries too so we need to make sure it is all managed properly.

    • @robmulla
      @robmulla  Рік тому +1

      I agree 100% - we can't stop innovation but we can plan for how it will impact people in the future - and hopefully minimize the negative impacts.

  • @mahn_biggie3347
    @mahn_biggie3347 Рік тому +2

    I love your lessons , is that a bass I see over there do you mind gifting it to me as my Xmas gift

  • @termisher5676
    @termisher5676 Рік тому +1

    I asked chat gpt to tell what code of minecraft client does.
    Steals discoard api
    Steals steam autologin l
    Steals web browser data.

    • @robmulla
      @robmulla  Рік тому

      Wait what???? Is this serious? If so that’s awesome

  • @theoriginalmakaaka101
    @theoriginalmakaaka101 Рік тому

    The code is garbage and the talking is garbage BUT if you break it down into smaller tasks, it's helpful if you have ADD or brain fog and need something to get you from A to B. There is too much useless stuff that ChatGPT does but this is where it becomes a bit of an art to know how to structure your input to get better output.