Hacker News new | past | comments | ask | show | jobs | submit login
The greatest bug I never fixed (2010) (makandra.com)
80 points by nfriedly 20 days ago | hide | past | favorite | 23 comments



I found this via https://500mile.email/ - I had seen a lot of the stories there before, but this one was new to me and I thought folks here might appreciate it.


Thanks for sharing this one! I've been trying to collect more video game ones for 500ME because I find them to be highly entertaining.


The irony of APIs, so many of them meant to standardise operability but each have their own unique endpoints, behaviour etc.


#927


That's really funny.

I can imagine that such issues are going to resurface as not-yet-perfectly-working AIs communicate more with each other. Then the AIs are going to have to learn how to deal with the brokenness of the other AIs they talk to. Then the fixes are going to break some stuff that was working...


I wonder what could have been done to fix this bug. Does anyone with more experience with the game have any ideas?


Do not send messages while your status is drunk. It is a solution in real life as well.


Bravo!


I see what you did there


You could encode the data in a format that would be resistant to this transformation.

We'd need to know the specifics of this transformation to build something adequate.


When I first read your message, “resistant to this transformation” made me think of _avoiding_ characters / pairs / whatever that are transformed: make sure the message is the same whether sober or drunk.

If the specifics of the transform are known, I think you could also start with a prefix that the receiver could use to determine drunk vs sober, and have two different decoding paths.

And I’m not sure whether you meant both meanings or not, but maybe elaborating will help someone else.


Since a lot of people don't remember / haven't played the game, here are the details that can help you:

- You can determine drunken state using the game's front-end API. They call debuffs/buffs 'auras' and you can match it against a specific set of drunken aura ids. - The game will randomly add Hs and iirc the word "hic" to a sentence in order to emulate drunkenness.

Personally, I like the checksum solution the best -- don't even try to be smart, just validate the integrity of the message. This also solves issues where your message gets truncated, or other problems arise. They also likely had to break up their messages across multiple chat messages (there's chat limit) so a checksum goes a long way here.


Add checksum and discard corrupted message?


This is the cleanest solution, IMO, rather than having to check each word/key/whatever of your protocol.


Depending on how the message is changed you might not be able to trust the checksum as well


A checksum is usually intended not to match if the checksum itself is corrupted.


Use an encoding with forward error correction of course!

I think sending everything twice when drunk -- and letting the receiver figure it out -- would be most true to the drunk behaviour.


Simply pausing the addon on drunk players would have been enough.


With a little admonition of course.


Make the chat deserializer "decode" from "sh" to "s" and so on.


That ruins every "sharon" in the data set, though.


I'm sure we'd figure something out. :)


Sounds almost like a feature!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: