Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Coding with ChatGPT and Other LLMs

You're reading from   Coding with ChatGPT and Other LLMs Navigate LLMs for effective coding, debugging, and AI-driven development

Arrow left icon
Product type Paperback
Published in Nov 2024
Publisher Packt
ISBN-13 9781805125051
Length 304 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Dr. Vincent Austin Hall Dr. Vincent Austin Hall
Author Profile Icon Dr. Vincent Austin Hall
Dr. Vincent Austin Hall
Chigbo Uzokwelu Chigbo Uzokwelu
Author Profile Icon Chigbo Uzokwelu
Chigbo Uzokwelu
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Part 1: Introduction to LLMs and Their Applications
2. Chapter 1: What is ChatGPT and What are LLMs? FREE CHAPTER 3. Chapter 2: Unleashing the Power of LLMs for Coding: A Paradigm Shift 4. Chapter 3: Code Refactoring, Debugging, and Optimization: A Practical Guide 5. Part 2: Be Wary of the Dark Side of LLM-Powered Coding
6. Chapter 4: Demystifying Generated Code for Readability 7. Chapter 5: Addressing Bias and Ethical Concerns in LLM-Generated Code 8. Chapter 6: Navigating the Legal Landscape of LLM-Generated Code 9. Chapter 7: Security Considerations and Measures 10. Part 3: Explainability, Shareability, and the Future of LLM-Powered Coding
11. Chapter 8: Limitations of Coding with LLMs 12. Chapter 9: Cultivating Collaboration in LLM-Enhanced Coding 13. Chapter 10: Expanding the LLM Toolkit for Coders: Beyond LLMs 14. Part 4: Maximizing Your Potential with LLMs: Beyond the Basics
15. Chapter 11: Helping Others and Maximizing Your Career with LLMs 16. Chapter 12: The Future of LLMs in Software Development 17. Index 18. Other Books You May Enjoy

Getting into LLM-powered coding

Here, you get to use an LLM to produce code for you! It can just reel off a load of code for you from some English. If you’re lucky or the code is simple and commonly used enough, the code will just work straight away! This is going to save you a lot of time and effort!

Here is a series of prompts and their resulting code responses by Gemini. From these, we can start to see the sorts of things that can be done easily by chatbots and what is more difficult and error-prone.

We can then analyze and see how to improve our prompts and how to debug when we get errors.

Here is Prompt 1: Please give me an example of python code to make a button for a webpage where if you click the button it says "hello".

This is HTML, so should be put into a web page on a website editor or it can be tested and played with in an HTML interpreter, such as https://htmledit.squarefree.com/, https://onecompiler.com/html, or https://www.w3schools.com/tryit...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime