I tested them on a real coding challenge and one dominated


You’ve probably seen the meme where a guy opens all the popular AI chatbots in different browser tabs, gives them the same coding prompt, checks the output of each, and then copies the best one. For a moment, I thought I’d do the same experiment. So, I chose three of the most popular AIs and gave them the same problem to solve. Here’s how each one performed.

Choosing a suitable problem and judging criteria

Not too easy, not too challenging, getting that sweet middle spot

Concept of computer programming or developing software. Laptop computer with code on screen. Heart, message, cog, home, user, cloud, and lock icons. Credit: Coralnes / Shutterstock

For this test, I was brainstorming what kind of coding challenge I could pick. I didn’t want to choose something like “find duplicates from a list” because most AIs would approach it the same way. I also didn’t want to try a LeetCode-style problem because that would go over the heads of many.

Besides, I also wanted to test with something relatable to most people, has some sort of real-world functionality, and has no definite answer. In particular, having no definite answer makes it more interesting since I could observe the thinking and creativity level of each AI.

With that, the problem I finally decided on was “password strength checker.” You usually see these in action when you sign up for a service. Upon creating a password, the system often shows you how strong your password is and what you need to do to make it stronger.

I can use this program to test how well each AI designs the solutions, their coding style, if they follow best practices, user-friendliness, and if the solutions are industry-standard. The scores will be based on these criteria.

Designing the prompt

Observing how much guidance each chatbot needs to reach its best solution

An AI chatbot sitting at a desk at home. Credit: 

Matt Klein / DALL-E 3 / How-To Geek

With the challenge problem taken care of, it’s now time to think of the prompting techniques. To keep things fair, I will give ChatGPT, Gemini, and Claude the same first prompt. Their first output will be the biggest deciding factor for scoring. After the first prompt, I may give a few follow-up prompts, such as explaining the solution, handling edge cases, refactoring the code, etc., depending on their output.

Here’s the first prompt:

Write a Python function that checks the strength of a password and labels it as Weak, Medium, or Strong.

Explain your logic clearly for a beginner.

I kept it fairly short and simple. This is to see how much the AI tool can think on its own without me giving any explicit instructions.

ChatGPT

Clean code, average explanation

Asking ChatGPT to make a password strength checker in Python.

For the challenge, I used the regular free web version of ChatGPT. The model in use was GPT 5.2. Here’s the solution I received:

import re

def check_password_strength(password):
    length = len(password)
    
    # Conditions
    has_lower = re.search(r"[a-z]", password)
    has_upper = re.search(r"[A-Z]", password)
    has_digit = re.search(r"[0-9]", password)
    has_special = re.search(r"[!@#$%^&*(),.?\":{}|<>]", password)
    
    score = 0
    
    # Scoring rules
    if length >= 8:
        score += 1
    if has_lower:
        score += 1
    if has_upper:
        score += 1
    if has_digit:
        score += 1
    if has_special:
        score += 1
    
    # Strength levels
    if score <= 2:
        return "Weak"
    elif score == 3 or score == 4:
        return "Medium"
    else:
        return "Strong"

ChatGPT used Python’s re module for character searching, which is interesting. For a beginner level, though, I expected it to use general Python logic instead of regular expressions. ChatGPT did ask at the end of its response whether I wanted a version using basic Python instead of regex. Otherwise, the code looks really clean and understandable, even for a beginner.

The comments added to the code are basic, not explaining what it’s doing. Just describing the section. The explanation ChatGPT provided after the code section was okay. It went section by section, explaining what each part was doing. But it wasn’t top-notch.

Lastly, the solution was kept short by providing the Python function I asked for. It’s not a full-fledged program that asks for input, gives feedback on the password (like a missing number), or even prints any message, making it a bit less user-friendly and far from production-grade code. The only other thing ChatGPT provided was some test lines:

print(check_password_strength("abc"))          # Weak
print(check_password_strength("abc12345"))     # Medium
print(check_password_strength("Abc@12345"))    # Strong

Gemini

Weak system, beginner-friendly code and explanation

Asking Gemini to make a password strength checker in Python.

For Gemini, I went with the free web version with the Gemini 3 Fast model. Here’s Gemini’s solution:

