Sign In
  • Africa
  • Trump
  • African
  • Guardian
  • Mail
  • South
logo
  • Home
  • Ghana
  • Africa
  • World
  • Politics
  • Business
  • Technology
  • Sports
  • Entertainment
  • Health
  • Crime
  • Lifestyle
Reading: I tested Copilot vs Gemini with 10 coding prompts
Share
African News HeraldAfrican News Herald
Font ResizerAa
Search
  • Home
  • Ghana
  • Africa
  • World
  • Politics
  • Business
  • Technology
  • Sports
  • Entertainment
  • Health
  • Crime
  • Lifestyle
Follow US
© 2024 africanewsherald.com – All Rights Reserved.
African News Herald > Blog > Technology > I tested Copilot vs Gemini with 10 coding prompts
Technology

I tested Copilot vs Gemini with 10 coding prompts

ANH Team
Last updated: June 20, 2025 6:06 am
ANH Team
Share
SHARE

Optimize it for speed and efficiency.”

Contents
Gemini’s ResponseGitHub Copilot’s ResponseConclusionConclusion

What I’m watching out for:

  1. Does the optimized function use a more efficient sorting algorithm?
  2. Has unnecessary code been removed?
  3. Is the function still readable and maintainable?

For this prompt, I challenged both Copilot and Gemini to optimize a basic bubble sort implementation. Bubble sort is known for being slow and inefficient, so I wanted to see how each assistant would improve upon it.

Gemini’s Response

Gemini’s optimization was interesting. It replaced the bubble sort with a more efficient sorting algorithm (quick sort) and removed unnecessary code. The function was still readable and maintainable, but the change in algorithm was a significant improvement in terms of speed and efficiency. Gemini also included a brief explanation of why quick sort is better than bubble sort.

While the optimization was well done, the use of quick sort might be a bit advanced for beginners. It would have been nice to see Gemini offer a simpler, intermediate solution for those who are still learning.

GitHub Copilot’s Response

AD 4nXGcXgE4D1F2nQbtnoxDy2xZrKQbJazp4K EY1V1xjQ7s8bIwF2y7riVQv1e3f8Wz6C6WU vLdJxtwtF6fWu2y0zBwYbi1Qxcv2ep5cT2TtM1Xu0wU2xuJ5LxJY3g2xu8x2

Copilot’s optimization was simple yet effective. It replaced the bubble sort with a slightly more optimized version of bubble sort that reduces the number of iterations needed. The function was still easy to read and understand, but the improvement in efficiency was noticeable.

While Copilot’s solution was not as drastic as Gemini’s switch to quick sort, it still offered a tangible improvement over the basic bubble sort. This strikes a good balance between optimization and maintainability, making it a practical solution for most developers.

In this case, both assistants provided valuable optimizations, but Copilot’s solution was more approachable and practical for everyday use.

Conclusion

Overall, GitHub Copilot and Gemini both showed their strengths and weaknesses in handling coding prompts. Copilot excelled in providing concise, practical solutions that are easy to implement, making it a great tool for developers looking to speed up their workflow. On the other hand, Gemini’s detailed explanations and educational approach make it a valuable resource for beginners or those looking to deepen their understanding of coding concepts.

Ultimately, the choice between Copilot and Gemini will depend on your specific needs and preferences as a developer. Whether you prioritize speed, efficiency, or education, both tools have something valuable to offer in the world of coding assistance.

It focused solely on writing the test cases and making sure they were correct.

I appreciated Gemini’s comprehensive approach, especially for someone who might be new to testing or need a refresher. But for someone like me who just wants to get the job done, Copilot’s concise response was more efficient. I’d rather have the necessary information to write the test quickly and accurately, without the added fluff.

Conclusion

After evaluating both GitHub Copilot and Gemini on five different coding prompts, it’s clear that both AI assistants have their strengths. Gemini excels in providing detailed explanations, context, and additional information that can be helpful for beginners or those seeking a deeper understanding of the code. On the other hand, GitHub Copilot focuses on efficiency, delivering concise and accurate code solutions that get the job done quickly.

Ultimately, the choice between the two AI assistants will depend on your specific needs and preferences. If you value thorough explanations and educational insights, Gemini may be the better option for you. However, if you prioritize speed and efficiency in coding, GitHub Copilot may be the more suitable choice. Both tools have their merits, and developers can benefit from using either or both depending on the task at hand.

  • It explained the regex pattern succinctly, focusing on the key components without unnecessary detail.
  • It included common edge cases like subdomains and symbols, ensuring the regex is comprehensive.
  • It acknowledged limitations and provided tips for when to use this regex and when to consider more robust validation methods.

