Usually after a night of blacked out escapades, one simply suffers a hangover and learns not to hit the bar quite so hard.
But if you're MIT Media Labs Researcher Dhairya Dand (opens in new tab), you'll learn from the experience and decide to invent something to prevent it from ever happening again. While most would simply learn to count the number of drinks that they've had at every hour, Dand decided to refine it to a science. He invented glowing ice cubes that would change from green, to orange, and to red depending on how much alcohol a drinker's had over time. Red would indicate that the individual was well past the legal limit and would notify a close friend via text.
Molded in gelatin, these glowing "ice cubes" are packed with a LED, an accelerometer, a battery, and IR transceivers, which are programmed to count the number of sips an individual takes from a drink. To keep with the club or party atmosphere, the cubes respond to ambient noise, meaning that they'll flash color to the beat of the music.
While this is an interesting (and nerdy) way to keep track of drinks, it's not particularly practical unless an individual stays secluded to one cup. And this is with the hope that in their drunken state, they don't forget that the cube is there to begin with and try to eat it…