CodeSOD: Raise VibeError
Ronan works with a vibe coder- an LLM addicted developer. This is a type of developer that's showing up with increasing frequency. Their common features include: not reading the code the AI generated, not testing the code the AI generated, not understanding the context of the code or how it integrates into the broader program, and absolutely not bothering to follow the company coding standards.
Here's an example of the kind of Python code they were "writing":
if isinstance(o, Test): if o.requirement is None: logger.error(f"Invalid 'requirement' in Test: {o.key}") try: raise ValueError("Missing requirement in Test object.") except ValueError: pass if o.title is None: logger.error(f"Invalid 'title' in Test: {o.key}") try: raise ValueError("Missing title in Test object.") except ValueError: passAn isinstance check is already a red flag. Even without proper type annotations and type checking (though you should use them) any sort of sane coding is going to avoid situations where your method isn't sure what input it's getting. isinstance isn't a WTF, but it's a hint at something lurking off screen. (Yes, sometimes you do need it, this may be one of those times, but I doubt it.)
In this case, if the Test object is missing certain fields, we want to log errors about it. That part, honestly, is all fine. There are potentially better ways to express this idea, but the idea is fine.
No, the obvious turd in the punchbowl here is the exception handling. This is pure LLM, in that it's a statistically probable result of telling the LLM "raise an error if the requirement field is missing". The resulting code, however, raises an exception, immediately catches it, and then does nothing with it.
I'd almost think it's a pre-canned snippet that's meant to be filled in, but no- there's no reason a snippet would throw and catch the same error.
Now, in Ronan's case, this has a happy ending: after a few weeks of some pretty miserable collaboration, the new developer got fired. None of "their" code ever got merged in. But they've already got a few thousand AI generated resumes out to new positions…
'Vehicle fire' causing delays on section of A12
'Vehicle fire' causing delays on section of A12
High school basketball player sues coach for assault and bullying after he pulled her hair in outburst that shocked the world
Strictly Come Dancing star Nadiya Bychkova 'rushed to hospital after horror fall during rehearsals'
Ransomware crew spills Saint Paul's 43GB of secrets after city refuses to cough up cash
The Interlock ransomware gang has flaunted a 43GB haul of files allegedly stolen from the city of Saint Paul, following a late-July cyberattack that forced the Minnesota capital to declare a state of national emergency.…
Crowded House star Neil Finn blasts outrageous claims he had 'troubles with erectile dysfunction' before 'becoming at father at 67'
Inside Prince Harry's 'perilous' Afghanistan tour and how it ended in a 'depressing' way: Young royal 'revelled in the simplicity' of army life until a scandal forced him home
Fire boss issues warning after crews tackle two large wildfires in Essex
'Intoxicated' Nigerian man who sexually assaulted teenager is spared jail due to his 'troubled background' - as victim tells court he 'ruined her life' and is now scared to walk alone
Residents 'frustrated' by closure of police station front desk - although many hadn't noticed
Chap found chunks of an asteroid older than Earth in his suburban living room
In late June media speculated that a meteor entering Earth’s atmosphere caused widespread sightings of a celestial fireball during daylight hours across the southeast USA. Scientists have now confirmed space rocks caused the phenomenon, citing as evidence a meteorite they found in a resident’s living room.…
Prince Andrew 'barks foul-mouthed question at builders' as speed humps are installed near his palatial home
Crypto-crasher Do Kwon admits guilt over failed not-so-stablecoin that erased $41 billion
Terraform Labs founder Do Kwon has pled guilty to committing fraud when promoting the so-called "stablecoin" Terra USD and now faces time in jail.…
Breakthrough therapy helps worst chronic low back pain sufferers feel better... and it lasts for years
Would YOU wear this swimsuit? Raunchy reality star shocks with extreme bikini that seems to defy the laws of physics
Epic Games has another win over Apple and Google, this time in Australia
Australia’s Federal Court has given Epic Games another win in its global fight against the way Apple and Google run their app stores.…