Overall, Copilot’s response was effective and practical, offering a solid regex pattern with clear explanations.

In summary:

  • Gemini provided a detailed regex pattern with explanations and considerations for real-world use.
  • Copilot offered a practical regex pattern with concise explanations, making it easy to understand and implement.

Both responses were strong, demonstrating the ability to generate functional regex patterns for email validation.

Gemini and GitHub Copilot are two powerful tools that cater to different needs when it comes to coding assistance. In a comparison between the two tools across 10 coding prompts, it became evident that Gemini excelled in providing depth, nuance, and detailed explanations, while GitHub Copilot focused more on quick code generation without as much context.

See also  I Tested Hailey Bieber's New Rhode Barrier Butter Launch

In the task of explaining a JavaScript function, Gemini stood out for its step-by-step breakdown of a recursive flatten function. It delved into the use of reduce, the ternary operator, Array.isArray, recursion, and concat, providing a thorough educational experience. On the other hand, GitHub Copilot offered a concise summary with fewer words, lacking the granular depth and educational breakdown found in Gemini’s response.

When commenting on a C++ function, Gemini once again demonstrated its strength with detailed comments and documentation using Doxygen-style formatting. It broke down the logic in a step-by-step manner, included assumptions, and explained the reasoning behind certain decisions. In comparison, GitHub Copilot provided basic comments for core logic, suitable for those who just needed working code with basic guidance.

Overall, Gemini emerged as the better choice for learners, educators, and documentation purposes due to its clarity and teaching-oriented approach. On the other hand, GitHub Copilot was more suited for experienced developers seeking quick and clean code without the need for detailed explanations.

In conclusion, the choice between Gemini and GitHub Copilot depends on the user’s goals and level of expertise. Gemini is recommended for those prioritizing learning and documentation, while GitHub Copilot is ideal for fast, production-ready code. Both tools have their strengths and can be used together to combine clarity and efficiency in coding tasks. The sun was setting over the horizon, casting a warm glow over the landscape. The sky was painted in shades of pink and orange, creating a beautiful backdrop for the end of the day. As the last rays of sunlight faded away, the world was bathed in a soft, golden light.

The evening was quiet and peaceful, with only the sound of crickets chirping in the distance. The air was cool and refreshing, a welcome relief from the heat of the day. The scent of wildflowers filled the air, adding to the serene atmosphere.

In the distance, a lone figure could be seen walking along a winding path. The person moved with purpose, their steps slow and deliberate. They seemed lost in thought, their gaze fixed on the horizon.

As they walked, the figure passed by fields of wildflowers, their petals dancing in the gentle breeze. The colors were vibrant and alive, a stark contrast to the fading light of the day. Birds sang in the trees, adding to the symphony of nature’s evening chorus.

The figure eventually reached a clearing, where a small pond shimmered in the fading light. The water was still and reflective, mirroring the colors of the sky above. The figure sat down on a nearby rock, taking in the beauty of the scene before them.

As the stars began to twinkle overhead, the figure closed their eyes and took a deep breath. They felt at peace, at one with the world around them. The worries and stresses of the day melted away, replaced by a sense of calm and contentment.

In that moment, the figure realized the importance of taking time to appreciate the beauty of the world around them. In the hustle and bustle of everyday life, it was easy to forget to stop and smell the flowers, to watch the sunset, to listen to the birdsong.

But in that quiet evening, surrounded by the beauty of nature, the figure found solace and peace. They vowed to make time for moments like these, to reconnect with the world around them and find joy in the simple things.

And as the night sky filled with stars, the figure sat in silence, grateful for the beauty of the world and the peace it brought to their soul. It’s a new day, and the sun is shining bright in the sky. As I wake up and stretch my arms, I can’t help but feel excited for what the day has in store for me. I have a feeling that today is going to be a great day, full of new opportunities and adventures.

I start my morning routine by making a cup of coffee and enjoying the peacefulness of the early hours. The birds are chirping outside, and the world feels full of life and energy. I take a moment to appreciate the simple pleasures of everyday life before diving into the hustle and bustle of the day.

See also  Google's Gemini 2.5 Flash introduces 'thinking budgets' that cut AI costs by 600% when turned down

As I sip on my coffee, I think about all the things I want to accomplish today. I have a few meetings lined up at work, but I also want to make time for some self-care activities. I’ve been feeling a bit stressed lately, and I know that taking care of myself is just as important as being productive.

