Just in Case

Better safe than sorry, right?

Aug 12, 2025, by Ugo

AI: Let me add the new functionality for you...

def complex_function() -> dict:
    if ...:
        return {"message": "success"}
    else:
        return {"message": "failure"}
    
    # This should never be reached, but just in case
    return {}

Me: 😲


One of many examples where AI writes tons of unnecessary code.

← Back to all fails