mongodb_2025_10
SitePoint Premium
Stay Relevant and Grow Your Career in Tech
  • Premium Results
  • Publish articles on SitePoint
  • Daily curated jobs
  • Learning Paths
  • Discounts to dev tools
Start Free Trial

7 Day Free Trial. Cancel Anytime.

Over the last couple of years, I have seen how software engineering has changed—not just with languages, frameworks, or tools, but how we approach the thought process of actually writing code. One of the largest forces of change in this realm is Generative AI, like GitHub Copilot and ChatGPT, not to mention a slew of others.

These tools aren't looking to replace software engineers, they're going to improve your capabilities, free up your time for banalities, and foster creativity. I will walk you through how you can integrate these tools effortlessly into your development workflows so you can generate project skeletons, improve UX, and generate automated documentation.

You can think of this as advice from a developer to another developer who has been experimenting with all of the above.

Why Use Gen AI Tools?

Let’s be honest, coding can be tedious at times, particularly when creating a repo for new projects, setting-up the framework, or writing documentation. Generative AI tools can help ease your cognitive load and allow you to work more on solving the problem, architecture, or user experience problem at hand.

Have you ever been stuck and could not find a way to get started on a new project? Or had to explain to your other developer's why you are writing some code? In either of those situations, your generative AI tools are like your coding partner—always available, always friendly, and usually helpful.

Getting Started: Project Skeletons

Developing a new project can be daunting, especially when figuring out dependencies, file structure, or environments. This is where tools like Copilot and ChatGPT make the most sense.

Step 1: Defining the Question

Before you ask the AI for help, put together the project outlines. For example:

  • Is the project an API, i.e. REST API, or a frontend web app?
  • What programming language or framework are you using?
  • Do you need a database, authentication, or testing setup?

Once you have established the above questions, you can start to communicate with the AI.

Sample prompt for ChatGPT:

Help me create a Node.js REST API project skeleton using Express, TypeScript, Docker, and ESLint

The response will give you directories, file structure, default config files, and file starters. It is quicker than Googling, piecing together from 5 different blogs, and act off random templates.

Step 2: Review and Modify

All skeletons generated by AI should be reviewed. Questions to ask yourself:

  • Does this file structure hold true to best practices for the particular framework I am choosing?
  • Does it contain any surplus files?
  • Is the config optimized for the environment I am deploying to?

You may further enhance the AI generated content but having a working template is better than 10 hours of time.

Improving UX With AI Suggestions

User experience is much more than green or orange buttons it’s about intuitive systems, accessibility, and feedback. Below are two examples of how AI can help.

Example 1: Write Form Validation

Assume you're writing a form using React. Instead of writing your own validation rules and logic you could ask ChatGPT:

Write a form validation function for a signup form with three fields email, password and confirm password

The generated output would include your email validation which probably includes regex validation, error handling and might even offer potential state to modify for error messages, and then you can edit it to suit your UI library, or state managing method of choice.

Example 2: Creating UI Components

Using Copilot’s autocomplete for getting started, you can begin typing the component name, component props or function name, and Copilot will suggest it all as complete snippets. For example:

function LoginForm() {
  return (
    <form>
      <input type="email" placeholder="Enter your email" required />
      <input type="password" placeholder="Enter your password" required />
      <button type="submit">Login</button>
    </form>
  );
}

And Copilot may add suggestions for error handling, input filtering (emaill format), or method states after a couple of components. Now, you are not writing everything but, Copilot handles most of the boilerplate code while you focus on designing.

Automating Documentation With Gen AI

Documentation can be a bit of a back burner task, and people seem to ignore it because it isn’t fun… but it is an important part of onboarding, maintenance and collaboration.

Step 1: Generating Inline Comments

When finished writing your function, highlight it and ask ChatGPT: “Explain this function in simple terms.” It will generate comments based on the purpose of the function, what it takes as input and what it returns.

Step 2: Creating README’s

Instead of starting with a blank slate, use prompts instead: “Write a README template for the following Python CLI tool that fetches the weather data using the OpenWeather API.” Once generated, you will get at minimum the following sections:

  • The project description
  • Step to install
  • Steps to use
  • Steps to configure

You will be allowed to edit or augment as needed based on the context of your project.

Step 3: Documenting APIs

For REST or GraphQL APIs, you can ask ChatGPT to generate sample requests and response schemas, and instead of documentation for a request body (e.g., Post requests), you can ask for error handling.

Prompt Example:
“Write API documentation for user registration that accepts name, email and password.”

This will be outputted in markdown format.
 You can then copy and paste these structured responses to Swagger, Postman or whatever documentation tool you wish to push these details into.

Best Practices When Leveraging Gen AI Tools

While these tools can be powerful, keep in mind, they are not perfect. What did I take away?

  • Always Validate Output - AI generated code could have either a deprecated library or could use a bad practice.
  • Amplify It In Your Knowledge - AI does, and should, offer assistance, but it does not, and should not, supplement your rationale. An analogy to think about it is to think of it as a brainstorming buddy.
  • Iterate and Rinse - Use several prompts, evaluate the code, and edit based on the rationale of the original project you were engaged in.
  • Be aware - AI tools are changing fast! Be aware of updates and communities, read their documentation, and see how carefully you can integrate them in the development space. 

FAQs

Q: Can AI tools generate production ready code?

A: No, all AI can do is give templates or hints. Make sure you review it, test it, and undergo a security audit before putting it in production.

Q: As a beginner at coding, how is someone supposed to use them without feeling overwhelmed?

A: Start off with smaller items (i.e., get some initial templated README generated, checking to see if form data passed the validation stage) etc. Once you feel confident, you can work slowly and eventually find an AI suggestion that serves your purpose.

Q: Does that mean I will be lazy using AI?

A: Not if you utilize it mindfully. You want to utilize AI as if it is a part-time programmer with you, helping you to concentrate on solving the real, unique problems, while it tackles only the repetitive work.

Q: Is it safe to give AI details about the project I am working on?

A: No! Don't give AI any details about your code that contain API keys or passwords, but you can use a generalized prompt and then review what is asked from it

Goodbye thoughts

When I first started using tools like Copilot and ChatGPT, I was a little doubtful. But, once I began to regularly use these tools and incorporate them into my workflow, I assessed the time savings and how quickly I could prototype something. I follow and believe there is a future for these tools, and they will eventually change how we build, document, and collaboratively engage on a solution.

What do you think? Have you had opportunities to engage and probe how creative coding can assist, and specific tasks you found those capabilities, and other tasks you found to be risky. It is important that we don’t depend on AI without questioning it. But it becomes a force multiplier to everything we do.

Let's embrace this new phase of coding together, and happy building!

© 2000 – 2025 SitePoint Pty. Ltd.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.