WHEN Jamel Mims teaches young, lower-income minority students in New York, he doesn’t deploy traditional materials like a blackboard, a whiteboard or PowerPoint. He uses a microphone—turned up loud for politicised raps—and mobile phones with augmented-reality apps. Mr Mims’s “interactive hip-hop classroom” uses music as an entry point into discussions about politics, race, class and gender.

One lesson centred upon Ahmed Mohamed, a 14-year-old high school pupil who was arrested in 2015 on suspicion of building a hoax bomb when he brought a self-assembled clock to school. Mr Mims aims not for lecturing, but for dialogue. He puts printed pictures of Mohamed on the wall, and asks students to scan them via an app. A menu of items pops up instantly: Mohamed’s Twitter feed; a 360-degree view of an interrogation room (meant to simulate the one Mohamed was taken to); a SoundCloud song; a quiz; a hip-hop video produced by Mr Mims. The lesson takes about 30 minutes; students respond to what they’ve learned by posting about Mohamed on Instagram. “Schools usually say cell phones are distracting, but the world says cell phones and other technologies are a desirable aspect of youth culture. So we try to leverage that in the classroom whenever we can,” Mr Mims says. “Students who are disengaged and turned off by pen and paper tests need to feel reinvigorated.”

Mr Mims’s classroom is one piece of a much larger community of activists and educators working to connect underprivileged American students to technologies like virtual reality, augmented reality, coding and production through the music and culture of hip-hop. Summer programmes and monthly hackathons have been developed to target students who are lagging behind their age-mates, often as a result of having transferred schools several times.

At the first Hip Hop Hacks event in April 2016, roughly 500 young people from New York and New Jersey spent the day in workshops learning HTML, CSS and DJ production. Perhaps just one in 20 attendees had experience with technology; the rest were drawn to the hip-hop element, Sommer McCoy, the organiser, said. Ms McCoy was inspired by an event she attended in 2015 at which words like “HTML”, “CSS”, “Python”, and “hacks” were written on a white board and students were asked to freestyle rap using those words. Seeing how hip-hop music could encourage young people to take an interest in technology, she set about planning Hip Hop Hacks.

At a hackathon in June at Spotify, participants attended workshops like “Hustling 101: How to Turn Your Code into Cash”, as well as sessions on building apps, trademarks and patents. Using pizza boxes, aluminium foil, a laptop, alligator clips and the program Scratch, one participant created a Music Production Controller (MPC)—an electronic musical instrument that allows for sampling and beat-making. “The common denominator is that they all listen to music. They all came to the event with headphones, and they’re listening to hip-hop,” said Ms McCoy, who is also a founder of the Mixtape Museum, a project that aims to archive cassette recordings of DJ mixes. “The goal is for them to say ‘Oh my god, this is HTML, let me take another class,’ and look at hip-hop not just as music on the radio, but as history, and see how tech has been a part of hip-hop all along.”

Other tech giants are getting involved. Tumblr hosted a Hip Hop Hacktivists “social coding” event in June for young people from schools with 70% dropout rates, those with criminal records, those who are homeless or LGBT. It used “Alright”, Kendrick Lamar’s Grammy-winning song, as a focal point: Mr Lamar in many ways epitomises the crossover between hip-hop, technology and social activism, and that song in particular had become an anthem of sorts for the Black Lives Matter movement. Bryan Bethea, the organiser, knew that foregrounding the rapper would help to market the event, and placed a photo of him on promotional materials (even though Mr Lamar was not participating directly).

Nearly 50 young attendees worked with engineers from Tumblr, Uber, Facebook, Google and the New York Times to create apps using open-data APIs from New York government services. One group built a mobile app that locates social services like food stamps. The event kicked off at 8.30am; some participants stayed until 11pm to finish their work, according to Mr Bethea. While many technology initiatives designed to meet the needs of these students are unrealistic in their expectations, this collaborative setup proved a boon.

More are on the horizon: Ms McCoy is planning programmes for 2018 in Washington, D.C., Chicago, Newark, New Jersey, and Richmond, Virginia, as well as a middle school event in Brooklyn. Mr Bethea is planning a “social coding” event for November, in collaboration with Uber or Rap Genius; this one, called “I Got a Story to Tell”, will be inspired by Biggie Smalls.

Mr Bethea sees huge socio-economic potential in these events. “The opportunities that exist in tech could change their entire circumstance,” he says. “They are not in environments where coding happens. Some don’t have computers at home. But they all have Jay-Z and Kanye CDs, and Jay-Z and Kanye are cool.” Hackathons are harnessing that coolness and putting it to important use.

Correction (August 28th, 2017): An earlier version of this piece said that the first Hip Hop Hacks event took place in April this year. In fact it took place in April 2016. This has been corrected.