After finishing my coffee, I get ready for the day ahead. I put on my favorite outfit, a comfortable yet stylish ensemble that makes me feel confident and ready to take on whatever challenges come my way. I grab my bag, check my phone for any important messages, and head out the door.

The city is alive with activity as I make my way to work. People are rushing to their jobs, cars honk in the streets, and the sound of music fills the air from nearby cafes. I can’t help but smile as I take in the sights and sounds of the city I call home. There’s something special about being surrounded by so much energy and vibrancy.

When I arrive at work, I dive into my tasks with enthusiasm and determination. I tackle each project with focus and dedication, knowing that my hard work will pay off in the end. As the day progresses, I feel a sense of accomplishment as I check off items on my to-do list and make progress towards my goals.

During my lunch break, I take some time to relax and recharge. I go for a walk in the park near my office, soaking in the beauty of nature and letting my mind wander. The fresh air and sunshine rejuvenate me, and I return to work feeling refreshed and ready to tackle the rest of the day.

As the afternoon turns into evening, I finish up my work and head home. I feel a sense of satisfaction knowing that I gave my all to my tasks and accomplished everything I set out to do. I take a moment to reflect on the day and all the blessings in my life, feeling grateful for the opportunities that come my way.

As I wind down for the night, I feel a sense of contentment and peace. Today was a great day, full of productivity, positivity, and joy. I can’t wait to see what tomorrow will bring, but for now, I am grateful for the present moment and all the blessings that come with it. The world is constantly changing and evolving, and with it, so are the industries that drive our economy. One of the most rapidly evolving industries is technology. From smartphones to self-driving cars, technology is revolutionizing the way we live and work.

One of the most exciting developments in the technology industry is the rise of artificial intelligence (AI). AI is a branch of computer science that aims to create intelligent machines that can think and learn like humans. This technology has the potential to transform every aspect of our lives, from healthcare to transportation to entertainment.

One of the most promising applications of AI is in the field of healthcare. AI has the potential to revolutionize healthcare by improving diagnosis and treatment, reducing medical errors, and personalized medicine. For example, AI-powered algorithms can analyze medical images such as X-rays and MRIs to detect diseases like cancer at an early stage, improving patient outcomes and reducing healthcare costs.

Another exciting application of AI is in the field of transportation. Self-driving cars powered by AI have the potential to reduce traffic accidents, congestion, and carbon emissions. These autonomous vehicles use sensors and machine learning algorithms to navigate roads safely and efficiently. Companies like Tesla, Google, and Uber are investing heavily in self-driving technology, and it won’t be long before we see these cars on the roads.

AI is also transforming the entertainment industry. Streaming services like Netflix and Spotify use AI algorithms to recommend personalized content to users based on their viewing or listening habits. AI-powered chatbots are also being used by companies to provide customer service and support, improving customer satisfaction and reducing costs.

Despite the many benefits of AI, there are also concerns about its impact on jobs and privacy. Some experts worry that AI-powered machines will replace human workers in many industries, leading to widespread unemployment. There are also concerns about the ethical implications of AI, such as bias in algorithms or the potential for misuse by governments or corporations.

See also  Top 6 AI Tools for Efficient Python Coding

As AI continues to advance, it is crucial for policymakers, businesses, and society as a whole to address these challenges and ensure that AI is developed and deployed responsibly. By harnessing the power of AI for the greater good, we can create a more efficient, innovative, and inclusive society for all. Are you tired of the same old routine every day? Do you crave new experiences and adventures? If so, it might be time to shake things up and try something new. Stepping out of your comfort zone can be intimidating, but it can also be incredibly rewarding.

One way to inject some excitement into your life is to try new activities that you’ve never done before. Whether it’s skydiving, rock climbing, or salsa dancing, there are countless options to choose from. Trying new activities can help you discover new passions and interests, and can also help you break out of your daily routine.

Another way to spice things up is to travel to a new destination. Whether it’s a weekend getaway to a nearby city or a backpacking trip through Europe, traveling can open your eyes to new cultures, people, and experiences. Stepping out of your comfort zone and immersing yourself in a new environment can be a transformative experience that will leave you feeling refreshed and rejuvenated.

If trying new activities or traveling isn’t feasible for you at the moment, there are still ways to shake things up in your daily life. Try taking a different route to work, trying a new restaurant, or picking up a new hobby. Small changes can make a big difference in how you perceive the world around you and can help you break out of your comfort zone.