def check_password_strength(password):
    # Initialize our score
    score = 0
    length = len(password)
    
    # 1. Check Length
    if length >= 8:
        score += 1
        
    # 2. Check for Uppercase letters
    has_upper = any(char.isupper() for char in password)
    if has_upper:
        score += 1
        
    # 3. Check for Numbers
    has_digit = any(char.isdigit() for char in password)
    if has_digit:
        score += 1

    # Final Labeling Logic
    if length < 5:
        return "Very Weak (Too short!)"
    
    if score == 3 and length >= 10:
        return "Strong"
    elif score >= 2:
        return "Medium"
    else:
        return "Weak"

# Testing the function
print(f"'12345': {check_password_strength('12345')}")
print(f"'Password123': {check_password_strength('Password123')}")
print(f"'qwerty': {check_password_strength('qwerty')}")

Gemini went for a Pythonic approach instead of regex, using generator expressions, built-in methods, and the any() function. The comments in the code are more descriptive, explaining what’s happening in each section. The explanation section after the code was also a good upgrade. It explained each section and even line clearly.

However, unlike ChatGPT’s code, it’s less clean. It would’ve looked better if the checks were grouped together and the scoring conditions were grouped together. But Gemini put the check and the related scoring together, making the code less readable.

The biggest problem with Gemini’s code is its scoring system. There’s no check for lowercase letters, no check for special characters, making the program unfit for real-world usage. Even a weak password will be shown as strong in this system.

Claude

The clear winner by miles of difference

Asking Claude to make a password strength checker in Python.

Coming down to our last contestant, Claude. For this, I used the free web version, selecting the Sonnet 4.6 model. Here’s the output:

import re

def check_password_strength(password):
    """
    Checks the strength of a password and returns a label:
    'Weak', 'Medium', or 'Strong'.
    """
    score = 0
    feedback = []

    # --- Rule 1: Length ---
    # Longer passwords are exponentially harder to crack.
    if len(password) >= 12:
        score += 2          # Big bonus for long passwords
    elif len(password) >= 8:
        score += 1          # Minimum acceptable length
    else:
        feedback.append("Use at least 8 characters.")

    # --- Rule 2: Uppercase letters (A-Z) ---
    # Mixing cases increases the number of possible combinations.
    if re.search(r'[A-Z]', password):
        score += 1
    else:
        feedback.append("Add at least one uppercase letter.")

    # --- Rule 3: Lowercase letters (a-z) ---
    if re.search(r'[a-z]', password):
        score += 1
    else:
        feedback.append("Add at least one lowercase letter.")

    # --- Rule 4: Digits (0-9) ---
    if re.search(r'[0-9]', password):
        score += 1
    else:
        feedback.append("Add at least one number.")

    # --- Rule 5: Special characters ---
    # Symbols dramatically expand the character set an attacker must guess from.
    if re.search(r'[!@#$%^&*(),.?":{}|<>]', password):
        score += 2          # Big bonus — special chars are very effective
    else:
        feedback.append("Add at least one special character (e.g. !, @, #).")

    # --- Scoring ---
    # Max possible score = 7 (2+1+1+1+2)
    if score >= 6:
        label = "Strong 💪"
    elif score >= 4:
        label = "Medium ⚠️"
    else:
        label = "Weak ❌"

    return label, score, feedback


# ── Demo ──────────────────────────────────────────────────────────────────────
test_passwords = [
    "abc",                    # Too short, nothing good
    "password123",            # Common, no symbols, no uppercase
    "Hello@2024",             # Good mix, decent length
    "X!9kP#mQ2$vL",          # Long, all character types
]

for pwd in test_passwords:
    label, score, tips = check_password_strength(pwd)
    print(f"\nPassword : {pwd}")
    print(f"Strength : {label}  (score: {score}/7)")
    if tips:
        print("Tips     :", " | ".join(tips))

Right off the bat, the code looks professional. Claude also used regex for the checks. It has a well-thought-out scoring system in place.

It started the function with a docstring explaining what it does, which is very common in real-world coding. The comments added are descriptive, making the code part itself self-explanatory. Even if I didn’t go to the explanation section, I’d still know what the code is doing here. Though I must say, the comments made the code less clean.

For the scoring system, Claude covered all the common scenarios, just like ChatGPT. One distinct difference is Claude’s bonus point for long passwords and adding special characters, because they make your password much stronger. It also added a demo section for testing passwords with different strengths for your convenience.

However, what makes Claude’s solution the most elegant is the feedback part. For each check, if your password misses it, then Claude uses a feedback list to add suggestions on what you need to do. Honestly, I was expecting this from the other two AI bots, but was let down.

