Sitemap
ngconf

The World’s Best Angular Conference

Member-only story

Fun with GitHub Copilot #6 (Sample Data)

7 min readNov 14, 2022

--

Press enter or click to view image in full size
Gambling table with dice, cards, and chips
Image by Thorsten Frenzel from Pixabay

Note: This article is an except from my new book, P-AI-R Programming: How Al tools like GitHub Copilot and ChatGPT Can Radically Transform Your Development Workflow.

So far, in my prior experiments and articles on GitHub Copilot, I have been mainly focused on how well it handles algorithms, language syntax, framework specifics, and even shell scripting.

Today I want to try something a little different. I want to share how well Copilot can generate sample data for applications. I started small and worked my way up to more complex ideas. I am sharing them all below, successes and failures alike.

My method for today’s experiment is simple. I provided a simple comment and then recorded what Copilot suggested.

Lorem Ipsum Text

First, let’s see what Copilot suggested for a generic request for some “lorem ipsum” text.

// Generate a paragraph of lorem ipsum text
const text = require('lorem-ipsum').loremIpsum({count: 1, units: 'paragraphs'});

That isn’t what I expected at all. I had hoped it would build some for me. Honestly…

--

--

Michael D. Callaghan
Michael D. Callaghan

Written by Michael D. Callaghan⁠

Web Developer at Walt Disney World | Published works available on Amazon: https://amzn.to/3u4EdtA