Stepping out of your comfort zone can be scary, but it can also be incredibly liberating. By trying new activities, traveling to new destinations, or making small changes in your daily routine, you can discover new passions, meet new people, and create unforgettable memories. So go ahead, take a leap of faith and step out of your comfort zone – you never know what amazing experiences await you. The COVID-19 pandemic has brought about many changes in our daily lives, including how we work, socialize, and travel. With the rise of remote work and online communication, it’s no surprise that the travel industry has also been significantly impacted.

One of the most notable changes in the travel industry is the shift towards domestic travel. With restrictions on international travel and concerns about the safety of flying, many people are opting to explore their own country instead. This has led to a surge in road trips, camping trips, and visits to national parks and other outdoor destinations.

Another trend that has emerged during the pandemic is the rise of “workcations.” With remote work becoming more common, many people are taking advantage of this flexibility by working from vacation destinations. This allows them to enjoy a change of scenery while still being productive.

In response to the pandemic, many travel companies and destinations have also implemented new health and safety measures. This includes enhanced cleaning protocols, mandatory mask-wearing, and social distancing guidelines. Some hotels and resorts have even introduced contactless check-in and room service to minimize contact between guests and staff.

Despite these changes, the travel industry is slowly starting to recover as vaccination rates increase and restrictions are lifted. Many people are eager to resume traveling and are making plans for their next trip. However, the pandemic has also made people more conscious of the impact of their travel on the environment and local communities. As a result, sustainable and responsible travel practices are becoming more important to travelers.

Overall, the travel industry has undergone significant changes in response to the COVID-19 pandemic. While there have been challenges, there have also been opportunities for innovation and adaptation. As we continue to navigate the uncertainties of the pandemic, it’s clear that travel will never be the same again.

Subscribe to Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

I have read and agree to the terms & conditions
TAGGED:codingCopilotGeminipromptsTested
Share This Article
Twitter Email Copy Link Print
Previous Article Mesa County deputy who shared information about detained Utah college student put on leave Mesa County deputy who shared information about detained Utah college student put on leave
Next Article CAF reveals opening and closing venues for 2024 CHAN
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Editor's Pick

Best Phone 2024: Top 10 Mobile Phones Today

Need a new phone? The constant influx of new handsets can make it challenging to keep track of what's worth…

November 12, 2024 3 Min Read
14 best trading platforms in Nigeria 

Avatrade is regulated by the Central Bank of Ireland, ASIC in Australia,…

20 Min Read
The fall of Ghana’s NPP and the resurgence of the NDC in the 2024

The 2024 general elections in Ghana marked a seismic shift in the…

8 Min Read

Lifestyle

‘South Africa needs brave men like Mkhwanazi,’ says Moja Love TV boss’ foundation

The Aubrey Tau Foundation has come out in support of…

July 9, 2025

7 reasons Gen Zs choose friends with benefits

With the fast-paced lives of Gen…

July 8, 2025

Discover the Netflix characters setting 2025 fashion trends

Netflix character fashion has become a…

July 8, 2025

Ayanda Thabethe says ‘I do’ in intimate wedding ceremony

TV presenter Ayanda Thabethe recently shared…

July 7, 2025

Upgrade PCs to upgrade security

The Rise of Cybercrime in Africa:…

July 7, 2025

You Might Also Like

Technology

Hugging Face just launched a $299 robot that could disrupt the entire robotics industry

“We are really trying to understand what the best user experience is, and it’s not only about having the robot…

7 Min Read
Technology

South Africa Emerges as Key Market for Leading Pan-African EV Platform EV24.africa

EV24.africa, the first pan-African electric vehicle (EV) marketplace, has quickly become the go-to platform for electric mobility on the continent…

6 Min Read
Technology

Samsung Galaxy Unpacked Live Blog: Real-time updates as new Fold, Flip & Watch launch

Join us live for new Samsung Galaxy phones and wearables At the last Unpacked event in January, Samsung unveiled the…

2 Min Read
Technology

Top 10 trusted solar companies in South Africa (2025 expert guide)

I recently had a solar system installed by Alumo Energy and I couldn't be happier. The whole process was smooth,…

26 Min Read
logo logo
Facebook Twitter Youtube

About US

Stay informed with the latest news from Africa and around the world. Covering global politics, sports, and technology, our site delivers in-depth analysis, breaking news, and exclusive insights to keep you connected with the stories that matter most.

Top Categories
  • Africa
  • Business
  • Entertainment
  • Sports
Usefull Links
  • Home
  • Contact
  • Privacy Policy
  • Terms & Conditions

© 2024 africanewsherald.com –  All Rights Reserved.

Welcome Back!

Sign in to your account

Lost your password?