To be fair, though, Claude’s explanation section was a bit weak compared to Gemini and ChatGPT. It focused more on explaining the system and how it works than explaining the code itself. However, the comments are quite helpful, making it sufficient for the gap in the explanation, thus earning Claude our winner for this challenge.


Not all AIs have the same coding capabilities

This was a fun experiment highlighting how each AI bot understood the coding challenge, processed it, and implemented the solution. All of their approaches had good sides and bad. This really makes you think about the future of AI and coding.



Source link

Leave a Reply

Subscribe to Our Newsletter

Get our latest articles delivered straight to your inbox. No spam, we promise.

Recent Reviews


After being teased in the second beta, the new “Bubbles” feature is finally available in Android 17 Beta 3. This is the biggest change to Android multitasking since split-screen mode. I had to see how it worked—come along with me.

Now, it should be mentioned that this feature will probably look a bit familiar to Samsung Galaxy owners. One UI also allows for putting apps in floating windows, and they minimize into a floating widget. However, as you’ll see, Google’s approach is more restrained.

App Bubbles in Android 17

There’s a lot to like already

First and foremost, putting an app in a “Bubble” allows it to be used on top of whatever’s happening on the screen. The functionality is essentially identical to Android’s older feature of the exact same name, but now it can be used for apps in addition to messaging conversations.

To bubble an app, simply long-press the app icon anywhere you see it. That includes the home screen, app drawer, and the taskbar on foldables and tablets. Select “Bubble” or the small icon depicting a rectangle with an arrow pointing at a dot in the menu.

Bubbles on a phone screen

The app will immediately open in a floating window on top of your current activity. This is the full version of the app, and it works exactly how it would if you opened it normally. You can’t resize the app bubble, but on large-screen devices, you can choose which side it’s on. To minimize the bubble, simply tap outside of it or do the Home gesture—you won’t actually go to the Home Screen.

Multiple apps can be bubbled together—just repeat the process above—but only one can be shown at a time. This is a key difference compared to One UI’s pop-up windows, which can be resized and tiled anywhere on the screen. Here is also where things vary depending on the type of device you’re using.

If you’re using a phone, the current bubbled apps appear in a row of shortcuts above the window. Tap an app icon, and it will instantly come into view within the bubble. On foldables and tablets, the row of icons is much smaller and below the window.

Another difference is how the app bubbles are minimized. On phones, they live in a floating app icon (or stack of icons) on the edge of the screen. You are free to move this around the screen by dragging it. Tapping the minimized bubble will open the last active app in the bubble. On foldables and tablets, the bubble is minimized to the taskbar (if you have it enabled).

Bubbles on a foldable screen

Now, there are a few things to know about managing bubbles. First, tapping the “+” button in the shortcuts row shows previously dismissed bubbles—it’s not for adding a new app bubble. To dismiss an app bubble, you can drag the icon from the shortcuts row and drop it on the “X” that appears at the bottom of the screen.

To remove the entire bubble completely, simply drag it to the “X” at the bottom of the screen. On phones, there’s also an extra “Manage” button below the window with a “Dismiss bubble” option.

Better than split-screen?

Bubbles make sense on smaller screens

That’s pretty much all there is to it. As mentioned, there’s definitely not as much freedom with Bubbles as there is with pop-up windows in One UI. The latter allows you to treat apps like windows on a computer screen. Bubbles are a much more confined experience, but the benefit is that you don’t have to do any organizing.

Samsung One UI pop-up windows

Of course, Android has supported using multiple apps at once with split-screen mode for a while. So, what’s the benefit of Bubbles? On phones, especially, split-screen mode makes apps so small that they’re not very useful.

If you’re making a grocery list while checking the store website, you’re stuck in a very small browser window. Bubbles enables you to essentially use two apps in full size at the same time—it’s even quicker than swiping the gesture bar to switch between apps.

If you’d like to give App Bubbles a try, enroll your qualified Pixel phone in the Android Beta Program. The final release of Android 17 is only a few months away (Q2 2026), but this is an exciting feature to check out right now.

A desktop setup featuring an Android phone, monitor, and mascot, surrounded by red 'missing' labels


Android’s new desktop mode is cool, but it still needs these 5 things

For as long as Android phones have existed, people have dreamed of using them as the brains inside a desktop computing setup. Samsung accomplished this nearly a decade ago, but the rest of the Android world has been left out. Android 17 is finally changing that with a new desktop mode, and I tried it out.



Source link