Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Coding with ChatGPT and Other LLMs
  • Table Of Contents Toc
  • Feedback & Rating feedback
Coding with ChatGPT and Other LLMs

Coding with ChatGPT and Other LLMs

By : Dr. Vincent Austin Hall, Dr. Vincent Austin Hall, Chigbo Uzokwelu
4 (4)
close
close
Coding with ChatGPT and Other LLMs

Coding with ChatGPT and Other LLMs

4 (4)
By: Dr. Vincent Austin Hall, Dr. Vincent Austin Hall, Chigbo Uzokwelu

Overview of this book

Keeping up with the AI revolution and its application in coding can be challenging, but with guidance from AI and ML expert Dr. Vincent Hall—who holds a PhD in machine learning and has extensive experience in licensed software development—this book helps both new and experienced coders to quickly adopt best practices and stay relevant in the field. You’ll learn how to use LLMs such as ChatGPT and Bard to produce efficient, explainable, and shareable code and discover techniques to maximize the potential of LLMs. The book focuses on integrated development environments (IDEs) and provides tips to avoid pitfalls, such as bias and unexplainable code, to accelerate your coding speed. You’ll master advanced coding applications with LLMs, including refactoring, debugging, and optimization, while examining ethical considerations, biases, and legal implications. You’ll also use cutting-edge tools for code generation, architecting, description, and testing to avoid legal hassles while advancing your career. By the end of this book, you’ll be well-prepared for future innovations in AI-driven software development, with the ability to anticipate emerging LLM technologies and generate ideas that shape the future of development.
Table of Contents (19 chapters)
close
close
Free Chapter
1
Part 1: Introduction to LLMs and Their Applications
5
Part 2: Be Wary of the Dark Side of LLM-Powered Coding
10
Part 3: Explainability, Shareability, and the Future of LLM-Powered Coding
14
Part 4: Maximizing Your Potential with LLMs: Beyond the Basics

Summarizing code for understanding

This section is about how to summarize code you’re given or find that is opaque to you, the functioning of which you can’t quite figure out. Alternatively, maybe you just don’t want to spend the time wracking your brain to figure it out when you can automate that process and save energy and time.

Here, I asked Gemini, from Alphabet, to give me some code I don’t understand:

Could you write a longish, complicated script of Python 3.10 code and don't tell me what it does, very few comments and no text after the code.

This is the code from Gemini (+Claude 3):

import requests
from datetime import datetime, timedelta
import pandas as pd
import matplotlib.pyplot as plt
def fetch_data(url, params):
    response = requests.get(url, params=params)
    response.raise_for_status()  # Raise an exception for non-200 status codes
    return response...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY