My initial review of CoPilot and getting started is available here.
(What it does well – and why it’s not magic, but almost!)
Let me be clear: the Copilot Chat feature in VS Code can feel like a miracle until it’s not. When it’s working, you fire off a multi-line prompt defining what you want: “Build a function for X, validate Y, return Z…” and boom VS Code’s inline chat generates a draft that is scary good.
What actually wins: It interprets your specification in context – your open file, project imports, naming conventions – and spits out runnable sample code. That’s not trivial; reputable models often lose context threading. Here, the chat lives in your editor, not detached, and that nuance matters. It’s like sketching the spec in natural language, then having VS Code autocomplete not just code but entire behavior.
What you have to still do: Take a breath, a le sigh, and read it. Always. Control flow, edge cases, off-by-one errors Copilot doesn’t care. Security? Data leakage? All on you. Copilot doesn’t own the logic; it just stitches together patterns it’s seen. You own the correctness.
Trick that matters: Iterate. Ask follow-up: “Okay, now handle invalid inputs by throwing InvalidArgumentException,” or “Refactor this to async/await.” Having a chat continuum in the editor is powerful but don’t forget it’s your spec, not the AI’s.
The code auto-generated fits into your skeleton, adhering to your naming, your data model.
You retain control over boundaries, types, and structure even before Copilot chimes in.
Downside? If your skeleton is misleading or incomplete, Copilot will “fill in” confidently, in code that compiles but does the wrong thing. Again, your code review has to rule.
Technique 3: In-Context Refactoring Conversations (AKA “Let me fix your mess, Copilot”)
Ever accepted a Copilot suggestion, then hated it? Instead of discarding, turn on Copilot Chat:
Ask it: “Refactor this to reduce nesting and improve readability,” or “Convert this to use .reduce() instead of .forEach().”
Watch it rewrite within the same context not tangential code thrown at you.
That’s one of its massive values – context-aware surgical refactoring – not blanket “clean this up” that ends in a different variable naming scheme or method order from your repo.
The catch: refactor prompts depend on Copilot’s parsing of your style. If your code is sloppy, it’s going to be sloppily refactored. So yes you still have to keep code clean, comment clearly, and limit complexity. Copilot is the editor version of duct tape not a refactor wizard.
The Brutal Truth
VS Code + Copilot isn’t a magical co-developer. It’s a smart auto-completer with chat, living in your IDE, context-aware but utterly obedient to your prompts.
The trick is not the AI it’s how you lead it. The better your spec, skeleton, or prompt, the better your code.
Your style skeptical, questioning, pragmatic fits perfectly. You don’t let it ride; you interrogate. And that’s exactly how it should be.
TL;DR Summary
Technique
What Works
What Fails Without You
Chat-first spec
Detailed natural-language spec → meaningful code
No spec clarity → garbage logic
Skeleton prompts
Provides structure, types, expectations
Bad skeleton = bad code, fast
In-editor refactoring chat
Context-preserving improvements
Messy code → messy refactor
If you want more details on how you integrate Copilot into CI, or your personal prompt templates drop me the demand below, and I’ll tackle it head-on next time.
Note: I’ve decided to start writing up the multitude of AI tools/tooling and this is the first of many posts on this topic. This post is effectively a baseline of what one should be familiar with to get rolling with Github Copilot. As I add posts, I’ll add them at the bottom of this post to reference the different tools, as well as back reference them to this post, etc, so that they’re all easily findable. With that, let’s roll…
Intro
GitHub Copilot is thoroughly changing how developers write code, serving as a kind of industry standard – almost – for AI-powered code completion and generation. As someone who’s been in software development for over two decades, I’ve seen many tools come and go, but the modern variant of Copilot represents a fundamental shift in how we approach coding – it’s not just a tool, it’s a new paradigm for human-AI collaboration in software development.
In this comprehensive guide, I’ll walk you through everything you need to know to get started with GitHub Copilot, from basic setup to advanced features that will transform your development workflow.
What is GitHub Copilot?
GitHub Copilot is an AI-powered code completion tool that acts as your virtual pair programmer. It’s built on OpenAI’s Codex model and trained on billions of lines of public code, making it incredibly adept at understanding context, suggesting completions, and even generating entire functions based on your comments and existing code.
Key Capabilities
Real-time code suggestions as you type
Comment-to-code generation from natural language descriptions
Multi-language support across 50+ programming languages
Context-aware completions that understand your project structure
IDE integration with VS Code, Visual Studio, Neovim, and JetBrains IDEs
Copilot provides real-time code suggestions as you type. These appear as gray text that you can accept by pressing Tab or Enter.
# Type this comment and Copilot will suggest the function def calculate_compound_interest(principal, rate, time, compounds_per_year): # Copilot will suggest the complete implementation
2. Comment-to-Code Generation
One of Copilot’s most powerful features is generating code from natural language comments.
// Create a function that validates email addresses using regex // Copilot will generate the complete function with proper validation
3. Function Completion
Start typing a function and let Copilot complete it based on context:
def process_user_data(user_input): # Start typing and Copilot will suggest the next lines if not user_input: return None # Continue with the implementation
4. Test Generation
Copilot can generate test cases for your functions:
def add_numbers(a, b): return a + b # Type "test" or "def test_" and Copilot will suggest test functions
Advanced Features and Techniques
1. Multi-line Completions
Press Tab to accept suggestions line by line, or use Alt + ] to accept multiple lines at once.
2. Alternative Suggestions
When Copilot suggests code, press Alt + [ or Alt + ] to cycle through alternative suggestions.
3. Inline Chat (Copilot Chat)
The newer Copilot Chat feature allows you to have conversations about your code:
Press Ctrl + I (or Cmd + I on Mac) to open inline chat
Ask questions about your code
Request refactoring suggestions
Get explanations of complex code sections
4. Custom Prompts
Learn to write effective prompts for better code generation:
Good prompts:
# Create a REST API endpoint that accepts POST requests with JSON data, # validates the input, and returns a success response with status code 201
Less effective prompts:
# Make an API endpoint
Best Practices for Effective Copilot Usage
1. Write Clear Comments
The quality of Copilot’s suggestions directly correlates with the clarity of your comments and context.
# Good: Clear, specific description def parse_csv_file(file_path, delimiter=',', skip_header=True): """ Parse a CSV file and return a list of dictionaries. Args: file_path (str): Path to the CSV file delimiter (str): Character used to separate fields skip_header (bool): Whether to skip the first row as header Returns: list: List of dictionaries where keys are column names """
2. Provide Context
Help Copilot understand your project structure and coding style:
# This function follows the project's error handling pattern # and uses the standard logging configuration def process_payment(payment_data):
3. Review Generated Code
Always review and test code generated by Copilot:
Check for security vulnerabilities
Ensure it follows your project’s coding standards
Verify the logic matches your requirements
Run tests to confirm functionality
4. Iterative Refinement
Use Copilot as a starting point, then refine the code:
Accept the initial suggestion
Modify it to match your specific needs
Ask Copilot to improve specific aspects
Iterate until you have the desired result
Language-Specific Tips
Python
Copilot excels at Python due to its extensive training data
Great for data science, web development, and automation scripts
Excellent at generating docstrings and type hints
JavaScript/TypeScript
Strong support for modern ES6+ features
Good at React, Node.js, and frontend development patterns
Effective at generating test files and API clients
Java
Good support for Spring Boot and enterprise patterns
Effective at generating boilerplate code and tests
Strong understanding of Java conventions
Go
Growing support with good understanding of Go idioms
Effective at generating HTTP handlers and data structures
Good at following Go best practices
Troubleshooting Common Issues
1. Suggestions Not Appearing
Verify your Copilot subscription is active
Check that you’re signed into the correct GitHub account
Restart your IDE after authentication
Ensure the extension is properly installed and enabled
2. Poor Quality Suggestions
Improve your comments and context
Check that your file has the correct language extension
Provide more context about your project structure
Use more specific prompts
3. Performance Issues
Disable other AI coding extensions that might conflict
Check your internet connection (Copilot requires online access)
Restart your IDE if suggestions become slow
Update to the latest version of the extension
4. Security Concerns
Never paste sensitive data or credentials into Copilot
Review generated code for security vulnerabilities
Use Copilot in private repositories when possible
Be cautious with code that handles user input or authentication
Integration with Development Workflows
1. Pair Programming
Copilot can act as a third member of your pair programming session:
Generate alternative implementations for discussion
Create test cases to explore edge cases
Suggest refactoring opportunities
Help with debugging by generating test scenarios
2. Code Review
Use Copilot to enhance your code review process:
Generate additional test cases
Suggest alternative implementations
Identify potential improvements
Create documentation for complex functions
3. Learning and Exploration
Copilot is excellent for learning new technologies:
Generate examples of new language features
Create sample projects to explore frameworks
Build reference implementations
Practice with different coding patterns
Enterprise and Team Features
1. GitHub Copilot Business
Cost: $19/user/month
Features: Advanced security, compliance, and team management
Use Cases: Enterprise development teams, compliance requirements
2. GitHub Copilot Enterprise
Cost: Custom pricing
Features: Advanced security, custom models, dedicated support
Use Cases: Large enterprises, government, highly regulated industries
Learn to write prompts that leverage your project’s context:
# This function should follow the same pattern as the other API functions # in this file, using the shared error handling and response formatting def get_user_profile(user_id):
3. Testing Strategies
Use Copilot to generate comprehensive test suites:
# Generate tests that cover edge cases, error conditions, and normal operation # Use the same testing patterns as the existing test files in this project def test_user_authentication():
4. Documentation Generation
Let Copilot help with documentation:
# Generate comprehensive docstring following Google style # Include examples, parameter descriptions, and return value details def process_payment(payment_data, user_id, options=None):
Security and Privacy Considerations
1. Data Privacy
Copilot processes your code to provide suggestions
Avoid pasting sensitive information, credentials, or proprietary code
Use private repositories when working with confidential code
Review GitHub’s privacy policy and data handling practices
2. Code Security
Generated code may contain security vulnerabilities
Always review and test generated code
Use security scanning tools to identify potential issues
Follow security best practices for your specific domain
3. Compliance Requirements
Consider compliance requirements for your industry
Evaluate whether Copilot meets your security standards
Will the data going out and back be ok with the org?
Do additional SLAs or other requirements need put in place?
Consult with your security team before adoption
That in and out, being it is a service, could pose a significant number of risks for any org.
Consider enterprise deployment for better performance
Monitor network usage and optimize as needed
3. Resource Management
Disable other AI coding extensions
Monitor memory and CPU usage
Restart IDE periodically if performance degrades (?? I’ve seen this suggestion multiple places and it bothers me immensely)
Update extensions and IDE regularly
Conclusion
GitHub Copilot represents a fundamental shift in software development, moving us from manual coding to AI-assisted development. While it’s not a replacement for understanding programming fundamentals, it’s a powerful tool that can significantly enhance your productivity and code quality.
The key to success with Copilot is learning to work with it effectively writing clear prompts, providing good context, and always reviewing generated code. Start with the basics, practice regularly, and gradually incorporate more advanced features into your workflow.
As we move forward in this AI-augmented development era, developers who can effectively collaborate with AI tools like Copilot will have a significant advantage. The future of programming isn’t about replacing developers – albeit a whole lot of that might be happening right now – it’s more about augmenting their capabilities and enabling them to focus on higher-level problem solving and innovation.
Next Steps
Set up your GitHub Copilot subscription and install the extension
Practice with simple projects to get comfortable with the workflow
Experiment with different prompting techniques to improve suggestion quality
Integrate Copilot into your daily development routine
Share your experiences and learn from the community
Remember, mastery of AI programming tools like GitHub Copilot is a journey, not a destination. Start today, practice consistently, and you’ll be amazed at how quickly it transforms your development experience.
Next up, more on getting started with the various tools and the baseline knowledge you should have around each.
Follow me on LinkedIn, Mastadon, or Blue Sky for more insights on AI programming and software development.
A Principal Engineer is a senior software engineer who is responsible for the design and implementation of the company’s software architecture. They are also responsible for the technical direction of the company, or the team(s) they work with and the development of the company’s (or team(s)) software engineers.
Context: What is the Agentic Era?
The Agentic Era is a new era of software development where software is built by agents. Agents are software that can learn, reason, and act (to a degree). They are able to perform tasks autonomously (theoretically) and are able to learn from their environment.
Where I Am
Over the course of the last few years, we have seen the rise of AI agents. These agents are able to perform tasks autonomously and are able to learn from their environment. They are able to perform tasks that are typically performed by humans, such as coding, design, and problem solving. This of course, has dramatically changed the way we build software already.
What I’ve written here so far is an observation of the reality we live in. I’m not trying to make a judgement call or say agentic tooling is good or bad, just merely setting the baseline of where we are. Whether you love AI Tooling or hate it or are indifferent to it, it’s here. No matter how much we discover it makes you stupid and lazy over time or other horrid things, the reality is that it is here and it is causing significant changes.
My Observations & Experience as a Principal Engineer
My experience so far, as a principal engineer – or one who does the work of a principal engineer – regardless of role. Is that I’ve started doing more debuging, troubleshooting, and problem solving than any actual coding. Not to say I am not coding, I’m doing a ton of that, but just as much I need to bring my experience and knowledge into play to ensure the debugging, troubleshooting, and problems solving gets answers in a timely way. However, I have agentic systems build things for me that previously I’d have hired junior or mid level engineers to do. But the core of what a princpal engineer does is almost the same as it was 5 or 10 years ago, it just involves agentic systems taking care of probably 50% of the code I’d have hired juniors or mid-level engineers to knock out, that work is gone.
What does this change mean overall? My personal experience lately comes down to two specific things.
We are now able to build software faster and cheaper than the before era. Cheaper also meaning with less staff for longer stretches of time.
We are now able to build software that is more complex and more intelligent at a rate we couldn’t before.
Does it just help with these? No. Agentic systems can help us in many other ways too, this is just the specific two things I’ve seen occur. Let me dig into this more deeply.
One Scenario
In one scenario I was in, working on some project work I found the team used the tooling to effectively identify, debug, and resolve issues at a dramatically faster pace than these issues could have been dealt with before. The solutions were also more robust because of the skill and knowledge of the developers using the AI tooling. If it had been less experienced developers this could have created a catastrophic development debt that wouldn’t be recoverable from.
Which leads presciently into the next scenario.
Another Scenario
In another scenario I found myself in, as an observer, it wasn’t the particular project I was working on. I watched as a team started to build a greenfield project. In most scenarios you would think, if familiar with agentic coding, that this is the perfect scenario for agentic coding. However this team lacked the experience with the stack and the domain. They then found themselves building out a prototype, trying to take that and continue with it as a deployed production system. Not an entirely odd or shocking scenario.
But with the use of the agentic systems, skipping over key learning moments and not knowing the system they had built put the team in an unprepared situation upon the first issues that came up. Within weeks of deployment they realized their lack of familiarity with what they built had effectively made them unable to troubleshoot problems effectively.
It was literally the opposite of the first scenario. This scenario quickly became catastrophic and the project got abandoned, somewhat unceremoniously, and the team didn’t particularly learn good lessons from the experience. Sadly, since it should have been obvious what the overall issue was, it seemed to be more blamed on the agentic tooling. The fact is, the team should have realized they need to spend substantial time ensuring they read the generated docs, the generated code, and understood what they’d built. Instead the assumption was the agentic system would be able to keep up with all those aspects.
In the end, it failed.
In Closing, Observations at This Point in Time
First observation among everything is that agentic tooling when used effectively is a massive game changer. A Principal Engineer, setting precedent and direction, with 1-2 teams can easily take on what 2-4 teams could do previously. But the key to it is effective use and more experienced engineers (i.e. Principal and a few seniors sprinkled in) that can ensure bugs don’t become roadblocks, and that the agentic tooling is being wielded properly.
The second bit observation is that if a team isn’t going to use agentic tooling effectively, it’s going to be a massive detriment to the team. It’s going to slow down the team, it’s going to create a lot of technical debt, and very likely it could derail the project to the point of failure.
For now, that’s just a few of my many observations. More to come and maybe some paired agentic code slinging! In the meantime, happy thrashing code.
The Resource Pooling pattern manages a pool of reusable resources (like database connections, HTTP clients, or file handles) to avoid the overhead of creating and destroying resources frequently. This pattern is essential for improving performance, managing resource limits, reducing overhead, and ensuring efficient resource utilization.
The Event Loop pattern processes events from multiple sources in a single thread using a central event loop. This pattern is essential for handling multiple event sources efficiently, managing I/O operations, building reactive systems, and coordinating multiple concurrent operations in a controlled manner.
You must be logged in to post a comment.