DevSecOps

ChatGPT: The programmer’s new ‘rubber duck’

Today’s columnist, Zachary Curley of AT&T Business, writes about the pros and cons of ChatGPT and how developers can make best use of the new AI tool. (Stock Photo, Getty Images)

In the bustling tech hubs of Silicon Valley, the concept of the “programmer's rubber duck” has long been a well-known debugging technique. Developers often talk to an inanimate object (like a rubber duck) to explain their code, leading to insights or new perspectives.

But what if the rubber duck could talk back?

Enter ChatGPT, a tool that's revolutionizing the way developers work by combining the patience of the rubber duck with the ability to offer suggestions, review code, and engage in insightful dialogue.

From Silicon Valley start-ups to established tech giants, ChatGPT has become an essential piece of the developer's toolkit. We now think of ChatGPT as more than just a debugging tool; it's a development accelerator. It offers the patience of the classic “rubber duck,” but layers on the ability to make suggestions and offer insights. ChatGPT can democratize the entire development pipeline, opening it up to anyone with a computer.

Benefits

Large language models like ChatGPT have an enormous amount of potential and an almost countless number of use cases, restricted primarily by our own creativity. Some of ChatGPT's  benefits include:

  • Collaborative problem-solving: Developers can present ideas, get feedback, ask questions and receive instant feedback and support, allowing for quick iterations and improved problem-solving.
  • Significant reduction in time spent on manual tasks: From formatting existing data to generating keywords from a link, ChatGPT can cut down on the time spent on otherwise manual tasks.
  • Flexibility and ease of use: All anyone needs to get started is a browser (or mobile app) and the ability to ask questions. It doesn’t require expertise in AI or having a Ph.D. in statistics to get started, and the tool can even help people learn as they go.

Drawbacks

While powerful, ChatGPT does have limitations:

  • Dependence on clear and effective prompts: For someone who doesn’t know what they want or need, the tool can only help so much. There’s a saying in computer science and IT that goes “garbage in, garbage out.” This applies twice as much to ChatGPT since its core functionality has been built off what the user inputs or asks it.
  • Not a replacement for human creativity or ingenuity: The tool has been built off massive data sets taken from numerous sources. This makes it very good at simulating human speech and providing answers derived from “common sense” as it were. It has limited capacity to replace true ingenuity.
  • Undefined and unexplored copyright considerations: Ownership of the output of content, such as code, artwork, or similar, is currently unclear. Using copy-pasted code from ChatGPT could lead to legal issues down the line.
  • No guarantees on the quality or security of outputs: Even if the user asks ChatGPT to generate code with security in mind, it’s drawing from unknown sources of unknown quality, so there’s no guarantee the code will stay secure. Human input and review are vital to ensuring the tool outputs what’s needed in a way that’s useful, while meeting the required criteria.

Suggestions for effective use

Using ChatGPT can be overwhelming at first, but with some guidance and practice, it's an invaluable tool. Here are some ways to make the most of it:

  • Structure the prompt: Be clear, specific, and include relevant details. For example, instead of writing “I need help coding a function,” the request should say “I need help coding a function in Python that prompts users for an input and stores it as a variable.”
  • Ask directly: If users know what they need, ask ChatGPT directly. It’s always possible to start the project by stating the objective and asking what information ChatGPT needs to help achieve it     .
  • Elaborate: Offer additional details or insight as needed. If the user has a specific example, or if ChatGPT isn’t getting it quite right, it’s always possible to correct it or further specify what’s being asked.

I’ve listed some other useful prompts to give some ideas on how to get started with ChatGPT. Keep in mind that the way users write their prompt is very important and depends on what exactly they want to achieve. Spending time upfront to craft the right prompt will pay dividends in the long run, but the examples below will offer a good starting point:

  • “I want you to act as <role> and assist me with <task>.”
  • “Please write about improving <blank> as a <role>.”
  • “Using <example> please <execute task>.”
  • “Create <number> of suggestions, considering <modifiers>.”
  • “Explain <topic> using the Pareto principle.”

These prompts are some of the most popular ways to get started immediately. They are customizable for whatever users are trying to achieve and can be very effective when used appropriately. Don’t be afraid to employ trial and error either. It can take time to get used to ChatGPT and find the best prompts for a situation, and using multiple different prompts can be helpful in learning what works best.

ChatGPT is more than just a tool; it's a glimpse into the future of development. From Silicon Valley to tech hubs around the world, it's changing the way developers work, empowering them to be more creative, efficient, and innovative. Whether a seasoned developer or just getting started, ChatGPT offers a new way to approach coding challenges. Try it out and discover how it can transform the development process.

Even in the fast-paced world of Silicon Valley, where security and privacy are paramount, it’s possible to leverage tools like ChatGPT to brainstorm ideas at a generalized level. And, while tools like ChatGPT are not without their limitations, don’t dismiss them or rely upon ChatGPT exclusively. In the dynamic tech landscape, every new tool must undergo careful evaluation and approval for use. The responsibility lies with each of us to use technology ethically and effectively, ensuring that it aligns with our goals and values.

Zachary Curley, senior cybersecurity consultant, AT&T Business

Get daily email updates

SC Media's daily must-read of the most current and pressing daily news

By clicking the Subscribe button below, you agree to SC Media Terms and Conditions and Privacy Policy.