A 280-character tweet might not seem like a lot of space, but if you’re crafty enough, it’s actually just enough to program a video game.
That’s the challenge that security engineer Alok Menghrajani gave himself: to squeeze a CD-ROM holding a retro-style video game into the space of a single tweet. After two weekends, he’d succeeded — the resulting code is a video game that can be booted up in a virtual machine, or burned onto a physical disk. The game, Menghrajani told Motherboard, is kind of like a cross between Tron and Snake.
perl -E 'say"A"x46422,"BDRDAwMQFFTCBUT1JJVE8gU1BFQ0lGSUNBVElPTg","A"x54,"Ew","A"x2634,"/0NEMDAxAQ","A"x2721,"BAAAAYQ","A"x30,"SVVVqogAAAAAAAEAF","A"x2676,"LMBaACgB76gfbgTAM0Qv8D4uYAI86qqgcc+AXP45GA8SHIRPFB3DTeYSEhyBSwCa8CwicMB3rSGtkDNFSYwJHvc68MA","VapVqlWq"x330'|base64 -D>cd.iso— alokmenghrajani (@alokmenghrajani) June 15, 2018
Previously, the Square employee managed to fit an entire bootable floppy disk containing a video game into a 140-character tweet. The current game takes advantage of Twitter’s recent doubled character limit, letting him create a CD-ROM-compatible game in 277 characters. He says the inspiration came after researching the CD format at work and realizing he could program functions with minimal characters.
For those with programming know-how, the process of cramming all of that code into this tiny space is known as “code golfing,” where people try to reach an objective, create a program, or solve a puzzle in the fewest lines of code possible (or in this case, the least amount of characters). The golfing namesake draws from the sport, where the fewest number of strokes (or keystrokes, in this case) “wins.”
“I find it relaxing,” Menghrajani said. “It’s a way to meditate for me.” You can try his game here, assuming you still have a computer that can load a CD or a floppy disk.