Skip to content

Commit 2d746df

Browse files
authored
Merge pull request #4 from MicrosoftLearning/Copilot-Scenarios
Minor updates in exercises 1-5 and added vibe coding exercise (6).
2 parents 6455d84 + 1d7c987 commit 2d746df

5 files changed

Lines changed: 1234 additions & 0 deletions
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Introduction to Vibe Coding
2+
3+
Vibe coding is a programming approach that leverages AI-driven tools, particularly large language models (LLMs), to generate software. Instead of manually writing code, a user provides a natural language description of the problem, and the AI generates the corresponding code. This shifts the programmer's role from traditional coding to guiding, testing, and refining the AI-generated output.
4+
5+
## Key Features and Use Cases
6+
7+
Vibe coding enables programmers and non-programmers to create functional software by describing their ideas in plain language.
8+
9+
Non-programmers:
10+
11+
- Journalist Kevin Roose used vibe coding to develop small-scale applications like LunchBox Buddy, which analyzed fridge contents to suggest meals. This technique is particularly suited for hobby projects or prototyping, as it allows rapid development without extensive technical expertise.
12+
13+
- A sales or marketing professional can use vibe coding to create a simple prototype that demonstrates their vision for a product or service. They can describe the desired features and functionality in natural language, and the AI will generate a prototype app that can be pitched to management or stakeholders. If approved, the prototype can be handed off to a development team to create a production-ready application.
14+
15+
- A teacher can use vibe coding to create educational tools or resources, such as a quiz app or a simple game, by describing the desired functionality and content in natural language. This allows educators to quickly develop interactive learning materials without needing extensive programming skills.
16+
17+
Programmers:
18+
19+
- Rapid prototyping
20+
21+
Vibe coding allows developers to quickly create prototypes or proof-of-concept applications by describing the desired functionality in natural language. The AI tool generates the initial code, which can then be refined and expanded upon. Experienced developers can use vibe coding to quickly prototype ideas or generate boilerplate code, allowing them to focus on higher-level design and architecture rather than low-level implementation details. This can significantly speed up the development process, especially for complex applications.
22+
23+
- Implement fully-functional features (iterate, iterate, iterate)
24+
25+
GitHub Copilot Agent helps you iterate on the prototype in the following ways:
26+
27+
- Replacing prototype/stub code with code that implements completed features
28+
- Developing UI elements that enable richer interactions
29+
- Implementing sample data that helps demonstrate basic functionality
30+
- Code review and bug fixing
31+
- Develop unit tests to ensure code quality
32+
- Developing new features that enhance the app
33+
- Refactoring code
34+
35+
- Documentation generation
36+
37+
The AI tool can generate documentation for the codebase, including function descriptions, usage examples, and API documentation. This helps maintain clarity and understanding of the code, especially in collaborative environments.
38+
39+
- Language and framework conversion
40+
41+
If you want to convert your application to a different language or framework, you can use the AI tool to help with the conversion. The AI tool will:
42+
43+
- Analyze the existing codebase
44+
- Generate equivalent code in the target language or framework
45+
- Ensure that the new code maintains the same functionality and user experience
46+
47+
## Limitations and Risks
48+
49+
- While vibe coding democratizes software development, it comes with challenges. Users often accept AI-generated code without fully understanding it, which can lead to bugs and errors. This lack of comprehension poses risks in professional settings where debugging and maintenance require a deep understanding of the code.
50+
51+
- Experts caution against relying on vibe coding for production-level systems, as evolving and maintaining such codebases demands high-quality, understandable code.
52+
53+
## Summary
54+
55+
In summary, vibe coding represents a significant shift in software development, making it more accessible but also raising concerns about accountability and code quality. For less experienced developer, vibe coding is best suited for experimentation and non-critical applications.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
2+
3+
4+
5+
## Vibe coding project types
6+
7+
The coding projects for a lab exercise need to be carefully scoped, either narrowly or specifically to accommodate 20-30+ minute exercises.
8+
9+
1. Start from scratch projects (implement basics, stub features, page navigation, but little or no app data)
10+
11+
1. Create a prototype eCommerce app
12+
13+
Example prompt:
14+
15+
- I need to create a prototype eCommerce app using JavaScript, HTML, and CSS.
16+
- The prototype eCommerce app must provide a dynamic user interface that automatically scales to accommodate viewing on desktop and phone devices.
17+
- The eCommerce app should include the following pages: products list, product details, shopping cart, and checkout. Each page should provide basic functionality and forward/back navigation between pages.
18+
- Use a simple dataset of 10 fruit products. Include: product name, description, price per unit (where unit could be the number of items or ounces, pounds, etc.), and a simple image that represents the product.
19+
- The products list page should display a list of products with basic information such as product name, price per unit, and image. The products list page should also provide a way to select a quantity of a product, and an option to add selected items to the shopping cart.
20+
- The product details page should display detailed information about a selected product, including product name, description, price per unit, and image. The product details page should also provide a way to navigate back to the products list page.
21+
- The shopping cart page should display a list of products added to the cart, including product name, quantity, and total price. The shopping cart page should also provide a way to update the quantity of products in the cart, and remove products from the cart.
22+
- The checkout page should display a summary of the products in the cart, including product name, quantity, and total price. The checkout page should also provide a way to confirm the order.
23+
- The prototype eCommerce app should provide basic navigation between pages. Create a collapsible navigation bar on the left side of the products list, product details, shopping cart, and checkout pages. The navigation bar should allow users to navigate between the products list, product details, shopping cart, and checkout pages.
24+
- The prototype eCommerce app should have basic styling to make it visually appealing, but it does not need to be fully responsive or polished.
25+
- The prototype eCommerce app Will not include any backend functionality, such as user authentication, payment processing, or database integration. It will be a static prototype that demonstrates the basic concepts of an eCommerce app.
26+
27+
1. Create a prototype for an AI enhanced app (using Python and Hugging Face models)
28+
29+
1. Add a new feature to a project
30+
31+
1. Add a new feature to an existing app
32+
- For example, add a search feature to the eCommerce app.
33+
- The search feature should allow users to search for products by name or description.
34+
- The search results should display a list of products that match the search criteria, including product name, price per unit, and image.
35+
- The search feature should be accessible from the products list page and should provide a way to navigate back to the products list page.
36+
37+
1. Add a new page to an existing app
38+
39+
- For example, add a contact us page to the eCommerce app.
40+
- The contact us page should include a form that allows users to submit their name, email address, and message.
41+
- The contact us page should also provide a way to navigate back to the products list page.
42+
43+
1. Change a tool, framework, or technology projects
44+
45+
1. Change the front-end framework of an existing app
46+
47+
- For example, change the front-end framework of the eCommerce app from JavaScript to React or Angular.
48+
- The new front-end framework should provide the same functionality as the original app, including product listing, product details, shopping cart, and checkout.
49+
- The new front-end framework should also provide a dynamic user interface that automatically scales to accommodate viewing on desktop and phone devices.
50+
51+
1. Change the back-end technology of an existing app
52+
53+
- For example, change the back-end technology of the eCommerce app from Node.js to Python Flask or Django.
54+
- The new back-end technology should provide the same functionality as the original app, including user authentication, payment processing, and database integration.
55+
56+
1. Code review and improvement projects
57+
58+
1. Add logging to a project
59+
1. Add unit tests to a project
60+
61+
1. Coding language conversion projects
62+
63+
Convert and existing app to a different language or framework.
64+
65+
For example convert a Python app to a Java app or a C# app.
66+
67+
1. Redesign the architecture projects (too big)
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
2+
## Examine the Vibe Coding process
3+
4+
1. Envision and plan your project
5+
6+
The developer will work with an AI tool on the following steps to envision and plan the application:
7+
8+
- Brainstorm ideas
9+
10+
- What problem does your application solve? What is the purpose of your application?
11+
- Who is your target audience?
12+
- What platforms will your application run on (web, mobile, desktop)?
13+
- What features will your application have?
14+
- What technologies will you use to build it?
15+
- What are the data requirements for your application?
16+
- Is there any sensitive or PI data that needs to be protected?
17+
18+
- Create Product Requirements Document (PRD)
19+
20+
- Project Summary
21+
- Problem Overview
22+
- Scope
23+
- Use Cases & Scenarios
24+
- Requirements
25+
- Functional Requirements: user stories and acceptance criteria
26+
- Non-functional Requirements: performance, scalability, security, etc.
27+
- Dependencies
28+
- Success Metrics
29+
- Competitive Analysis
30+
- Product Roadmap
31+
- Risks & Challenges
32+
- Open Questions
33+
- Supporting Documentation
34+
- Sign-Off
35+
36+
- Create low-fidelity wireframe diagrams that show the user interface and help explain the user experience:
37+
38+
Give the AI tool your PRD and a prompt to create wireframe diagrams for the application. The AI tool will generate low-fidelity wireframe diagrams (text-based layouts) that represent the user interface and help to define the user experience.
39+
40+
- You can use M365 Copilot to create images of wireframe diagrams
41+
- Here is a GitHub Copilot Agent project for wireframe diagrams: [https://github.com/agoldbe/wireframer](https://github.com/agoldbe/wireframer)
42+
- You can use a tool like Figma to create high-fidelity wireframe diagrams, or you can use tools like Miro or draw.io to create medium-fidelity wireframe diagrams.
43+
44+
1. Agent uses the PRD and wireframe diagrams to develop a prototype
45+
46+
The AI tool will use the PRD and wireframe diagrams to develop a prototype of the application.
47+
48+
The GitHub Copilot Agent will:
49+
50+
- Install necessary tools and frameworks
51+
52+
The prototype will include the following:
53+
54+
- Basic functionality
55+
- User interface
56+
- User experience
57+
- Navigation between pages
58+
- Stub data for testing
59+
60+
You can also have the Agent help with the following:
61+
62+
- Configure your IDE or code editor
63+
- Set up version control (e.g., Git)
64+
65+
1. Implement fully-functional features (iterate, iterate, iterate)
66+
67+
GitHub Copilot Agent helps you iterate on the prototype in the following ways:
68+
69+
- Replacing prototype/stub code with code that implements completed features
70+
- Developing UI elements that enable richer interactions
71+
- Implementing sample data that helps demonstrate basic functionality
72+
- Code review and bug fixing
73+
- Develop unit tests to ensure code quality
74+
- Developing new features that enhance the app
75+
- Refactoring code
76+
77+
1. Language and framework conversion
78+
79+
If you want to convert your application to a different language or framework, you can use the AI tool to help with the conversion. The AI tool will:
80+
81+
- Analyze the existing codebase
82+
- Generate equivalent code in the target language or framework
83+
- Ensure that the new code maintains the same functionality and user experience
84+
85+
1. Documentation generation
86+
87+
The AI tool can generate documentation for the codebase, including function descriptions, usage examples, and API documentation. This helps maintain clarity and understanding of the code, especially in collaborative environments.
88+
89+
1. Code review and improvement
90+
91+
The AI tool can help with code review and improvement by:
92+
93+
- Analyzing the code for potential bugs and errors
94+
- Suggesting improvements to the code structure and design
95+
- Identifying areas for optimization and performance enhancements
96+
- Ensuring adherence to coding standards and best practices
97+
- Providing feedback on code readability and maintainability
98+
- Assisting with refactoring to improve code quality

0 commit comments

Comments
 (0)