July 17 was “World Emoji Day,” and so the online learning site Codecademy found a fun way to celebrate. It unveiled a five-hour mini-course teaching Emojicode, a unique programming language that consists entirely of emojis.
“We believe that Emojis have expressive force,” explained the language’s official web page. “Let’s use that to make programming more fun and accessible.”
Originally, Codecademy planned to reveal the mini-course on April Fool’s Day, but was delayed in the height of the world dealing with the COVID-19 pandemic.
“I think the marketing team didn’t want to be too tone-deaf, so we kind of backed off this until we found a better day, which is now, World Emoji Day,” senior curriculum developer Sonny Li said on YouTube during a special hour-long interview with the language’s creator, Theo B. Weidmann, who helped design and review Codecademy’s new mini-course.
Their interview begins by explaining Emojicode’s filename extension, which is either
.emojic or… the grape emoji. “I need to say something about this,” Weidmann interjects. “I was always against using emoji filenames. But it turned out that the Emojicode community really enjoyed using emoji filenames… so we decided to introduce that.”
Li acknowledges “it really embodies what Emojicode stands for.”
Emojis are small digital images defined in Unicode with a dedicated set of hexidecimals so they can be rendered the same across all computers.
In Emojicode, the grape emoji signals the beginning of a block of code, while the end of the block gets indicated with the watermelon emoji. But why grapes? Mostly personal preference, Weidmann acknowledged, although he adds that early on, “I decided to use emojis that are very rarely used to express something meaningful” for the everyday symbols like the curly braces found in other languages.
“Curly braces convey as little meaning as those grapes and watermelon. Except for the fact, of course, that we as humans perceive those curly braces as belonging together. But it’s actually just a matter of time, and you’ll perceive the watermelon and the grape as belonging together too.”
It’s a racecar-starting checkered flag emoji that indicates which code runs during execution, and instead of quotation marks around text, emojicode uses a smiley face at the beginning and an exclamation point at the end. To indicate a string, the code is enclosed between two “ABC” emojis.
In their interview, Codecademy’s Li agrees with a YouTube commenter who said the language helps you visualize how code works — while thinking about coding in a new way. “Certainly…” Weidmann responds. “We don’t code thinking about the words that actually are there… That’s not how we program, actually. It’s the same with mathematics, by the way. Those are also just signs somebody made up.”
The fun continues throughout the language. The pig-nose emoji method accesses the list’s elements, while a hamster emoji shuffles them. And the list itself is created by a set of variables between the popcorn emoji and the eggplant emoji.
And yes, emojis can be considered part of a string. In fact, even the error messages include an emoji (right after the more-useful line number and character position of the error.) And after printing out the error-containing line, the up-arrow emoji is even used to point to where the error occurred.
“It was really important to me that the error message be customized with emojis.”
Assigning values to variables is done with a right-pointing arrow. Although declaring “mutable” variables, with non-constant values, requires additional emojis — the crayon, and the “new” emoji. And Emojicode also enforces strict typing for its variables.
“We don’t have functions in Emojicode,” Weidmann explains in his interview. “It’s just objects, like in Java.”
A thought bubble emoji is used for a comment. And the symbol for modulo — which gives the remainder after dividing two numbers — is a person tossing something into a garbage can.
Codecademy calls it a “light-hearted language” with a “playful syntax,” and their course’s web page argues “you will never look at your go-to programming language the same way again.”
Though they do include a warning for new programmers. “We wouldn’t recommend you use this as your first course in programming.”
Birth of a Language
Emojicode compiles into fast-running native machine language, and the documentation explains that the language is fully open source. Its GitHub repository even points out that a Dockerfile is available for building in a Ubuntu 18.04 environment. But where did the language come from?
By day Weidmann is a Zurich-based digital product designer — at least, according to Google’s translation of his German-language web page. “Our core competence lies in recognizing and clarifying needs and functionalities.”
In a 2016 essay, Weidman acknowledged that he can’t clearly remember why he started the language, “but I do remember that somebody sent me a message with a lot of Emojis and I suppose my brain ultimately started parsing that as code.”
The first public version was released in early 2016 — and it drew a range of reactions on Hacker News. “It’s about time we let go of the symbols hardcoded onto our keyboards and start finding better abstractions for our thoughts…” wrote one self-identified programmer/entrepreneur. But another commenter had a more visceral reaction.
“I had a nightmare strangely similar to this recently…”
The language has now attracted a small but loyal following. During his interview, Weidmann points out there are already plugins for text editors like Sublime and TextMate with keyboard shortcuts for inserting the language’s emojis, while others have accomplished something similar using a custom keyboard layout.
And there was also once an Emoji IDE plugin for the Atom editor, “but I gave up supporting that,” Weidmann adds later because the whole thing was too much work for the benefit — let’s put it like that.”
When someone asks Weidmann where he says the language in five years, he answers “I have no idea. I would never, ever could’ve have thought that there would be a Codecademy course about this when I started. I would have never thought that people were actually going to build things in it. And I have no idea where we will be in five years.
“Maybe all software everywhere is going to be written in Emojicode. I don’t know.”
Sonny Li adds, “We’ll see.”
In the meantime, he can reflect proudly on what he’s brought into the world: A language that lets geeks dream of acing a whiteboard coding interview just by drawing a racecar flag, a smiley face, two “ABC” icons, a red exclamation point, and a watermelon.
- Researcher explores whether whiteboard coding interviews unnecessarily hobble candidates with stress.
- Oracle’s Java group holds “March Madness”-style voting competition on Twitter to find the best Java Developer Kit features.
- Microsoft looks for trends in workplace analytics data about its own remote workforce.
- White Castle gives a test run to Flippy, the burger-flipping robot (arm).
- One of World War II’s “Rosie the Riveters” is now making masks.
- Researchers investigate whether playing chess makes you smarter.
- Pine64 releases its Linux smartphone with a “convergence package” for plugging it into an external display and keyboard.
- Other recent Pine64 products include the PineTime smartwatch, PineCube cameras, and “Pinecil,” a RISC-V based soldering iron.
At this time, The New Stack does not allow comments directly on this website. We invite all readers who wish to discuss a story to visit us on Twitter or Facebook. We also welcome your news tips and feedback via email: firstname.lastname@example.org.