Replies: 22 comments 4 replies
-
Lezz go!! |
Beta Was this translation helpful? Give feedback.
-
Let's join. |
Beta Was this translation helpful? Give feedback.
-
Go go go |
Beta Was this translation helpful? Give feedback.
-
let's go |
Beta Was this translation helpful? Give feedback.
-
Lets go!!! 🚀🚀🚀 |
Beta Was this translation helpful? Give feedback.
-
Many words contain silent or extra letters that make pronunciation tricky. If your native language follows phonetic spelling (where words are pronounced as they are written), you might instinctively apply the same logic to English. This may lead to unexpected mistakes - like pronouncing the “t” in ballet or being puzzled by why colonel is pronounced ker-nil. To help with this, I started compiling a list of such tricky words in a Google Spreadsheet. Then, I learned that Google Sheets can function as a read-only database, so I built a simple web app using the Google Sheets API and JavaScript to display the constantly updated list online. Recently, I discovered Datasette, a fantastic open-source tool that converts CSV files into SQLite database tables, and also allows you to browse, view, facet, filter, share, and explore data. Datasette also exposes the contents of a CSV file as a JSON API. I wanted to adapt my original app, which relied on Google Sheets, to use this capability. I downloaded the list as a CSV file and uploaded it to Datasette, which I self-hosted on Glitch. Glitch.com is a platform that lets you create, remix, and host web apps without worrying about servers or complex setup. Instead of coding everything from scratch, I used GitHub Copilot inside Visual Studio Code. For the Prompt battle that was announced last week, I wanted to start with a very basic prompt and expected to refine based on its output. To my amazement, with just this prompt to the Claude 3.5 Sonnet option in Copilot Chat, it gave me a working sample 🤯 - Use this JSON endpoint: https://rightful-veiled-lyr.glitch.me/data.json?sql=select+word%2C+pronunciation+from+aphonetic and display the key-value pairs on a web page. I didn't have to refine, it read my mind yet again with a prompt of about 10 words! For my hobby apps, I like styling to be "minimal but functional" and it generated code in that fashion. Try my PhonaTick app, check the code of the third app in my WebApps collection and let me know what you think! Besides experiencing the magical powers of GitHub Copilot, the other big thing I learnt was how simple it was to host a JSON API with the open-source Datasette tool. |
Beta Was this translation helpful? Give feedback.
-
Let's go |
Beta Was this translation helpful? Give feedback.
-
Hey @Akash1134 👋,
|
Beta Was this translation helpful? Give feedback.
-
Thanks @Akash1134 for providing these amazing resources ! Here are my answers: 1. When leveraging GitHub Copilot for unit testing, what is the most effective strategy to ensure the generated test cases cover edge cases?(Choose two correct answers.)
Reason: Explicitly defining edge cases helps Copilot generate more comprehensive tests. Property-based testing ensures broader coverage beyond standard unit tests. 2. Copilot suggests a test case that fails due to floating-point precision errors. What should you do?
Reason: Floating-point precision issues are common; using assertions with tolerance helps resolve them effectively. 3. You need to ensure that Copilot-generated tests follow a Test-Driven Development (TDD) workflow. What is the best approach?
Reason: TDD requires writing failing tests first, then implementing the function to make them pass. 4. Which of these scenarios could cause GitHub Copilot to generate non-functional or incorrect test cases?
Reason: Lack of type definitions can lead to inaccurate test suggestions. 5. GitHub Copilot Chat provides enhanced debugging capabilities. Which of the following strategies improve debugging efficiency?(Choose two correct answers.)
Reason: Understanding test failures and providing error logs help debug effectively, but manual verification is essential. 6. You are working on an API that processes large JSON payloads. Copilot keeps generating tests with small sample data. How do you fix this?
Reason: Providing specific instructions in comments helps Copilot generate more relevant test cases. 7. What is the primary function of GitHub Copilot’s content exclusion settings?
Reason: Content exclusion prevents Copilot from referencing private/internal data when generating suggestions. 8. In what situation might GitHub Copilot generate insecure code, even when security settings are enabled?
Reason: Without context-aware suggestions, Copilot may generate insecure code. 9. You are using GitHub Copilot to generate tests for a function handling financial transactions. However, Copilot consistently misses testing for integer overflow errors. What should you do?
Reason: Clearly specifying edge cases helps Copilot cover scenarios like integer overflows. 10. When writing JavaScript tests with Jest, how can you ensure Copilot generates async test cases correctly?
Reason: Explicit instructions help Copilot generate async test cases correctly. 11. A developer is generating test cases using Copilot Chat in Visual Studio Code but notices that Copilot is not suggesting relevant test scenarios. What could be the reason?
Reason: Lack of proper context can lead to irrelevant test suggestions. 12. Which of the following GitHub Copilot SKUs offers enterprise-wide content exclusion settings for security-sensitive codebases?
Reason: Only the Enterprise SKU provides organization-wide content exclusion settings. 13. You want Copilot to generate secure cryptographic implementations. Which of these approaches is the best?
Reason: Providing security-focused instructions helps ensure better cryptographic implementations. 14. You have a function handling user authentication, and Copilot generates the following test case:def test_authenticate_user():
assert authenticate("admin", "password123") == True What is the most critical issue with this test?
Reason: Hardcoded credentials are a major security risk, and lack of negative/edge cases weakens the test. 15. Which of the following GitHub Copilot security safeguards help mitigate accidental exposure of credentials in generated code?
This week really tested me and was also really interesting! |
Beta Was this translation helpful? Give feedback.
-
Excited for the final stretch! 🚀 The journey with GitHub Copilot has been amazing, and this last week looks packed with valuable insights. Ready to dive into testing, security, and performance optimization! Let’s finish strong! 💪🔥 #GitHubCopilot #LearningJourney |
Beta Was this translation helpful? Give feedback.
-
This has been an incredible learning experience! 🎉 Looking forward to refining my testing skills and making the most of GitHub Copilot. Who else is excited for the final week? Let’s ace this together! 💻✅ #CopilotCertPrep |
Beta Was this translation helpful? Give feedback.
-
This is awesome! 🎉 Your journey from Google Sheets to Datasette, plus the smooth integration with Glitch, sounds like a great learning experience. It's amazing how Copilot nailed your intent with such a minimal prompt! 🤯 I'll definitely check out PhonaTick and the WebApps collection. The combination of minimal yet functional styling with easy-to-host JSON APIs makes this super interesting. Thanks for sharing your experience—this could inspire others looking to streamline their data-driven web apps! 🚀 |
Beta Was this translation helpful? Give feedback.
-
This journey has been amazing! 🎉 I'm excited to keep sharpening my testing skills and making the most of GitHub Copilot. Who else is pumped for the final week? Let’s finish strong and ace this together! 💻🚀 |
Beta Was this translation helpful? Give feedback.
-
def test_authenticate_user():
assert authenticate("admin", "password123") == True What is the most critical issue with this test?
|
Beta Was this translation helpful? Give feedback.
-
Great insights on using Copilot for generating unit tests! I’ve found it particularly useful for catching edge cases. Have you tried integrating it with your CI/CD pipeline for automated testing? |
Beta Was this translation helpful? Give feedback.
-
One unique way to use Copilot is to generate security tests. It can help identify potential vulnerabilities early in the development process. |
Beta Was this translation helpful? Give feedback.
-
Here are my answers for the week 4 challenge.1. When leveraging GitHub Copilot for unit testing, what is the most effective strategy to ensure the generated test cases cover edge cases?(Choose two correct answers.) Note A is incorrect. From unit 4 of Develop unit tests using GitHub Copilot tools", we learned that we need to explicit asking GitHub Copilot suggest additional edge cases that should be tested 2. Copilot suggests a test case that fails due to floating-point precision errors. What should you do?🟢 B) Modify assertions to account for precision tolerance Note A is incorrect because we should not ignore the test case 3. You need to ensure that Copilot-generated tests follow a Test-Driven Development (TDD) workflow. What is the best approach?🟢 A) Write failing test cases before implementing the function Note Traditional TDD approach is creating test cases before implmenting the function. if we want to make sure Copilot-generated tests follow the TDD workflow, we should do the same. 4. Which of these scenarios could cause GitHub Copilot to generate non-functional or incorrect test cases?🟢 B) Providing incomplete function definitions without parameter types Note A is incorrect, without internet connection, Copilot cannot work. 5. GitHub Copilot Chat provides enhanced debugging capabilities. Which of the following strategies improve debugging efficiency?(Choose two correct answers.) Note A is correct, asking Copilot to explain would help us to understand the reason and improve it. 6. You are working on an API that processes large JSON payloads. Copilot keeps generating tests with small sample data. How do you fix this?🟢 B) Provide comments specifying ‘test with large JSON data’ before invoking Copilot Note A is incorrect, we need to have additional manual effort. 7. What is the primary function of GitHub Copilot’s content exclusion settings?🟢 B) Restrict Copilot from suggesting code similar to private repositories Note A is incorrect, GitHub Copilot does not access internal documentation. 8. In what situation might GitHub Copilot generate insecure code, even when security settings are enabled?(Choose two correct answers.) Note A is incorrect, it is not cause insecure code. 9. You are using GitHub Copilot to generate tests for a function handling financial transactions. However, Copilot consistently misses testing for integer overflow errors. What should you do?🟢 B) Explicitly add a comment describing edge cases, like integer overflows, before invoking Copilot Note B is correct as we could describe edge cases in the prompt to generate more appropriate test cases. 10. When writing JavaScript tests with Jest, how can you ensure Copilot generates async test cases correctly?🟢 B) Provide comments specifying ‘test async functions’ Note B is correct, we could explicit instruct GitHub Copilot to generate async test cases like this. 11. A developer is generating test cases using Copilot Chat in Visual Studio Code but notices that Copilot is not suggesting relevant test scenarios. What could be the reason?🟢 C) Copilot is missing necessary function comments or contextual prompts Note A is incorrect, as GitHub Copilot is already trained to write test cases 12. Which of the following GitHub Copilot SKUs offers enterprise-wide content exclusion settings for security-sensitive codebases?🟢 C) GitHub Copilot Enterprise Note Only Enterprise provides enterprise-wide context exclusion settings. 13. You want Copilot to generate secure cryptographic implementations. Which of these approaches is the best?🟢 A) Specify ‘Use secure cryptographic methods’ in comments Note A is correct. It is the same as generate test cases for Edge cases. We could explicitly specify it in the prompt when asking GitHub Copilot to generate. 14. You have a function handling user authentication, and Copilot generates the following test case: What is the most critical issue with this test?🟢 D) All of the above Note All A, B, C are correct. This test case does not handle edge cases. It also hardcoded credtial, and there is missing negative test cases. 15. Which of the following GitHub Copilot security safeguards help mitigate accidental exposure of credentials in generated code?(Choose two correct answers.) Note A & B are correct, with automatically detects API keys and removes them, and also avoids using secret kets in suggestions could help mitigate accidental exposure of credentials in the generated code. |
Beta Was this translation helpful? Give feedback.
-
Day 3 of the final week, and the momentum is strong! 🚀 Today’s focus: mastering testing, security, and performance with GitHub Copilot. Loving the hands-on learning—so many new ways to improve code quality! 💻🔥 What’s been your biggest takeaway so far? Let’s share and learn together! 💪 #GitHubCopilot #LevelUp #CodeBetter |
Beta Was this translation helpful? Give feedback.
-
Here are my answers: 1. When leveraging GitHub Copilot for unit testing, what is the most effective strategy to ensure the generated test cases cover edge cases? (Choose two correct answers.) B) Provide explicit comments describing edge case scenarios before writing the function: This gives Copilot context, guiding it to generate tests for those specific scenarios. 2. Copilot suggests a test case that fails due to floating-point precision errors. What should you do? B) Modify assertions to account for precision tolerance: Floating-point arithmetic often leads to slight inaccuracies. Instead of expecting exact equality, use assertions that check if the result is within an acceptable range. 3. You need to ensure that Copilot-generated tests follow a Test-Driven Development (TDD) workflow. What is the best approach? A) Write failing test cases before implementing the function: This is the core principle of TDD. Copilot can help you write these initial failing tests based on your descriptions of the intended functionality. 4. Which of these scenarios could cause GitHub Copilot to generate non-functional or incorrect test cases? B) Providing incomplete function definitions without parameter types: Copilot relies on context. Without type information, it may make incorrect assumptions, leading to flawed tests. 5. GitHub Copilot Chat provides enhanced debugging capabilities. Which of the following strategies improve debugging efficiency? (Choose two correct answers.) A) Asking Copilot Chat to explain unexpected test failures: Copilot Chat can analyze the code and failure to provide insights. 6. You are working on an API that processes large JSON payloads. Copilot keeps generating tests with small sample data. How do you fix this? B) Provide comments specifying ‘test with large JSON data’ before invoking Copilot: Explicitly instructing Copilot about the data size is the most direct way to influence its output. 7. What is the primary function of GitHub Copilot’s content exclusion settings? B) Restrict Copilot from suggesting code similar to private repositories: Content exclusion prevents Copilot from using or suggesting code from specified files or directories. This is crucial for protecting sensitive code, proprietary algorithms, or internal documentation. It also helps to prevent Copilot from completing code or answering chat prompts. 8. In what situation might GitHub Copilot generate insecure code, even when security settings are enabled? (Choose two correct answers.) B) When Copilot generates code for outdated cryptographic practices like MD5 hashing: Copilot's training data might include outdated or insecure practices. 9. You are using GitHub Copilot to generate tests for a function handling financial transactions. However, Copilot consistently misses testing for integer overflow errors. What should you do? B) Explicitly add a comment describing edge cases, like integer overflows, before invoking Copilot: Directly guiding Copilot with specific edge case instructions is key. 10. When writing JavaScript tests with Jest, how can you ensure Copilot generates async test cases correctly? B) Provide comments specifying ‘test async functions’: Clear communication with Copilot through comments is generally the best approach. 11. A developer is generating test cases using Copilot Chat in Visual Studio Code but notices that Copilot is not suggesting relevant test scenarios. What could be the reason? C) Copilot is missing necessary function comments or contextual prompts: Copilot needs context to generate relevant suggestions. Lack of comments or clear instructions is the most likely cause. 12. Which of the following GitHub Copilot SKUs offers enterprise-wide content exclusion settings for security-sensitive codebases? C) GitHub Copilot Enterprise: Enterprise offers the most comprehensive features, including organization-wide content exclusion. 13. You want Copilot to generate secure cryptographic implementations. Which of these approaches is the best? A) Specify ‘Use secure cryptographic methods’ in comments: Guiding Copilot with specific instructions is the most reliable way to influence its output towards security. 14. You have a function handling user authentication, and Copilot generates the following test case: D) All of the above: 15. Which of the following GitHub Copilot security safeguards help mitigate accidental exposure of credentials in generated code? (Choose two correct answers.) A) Copilot automatically detects API keys and removes them: Copilot has filters to identify and block common insecure patterns, including hardcoded credentials. |
Beta Was this translation helpful? Give feedback.
-
We're in the final stretch! 🚀 This journey with GitHub Copilot has been incredible, and the last week is set to be full of valuable insights. Time to dive deep into testing, security, and performance optimization. Let’s stay focused and finish strong! 💪🔥 #GitHubCopilot #KeepLearning |
Beta Was this translation helpful? Give feedback.
-
Day 3 of the final week, and the momentum just keeps building! 🚀 Today’s deep dive is all about mastering testing, security, and performance optimization with GitHub Copilot. It’s incredible to see how AI can enhance code quality, catch vulnerabilities, and suggest optimizations in real time. Loving the hands-on learning—there are so many techniques to refine workflows and write more robust, efficient code! 💻🔥 What’s been your biggest takeaway so far? Let’s share our insights and learn from each other as we push toward the finish line! 💪 #GitHubCopilot #CodeBetter #KeepLearning |
Beta Was this translation helpful? Give feedback.
-
👋 Welcome to the final week of the GitHub Copilot Free learning journey and cert prep!
Over the past three weeks, we’ve learned a lot together—exploring Copilot, tackling super-engaging challenges, and gathering valuable feedback from all of you. It’s been amazing to see how these resources have helped shape your learning curve and exam prep!
Now, as we enter this last stretch, let’s make it count. This week is all about wrapping up strong, reinforcing key learnings, and getting you ready to ace that certification (if you're opting for one). Here’s what’s coming up:
If you’d like a recap of what we’ve covered throughout this series, see the detailed study guide.
Need a quick refresher or want to look back into earlier lessons?
Your First Move: Study Smart, Level Up! 🎯
Note
Here’s your friendly nudge: don’t forget—top participants will snag a GitHub Certifications exam voucher! 🎟️ and what’s more rewarding than finishing strong in the final week of this learning journey! Make this week count! 🚀
Knowledge Checkpoint 🏁 - Let’s See What You’ve Got! 🧠
1. When leveraging GitHub Copilot for unit testing, what is the most effective strategy to ensure the generated test cases cover edge cases?
(Choose two correct answers.)
A) Rely on Copilot’s first test suggestion and refine manually
B) Provide explicit comments describing edge case scenarios before writing the function
C) Use a combination of property-based testing and manually crafted assertions
D) Trust Copilot’s completion and execute tests without modifications
2. Copilot suggests a test case that fails due to floating-point precision errors. What should you do?
A) Ignore the test case and generate a new one
B) Modify assertions to account for precision tolerance
C) Use Copilot Chat to rewrite the function with better numerical stability
D) Disable Copilot when dealing with floating-point calculations
3. You need to ensure that Copilot-generated tests follow a Test-Driven Development (TDD) workflow. What is the best approach?
A) Write failing test cases before implementing the function
B) Let Copilot generate tests after writing the function
C) Use Copilot Chat to refactor existing tests post-development
D) Enable Copilot’s TDD mode
4. Which of these scenarios could cause GitHub Copilot to generate non-functional or incorrect test cases?
A) Using Copilot without an internet connection
B) Providing incomplete function definitions without parameter types
C) Using Copilot with multiple test frameworks in the same file
D) Asking Copilot to generate tests for functions written in a different programming language
5. GitHub Copilot Chat provides enhanced debugging capabilities. Which of the following strategies improve debugging efficiency?
(Choose two correct answers.)
A) Asking Copilot Chat to explain unexpected test failures
B) Using Copilot Chat to automatically resolve compilation errors
C) Providing error logs to Copilot Chat for step-by-step troubleshooting
D) Relying entirely on Copilot’s debugging suggestions without verification
6. You are working on an API that processes large JSON payloads. Copilot keeps generating tests with small sample data. How do you fix this?
A) Manually modify Copilot’s output to include large payloads
B) Provide comments specifying ‘test with large JSON data’ before invoking Copilot
C) Enable Copilot’s ‘large dataset’ mode in settings
D) Increase the timeout value for Copilot to process larger requests
7. What is the primary function of GitHub Copilot’s content exclusion settings?
A) Prevent Copilot from accessing sensitive internal documentation
B) Restrict Copilot from suggesting code similar to private repositories
C) Block Copilot from using specific types of data when generating suggestions
D) Limit Copilot’s ability to suggest insecure code patterns
8. In what situation might GitHub Copilot generate insecure code, even when security settings are enabled?
(Choose two correct answers.)
A) When Copilot is used without context-aware suggestions
B) When Copilot generates code for outdated cryptographic practices like MD5 hashing
C) When Copilot is used in a private repository with strict security settings
D) When Copilot generates suggestions based on similar insecure patterns from public repositories
9. You are using GitHub Copilot to generate tests for a function handling financial transactions. However, Copilot consistently misses testing for integer overflow errors. What should you do?
A) Increase the number of test cases Copilot generates
B) Explicitly add a comment describing edge cases, like integer overflows, before invoking Copilot
C) Use Copilot Chat to ask for ‘comprehensive financial validation tests’
D) Modify Copilot’s configuration to generate stricter tests
10. When writing JavaScript tests with Jest, how can you ensure Copilot generates async test cases correctly?
A) Add
@async
as an annotationB) Provide comments specifying ‘test async functions’
C) Manually modify Copilot-generated test cases
D) Change Jest’s settings to enable async mode
11. A developer is generating test cases using Copilot Chat in Visual Studio Code but notices that Copilot is not suggesting relevant test scenarios. What could be the reason?
A) Copilot is not trained to write test cases
B) Copilot only generates tests when a function is explicitly documented
C) Copilot is missing necessary function comments or contextual prompts
D) The test framework is not supported by Copilot
12. Which of the following GitHub Copilot SKUs offers enterprise-wide content exclusion settings for security-sensitive codebases?
A) GitHub Copilot Individual
B) GitHub Copilot for Business
C) GitHub Copilot Enterprise
D) GitHub Copilot Pro
13. You want Copilot to generate secure cryptographic implementations. Which of these approaches is the best?
A) Specify ‘Use secure cryptographic methods’ in comments
B) Copy Copilot’s first suggestion and manually verify security
C) Disable Copilot when writing encryption functions
D) Enable Copilot’s security-enhanced mode
14. You have a function handling user authentication, and Copilot generates the following test case:
What is the most critical issue with this test?
A) The test lacks edge cases
B) It uses hardcoded credentials, which is a security risk
C) Copilot should generate negative test cases as well
D) All of the above
15. Which of the following GitHub Copilot security safeguards help mitigate accidental exposure of credentials in generated code?
(Choose two correct answers.)
A) Copilot automatically detects API keys and removes them
B) Copilot respects repository secrets settings and avoids using secret keys in suggestions
C) Copilot flags insecure patterns but does not block suggestions
D) GitHub Copilot’s content filters prevent suggesting hardcoded credentials
Share your reactions 🚀 below or in the comment section.
Beta Was this translation helpful? Give feedback.
All reactions