Skip to main content

Digital Trends may earn a commission when you buy through links on our site. Why trust us?

Code in formation: New York City teachers are using Beyonce to learn JavaScript

bey script beyonce code computer science
ANDRE DURAO/Shutterstock
Who would be better at teaching people how to get code in formation than Beyoncé? That’s what one educator asked herself when she was looking for a way to teach JavaScript.

While the singing superstar is not directly teaching people how to code, computer science educator Emily Thomforde is teaching Bey Script, a computational metaphor she developed that uses Beyoncé to teach nontechnical educators such as English and history teachers in New York City how to use JavaScript and teach it to their students. The three-session course is held throughout the year.

In computer science, a “metaphor” helps a user understand how certain computational procedures work by using an entity the user is familiar with. “If you imagine Beyoncé were an object we’re using in JavaScript, her ‘methods’ are things that she can do, like sing and dance,” Thomforde told Motherboard. “I relate all these arcane, technical, traditionally geeky things into ways my audience can relate to, and we found Beyonce was super-relatable.”

In the course, Thomforde teaches Javascript concepts such as “Properties” using things everyone can easily visualize, like Beyonce’s internationally revered and illusive hair. “Now we have ‘beyonce.hair’, since hair is a property of Beyoncé. What’s a thing about her hair that can change? Now we have ‘beyonce.hair.color’. Then we can set it equal to something: ‘beyonce.hair.color=red.'”

The Bey Script course is part of the New York City Foundation for Computer Science Education’s (CSNYC) 10-year, $80 million initative to provide every public school student with computer science education. Thomforde is currently writing the curriculum for Vidcode, an online platform that teaches teenagers to code. In May, Vidcode collaborated with the New York City Department of Education to host a hackathon event where 150 kids were tasked with using Vidcode to learn how to use Javascript to make a video that helps abandoned animals currently living in shelters.

With President Obama pledging $4 billion to make sure every kid across America gets computer science education, it may not be long before kids are making Lemonade on their computers.

Editors' Recommendations

Keith Nelson Jr.
Former Digital Trends Contributor
Keith Nelson Jr is a music/tech journalist making big pictures by connecting dots. Born and raised in Brooklyn, NY he…
Apple M3 chip: faster speeds, better efficiency, and more
Apple's Tim Millet presents the Apple silicon A14 Bionic chip.

There’s no doubt that Apple silicon has been a massive boost to Apple’s best Macs, banishing the days of sluggish performance under Intel’s processors. But what’s coming next? And more importantly, can Apple keep the momentum going?

Well, the next generation of Apple silicon chips will be the M3, and all the rumors suggest it could be the best addition to the line-up yet. We’ve searched high and low for all the details, so if you’re wondering what to expect from the M3, M3 Pro, M3 Max, and more, you’ve come to the right place.
Release date

Read more
The best Dell laptops for 2023: XPS, Inspiron, and more
Dell XPS 13 9370 review | Lid and trim

Picking the best Dell laptop is no easy task, as the company produces several great laptops every year, some of which are the best budget laptops or even the best laptops overall. The affordable XPS 13 9315 — which packs an almost magical amount of power and functionality into one of the tiniest chassis of all — is a case in point and our top pick. But there are some other options to consider, depending on what you need it for. We've rounded them all up below in our definitive list of the best Dell laptops you can buy today.

Read more
Nvidia defies pushback, defends 8GB of VRAM in recent GPUs
RTX 4060 Ti sitting on a pink background.

Nvidia's CEO Jensen Huang is defending the recently-launched RTX 4060 Ti, and in particular, its 8GB of VRAM. The executive spoke about gaming and recent GPU releases in a roundtable interview with reporters at Computex 2023, where he faced questions about the limited VRAM on Nvidia's most recent GPU.

PCWorld shared a quote in which Huang defended the 8GB of VRAM and told gamers to focus more on how that VRAM is managed: "Remember the frame buffer is not the memory of the computer -- it is a cache. And how you manage the cache is a big deal. It is like any other cache. And yes, the bigger the cache is, the better. However, you’re trading off against so many things."

Read more