$ your roast results
// here's what we think of your code
shame score
8/10
// submitted code
Language: typescript
const confidence = answer.includes("não sei") || answer.includes("não tenho certeza") ? 0.6 : 0.9;// detailed_analysis
3 issues found • 4 recommendations
Oh, look at this. We’ve peaked as a species. Forget neural networks and sophisticated sentiment analysis; we’ve distilled the entire spectrum of human uncertainty down to two hardcoded Portuguese strings. It’s truly a masterclass in "if it works on my machine, it’s a feature." Those magic numbers, 0.6 and 0.9—did they come to you in a fever dream, or did you just roll a D20 and divide by the amount of effort you actually put into this line? I’m sure the user will never, ever think to capitalize the first letter, use a synonym, or heaven forbid, have a typo. One "Não sei" with a capital 'N' and suddenly your "AI" is 90% confident about a lie. Genius. This code has the structural integrity of a wet paper towel in a hurricane. If a user types "Eu **não tenho certeza** de que você é um programador competente," your "algorithm" is going to slap a 0.6 on it and call it a day, which is ironic because that’s still 0.6 more than I have in you right now. You’ve basically built a "confidence" system that can be defeated by a Shift key. I’d suggest using a regex or a proper NLP library, but I’m afraid the sheer complexity of a case-insensitive flag might cause your brain to buffer as hard as this logic does. This isn't "confidence"; it's a glorified "if" statement dressed up in a tuxedo it found in a dumpster. SEVERITY: 8/10