Start Here
Your orientation guide to CodeLab — three courses, three research labs, and one shared mission: mastering AI-powered software development.
What is CodeLab?
CodeLab is an open learning hub at William & Mary where three research labs come together to teach the intersection of artificial intelligence and software engineering. Whether you want to build with AI, understand the full software lifecycle, or learn how production systems age and get renewed — there is a path for you here.
Three Courses, One Ecosystem
Generative AI for Software Development
Prof. Antonio Mastropaolo · AURA Lab
- Language models for code
- Prompt engineering & evaluation
- Hallucination detection
Software Engineering
Prof. Denys Poshyvanyk · SEMERU Lab
- Requirements to deployment
- Design patterns & testing
- Deep learning in SE practice
Software Maintenance & Evolution
Prof. Oscar Chaparro · SEA Lab
- Code smells & refactoring
- Bug report analysis
- NLP/ML for comprehension
Generative vs. Discriminative AI
A concept that runs across every course: Generative AI learns the underlying probability distribution of data and produces entirely new outputs. Discriminative AI learns decision boundaries — it classifies and labels but does not create.
- Generative — code completion, documentation writing, image synthesis
- Discriminative — spam detection, sentiment analysis, bug classification
The Evolution of AI for Code
AI-assisted programming did not appear overnight. Decades of research built the foundation for today’s large language models.
Rule-Based Systems
Expert systems and static analysis tools relied on hand-crafted rules written by domain experts. Effective for narrow tasks like linting and style checking, but brittle and unable to generalize.
Statistical Methods
N-gram models and probabilistic approaches treated source code as a natural language. Researchers discovered that code is even more predictable than English text — a key insight explored in Module 2.
Deep Learning
Recurrent neural networks (RNNs) and sequence-to-sequence models enabled code completion, bug detection, and code summarization. The introduction of the Transformer architecture in 2017 was a turning point.
Large Language Models
GPT, Codex, CodeLlama, StarCoder — models trained on billions of lines of code can now generate entire functions, explain complex code, and assist with debugging. This is the era we focus on.
GenAI in Action: Before & After
What does AI-assisted development actually look like in practice?
Before GenAI
- Search & Copy — browse Stack Overflow, copy snippets, adapt them manually. 15–30 min per problem.
- Write Boilerplate — manually write CRUD endpoints, data models, config files.
- Debug Alone — read error traces, add print statements, search forums for hours.
- Write Tests Manually — think through edge cases yourself. Coverage was often an afterthought.
With GenAI
- AI Autocomplete — Copilot suggests the next line or entire function as you type.
- Scaffold Features — describe what you need in plain English. AI generates a working starting point in seconds.
- AI-Assisted Debugging — paste the error into an LLM. Get an explanation and suggested fix instantly.
- Generated Test Suites — ask AI to generate unit tests. It identifies edge cases you might have missed.
The AI + Software Engineering Landscape
Generative AI is not a distant future — it is transforming software development right now.
What’s Working
- Code autocomplete — accepted suggestions save significant keystrokes
- Boilerplate generation — CRUD, configs, and scaffolds in seconds
- Documentation — generating docstrings and README files
- Debugging assistance — explaining errors and suggesting fixes
The Reality Check
- Complex logic — AI still struggles with multi-step reasoning
- Security — generated code often contains vulnerabilities
- Testing — AI tests frequently miss critical edge cases
- Architecture — system-level design remains a human skill
AI Across the Software Lifecycle
What Can Go Wrong?
AI-assisted development brings real risks. Understanding these upfront makes you a more responsible and effective engineer.
Code Hallucinations
AI can confidently generate code that calls APIs that do not exist, uses deprecated methods, or invents function signatures.
- Fabricated library functions
- Incorrect API parameters
- Plausible but wrong logic
Security Vulnerabilities
AI-generated code frequently contains security flaws: SQL injection, XSS, hardcoded secrets, and improper input validation.
- Insecure default configurations
- Missing input sanitization
- Exposed credentials in examples
Over-Reliance
Developers who lean too heavily on AI risk losing fundamental skills. If the AI is down or wrong, can you still solve the problem?
- Atrophy of debugging skills
- Reduced deep understanding
- Dependency on AI availability
Licensing & IP
AI models trained on open-source code may reproduce copyrighted snippets. The legal landscape is still evolving.
- Copilot lawsuit precedent
- License compliance questions
- Attribution requirements
AI models also reflect the biases in their training data — generating code that follows outdated patterns, reinforces non-inclusive variable naming, or performs poorly on underrepresented programming languages and paradigms.
Tools You’ll Use
Throughout CodeLab, you will work with a variety of AI models and tools — both commercial and open-source.
GPT
OpenAI's models for code generation, analysis, and reasoning.
Claude
Strong coding, analysis, and long-context capabilities.
GitHub Copilot
AI pair programmer for real-time code suggestions in your editor.
CodeLlama / StarCoder
Open-source code LLMs you can run locally, fine-tune, and study.
Jupyter + Python
Your primary workspace for experiments, model evaluation, and data analysis.
HuggingFace
Access pre-trained models, datasets, and the Transformers library.
Commercial vs. Open-Source
| Commercial (GPT, Claude) | Open Source (CodeLlama, StarCoder) | |
|---|---|---|
| Strengths | Highest performance, large context, multimodal, regular updates | Free, self-hosted, full data privacy, fine-tunable |
| Tradeoffs | API costs, data sent to third parties, rate limits | Requires GPU hardware, generally lower performance on complex tasks |
| Best For | Complex generation, debugging, rapid prototyping | Research, fine-tuning, privacy-sensitive projects |
What is Vibe Coding?
A development approach where you describe what you want in natural language and iterate with AI until the code works.
Describe Your Intent
Write a clear, detailed prompt describing what you want to build. Include constraints, technologies, and expected behavior.
AI Generates Code
The LLM produces a first draft — often a working scaffold with routing, data models, and basic UI. This is your starting point, not your final product.
Test and Evaluate
Run the generated code. Does it work? Does it handle edge cases? Identify what is correct, what is broken, and what is missing.
Refine the Prompt
Based on your evaluation, refine your instructions. Be more specific about what went wrong. Iterate until the code meets your requirements.
Integrate and Deploy
Once the components work, integrate them into your application. Add manual refinements, write tests, and document which parts were AI-generated.
Ethics & Responsible AI
As future engineers, you will shape how AI is used in software development. These are the ethical considerations you need to understand.
Bias in Training Data
AI models learn patterns from their training data — including biases.
- Non-inclusive variable naming patterns
- Underperformance on non-English codebases
- Reinforcing outdated practices
Environmental Cost
Training large language models requires massive computational resources with significant carbon footprints.
- LLM training: ~$100M+ in compute
- Inference costs scale with usage
- Push toward efficient, smaller models
Job Displacement
The evidence points to augmentation, not replacement — but the nature of development work is changing.
- Augmentation vs. full replacement
- Shifting skill requirements
- New roles: prompt engineer, AI auditor
Intellectual Property
AI models trained on open-source code raise complex legal questions about copyright and attribution.
- The GitHub Copilot class-action lawsuit
- Fair use in model training
- License compliance in generated code
Prerequisites & Getting Set Up
Required
- Python Proficiency — comfort with functions, classes, file I/O, and pip/conda
- Basic Data Structures — lists, dictionaries, trees, graphs
- Git Basics — clone, commit, push, pull, branch
Helpful but Not Required
- Probability & Statistics — useful for understanding language models and evaluation metrics
- Linear Algebra — helps with neural network internals (we provide intuitions)
- Prior ML Exposure — familiarity with training/testing, overfitting, and loss functions
Environment Checklist
Click each item to mark it as complete. Your progress is saved locally.
python --version
pip install jupyterlab
git config
Three Courses, Three Paths
CodeLab brings together three complementary courses. Each addresses a different dimension of AI-powered software development — pick the path that matches your goals, or explore all three.
Generative AI for Software Development
Prof. Antonio Mastropaolo · AURA Lab
The full AI-for-code pipeline: mining repositories, language models, evaluation metrics, deep learning foundations, prompting LLMs, hallucination detection, and AI pair-programming.
Explore course →Software Engineering
Prof. Denys Poshyvanyk · SEMERU Lab
The complete SE lifecycle: requirements, design patterns, version control, testing, agile methodologies, repository mining, and deep learning applications in SE practice.
Explore course →Software Maintenance & Evolution
Prof. Oscar Chaparro · SEA Lab
How software ages and gets renewed: code quality assessment, refactoring, bug report analysis, repository mining for maintenance insights, and NLP/ML for software comprehension.
Explore course →Learning Paths
Each course follows a distinct trajectory. Here is how topics flow across all three:
Where to Start
New to Software Engineering?
Start with Prof. Poshyvanyk’s SE course. It covers the full lifecycle from requirements to deployment and gives you the foundational vocabulary for everything else.
- Best first course for undergraduates
- Covers design, testing, and agile
Want to Build with AI?
Jump into Prof. Mastropaolo’s GenAI course. Seven hands-on modules take you from mining repositories to prompting LLMs and detecting hallucinations.
- Ideal if you know SE basics
- Hands-on with real AI tools
Already Shipping Code?
Head to Prof. Chaparro’s Maintenance & Evolution course. Learn how production systems age, how to assess and improve code quality, and how NLP can help.
- Great for working developers
- Focuses on real-world codebases