I remember a while ago I wasn’t able to express myself in a tweet and yet, there’s Alok Menghrajani, a security engineer at Square, who has successfully squeezed a Bootable CD holding a retro-style video game in a mere 277 character tweet.
The Square employee gave this challenge of squeezing a CD-ROM-compatible game into a tweet to himself and after two weekends, he’d succeeded. It took him between 50 and 100 hours of time to get the resulting code, he estimated. The resulting code is a video game that creates a CD-ROM disk image, which can either be booted up in a virtual machine or burned onto a physical disc. Alok described the game as a mixture of 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
Alok Menghrajani described this technique of cramming all the code into tiny space as “code golfing”. He said that the CD-ROM idea came after he delved into research on the CD format working and once he was done, he realized, “I can probably fit this in a tweet”, he said.
The coder also took advantage of the doubled tweet character limit. Previously, the limit was 140 characters.
As he finished cramming all that code into a tweet, he said, “I find it relaxing. It’s a way to meditate for me”. Menghrajani added, “It’s pure hacker spirit, You just write the code and see what it does.”
This is not the first time that Alok Menghrajani has achieved something enticing like this. Back in 2015, he managed to fit an entire bootable floppy disk containing a video game into a 140-character tweet and about five years ago, he was successful in embedding a QR code within a QR code.
Menghrajani’s GitHub profile describes him as “Security engineer at Square. Previously co-author of Hack and put the ‘s’ in https at Facebook. Maker of CTFs.”