Connect with us

Tech

This puzzle challenge brings joy to the world of code

Published

on

ascii santa hat


By midnight on December 1, 2015, when Eric Wastl first launched his annual Santa-themed puzzle-a-day programming challenge Advent of Code, 81 people had signed up. That pretty much matched his capacity planning for 70 participants. Wastl figured this amusement might be of interest to a few friends, friends of friends, and maybe some of their friends as well.

But Wastl, a software engineer who works as a senior architect for TCGPlayer, an online marketplace for trading card games, had failed to anticipate how social media’s recursive contagion might overwhelm these modest expectations. He jokes that the technical term for what happened next is: “OH NO!” Within 12 hours there were about 4,000 participants. The server nearly crashed. At 48 hours, there were 15,000 people, and by the end of the event, on December 25, the grand total was 52,000. The following year, he moved the operation to Amazon Web Services, and numbers have since continued to grow.

Last year, perhaps due to the pandemic, the event saw a 50% spike in traffic, with more than 180,000 participants worldwide.

And now again this year, thousands of coders from San Francisco to Slovenia—students and software engineers and competitive programmers alike—are counting down to Christmas with Advent of Code (AoC). While traditional advent calendars deliver daily gifts of chocolate or toys (and some alternative versions deliver dog treats, Jack Daniel’s, Lego figures, or even digital delights via apps), Advent of Coders unwrap playfully mathy problems and then write computer mini-programs that do the solving.

The fun of it, partly, is simply in the time-honored magic of a holiday ritual. But it’s also in submitting to pleasurable puzzlement. Peter Norvig, a research director at Google, finds it fun because he trusts the creator, Wastl, “to make it worth my time”—in a similar way, Norvig says, to how New York Times crossword puzzlers trust Will Shortz to do right by them. “There will be some tricks that make it interesting,” says Norvig, “but there are bounds on how tricky.” 

The joy of coding

At midnight US Eastern time (Wastl is based in Buffalo, New York), every night from December 1 to 25, a new puzzle lights up at adventofcode.com, embedded within a cleverly composed Christmas-caper narrative—one player described the story as “an Excuse Plot if there ever was such a thing.”

This year’s event got off to a fine start when Santa’s elves lost the keys to the sleigh. The first problem set the scene as follows: “You’re minding your own business on a ship at sea when the overboard alarm goes off! You rush to see if you can help. Apparently one of the Elves tripped and accidentally sent the sleigh keys flying into the ocean!”

Luckily, the Elves had a submarine handy for just such emergencies, and from there participants set off on a 25-day underwater quest. They try to solve two puzzles daily (the second adding a twist, or more difficulty), each worth a star and some praise: “That’s the right answer! You are one gold star closer to finding the sleigh keys.”

Every player earns a star for solving a problem, but if you’re the first to get a star, you receive 100 points; if you’re second, you receive 99 points; and so on, with the 10oth place earning one point.

“In order to save Christmas,” the puzzle master explains, “you’ll need to get all fifty stars by December 25th.”

MS TECH | ADVENT OF CODE

The object of Advent of Code is to solve the puzzles using your programming language of choice (Python is the most popular). Participants also use by-hook-or-by-crook strategies—such as “Excel madness,” as Wastl describes it, or reams of graph paper, and a surprising number solve the puzzles in Minecraft.

But the broader motivation varies from player to player. Some treat it as an annual tune-up for their programming skills; others see it as the perfect opportunity to learn to code or try a new language. José Valim, creator of the Elixir programming language, is live-streaming his AoC solutions on Twitch.

At the top of the global leaderboard, which ranks the 100 players with the highest total score, competitive programmers like Brian Chen (his handle is “betaveros”) and Andrew He (“ecnerwala”) are out for speed. A security software engineer working on end-to-end encryption at Zoom, Chen placed first last year (and the year before), while He came a close second.

“Going fast is fun,” Chen says, “just like optimizing anything where you can get fairly immediate feedback. There are lots of little knobs to tweak, and lots of little moments to be proud of where you made the right choice or prepared something that came in useful.”

Both MIT computer science alums who live in the Bay Area, Chen and He are friendly rivals who’ve competed together in programming challenges over the years—on the same team at the International Collegiate Programming Contest (ICPC) and as competitors at Codeforces and Google’s Code Jam. This year again, Chen is beating He. “To be honest, it’s ’cause he’s a little better than me”—better at various tricks and implementations that optimize speed—“but I don’t like admitting that,” says He, a founding engineer at the startup Modal, which builds infrastructure and tooling for data teams.

The leaderboard is out of reach for the majority of participants—especially as puzzles get harder by the day. Kathryn Tang, who runs an engineering operations team at Shopify, ranked 36th on day one and 81st on day three, but she knew her leaderboard status wouldn’t last long. “I’m doing this for fun using Google sheets,” she says.

The element of contest, however, is replicated—at Shopify and Google and many companies big and small—with private leaderboards, as well as dedicated chat channels where players share solutions and kvetch about the problems in post-mortems.

“The competitiveness helps commitment,” said the engineer Alec Brickner, commenting in a Slack channel at Primer.ai, a natural-language-processing startup in San Francisco (Brickner has made the leaderboard on a couple of days so far).

“Meh,” replied his colleague Michael Leikam. “The payoff for me is the joy of coding.”

John Bohannon, Primer’s director of science, seconded that with an emoji: “SAME.”

Bohannon also loves the silly story that sets up the problems, but the plot has little to zero utility. “The speed-demon solvers completely ignore the story, focusing on the variables of the problem to solve and just getting to it,” he says.

Nora Petrova, a data scientist and engineer at Primer’s office in London, UK, is there for the beauty, not the sport: “I love the drama that’s unfolding in every puzzle,” she says. For instance, on day four, a giant squid attached itself to the submarine—it wanted to play bingo, of course. The puzzle input was a random set of 100 bingo boards, and the challenge was to predict the winning board and give it to the squid.

Love it XOR Hate it

Wastl’s main motivation in creating Advent of Code was to help people become better programmers. “Beginners who are just getting into programming are the people I want to get the most out of this,” he says. “The success metric for most people should be ‘How many new things did I learn?’—not ‘Was I one of the very, very fastest people in the world to solve this puzzle?’”

Russell Helmstedter, a middle school teacher at the De Anza Academy of Technology and the Arts, in Ventura, California, is using Advent of Code to teach Python to his students in sixth, seventh, and eighth grades. They tackled the first two problems together as a class. From a teaching perspective, the problems are effective exercises because if you fail, you can simply try again—very much in the spirit of test-driven software development.

Helmstedter found that some of his students were a bit overwhelmed with the two-pronged challenge—deciphering the problem and coding a machine to solve it—but most embraced the struggle. “I like that it is hard to do,” one student said on a survey. And another said, “There is honestly no downside. I really like how you start working progressively toward a goal.” Although the survey’s multiple-choice question ranking “feels” elicited one “Hate it,” 41 respondents chose “Like it” (to varying degrees) and eight “Love it.”

ascii reindeer

MS TECH | ADVENT OF CODE

At the University of Ljubljana, in Slovenia, the computer scientist Janez Demšar uses the AoC problems both as a professor and to hone his own skills (he’s on the core team of Orange, an open-source machine learning and data visualization toolbox). “I need to have some regular practice, like a violinist who plays in an orchestra and does some teaching but still needs some small pieces to practice,” he says. “So these are my etudes.” Demšar teaches Programming 101 to a heterogenous group of more than 200 students. “My greatest concern,” he says, “is how to keep those who already know some (or a lot) of programming interested and occupied. AoC tasks are great because they require various skills”—from pure coding to algorithms.

Gregor Kikelj, a third-year mathematics undergraduate at the university, first tried Advent of Code in 2019. He did well enough to land himself an internship at Comma.ai (working on Openpilot, its software for semi-automated driving systems), since the founder of the company was also competing. And Kikelj boosted his grade in the programming course (with another professor), since every problem solved was worth extra points on the final exam—plus bonus points for placing on the leaderboard.

Kikelj (“grekiki”) got up every morning for the puzzle drop—6 a.m. in Slovenia—and ranked 52 overall on the leaderboard, accumulating a total of 23 extra exam points. “After that year, they put the cap on the amount of points you can receive to 5,” he recalls. But he’s still rising with the sun to pounce on the puzzle. This year his best ranking, on day five, was 25th—he’s aiming to stay in the top 100. “We’ll see how it goes as the problems get harder,” Kikelj says.

How to leaderboard

If the leaderboard is your game, competition is fierce and the daily countdown is key—players wait like a hawk for the puzzle to drop, and then click lickety-split to download. Last year, this “giant burst of traffic synchronized to a single second” (as Wastl describes it) troubled even Amazon’s load balancers.

The AoC Subreddit—one of many communities around the internet—is full of inside-baseball banter about how to prevail (with solutions and help threads, as well as self-satire and memes). But the best resource is perhaps Brian Chen’s blog post on “how to leaderboard.”

Tech

Why I became a TechTrekker

Published

on

group jumps into the air with snowy mountains in the background


My senior spring in high school, I decided to defer my MIT enrollment by a year. I had always planned to take a gap year, but after receiving the silver tube in the mail and seeing all my college-bound friends plan out their classes and dorm decor, I got cold feet. Every time I mentioned my plans, I was met with questions like “But what about school?” and “MIT is cool with this?”

Yeah. MIT totally is. Postponing your MIT start date is as simple as clicking a checkbox. 

Sofia Pronina (right) was among those who hiked to the Katla Glacier during this year’s TechTrek to Iceland.

COURTESY PHOTO

Now, having finished my first year of classes, I’m really grateful that I stuck with my decision to delay MIT, as I realized that having a full year of unstructured time is a gift. I could let my creative juices run. Pick up hobbies for fun. Do cool things like work at an AI startup and teach myself how to create latte art. My favorite part of the year, however, was backpacking across Europe. I traveled through Austria, Slovakia, Russia, Spain, France, the UK, Greece, Italy, Germany, Poland, Romania, and Hungary. 

Moreover, despite my fear that I’d be losing a valuable year, traveling turned out to be the most productive thing I could have done with my time. I got to explore different cultures, meet new people from all over the world, and gain unique perspectives that I couldn’t have gotten otherwise. My travels throughout Europe allowed me to leave my comfort zone and expand my understanding of the greater human experience. 

“In Iceland there’s less focus on hustle culture, and this relaxed approach to work-life balance ends up fostering creativity. This was a wild revelation to a bunch of MIT students.”

When I became a full-time student last fall, I realized that StartLabs, the premier undergraduate entrepreneurship club on campus, gives MIT undergrads a similar opportunity to expand their horizons and experience new things. I immediately signed up. At StartLabs, we host fireside chats and ideathons throughout the year. But our flagship event is our annual TechTrek over spring break. In previous years, StartLabs has gone on TechTrek trips to Germany, Switzerland, and Israel. On these fully funded trips, StartLabs members have visited and collaborated with industry leaders, incubators, startups, and academic institutions. They take these treks both to connect with the global startup sphere and to build closer relationships within the club itself.

Most important, however, the process of organizing the TechTrek is itself an expedited introduction to entrepreneurship. The trip is entirely planned by StartLabs members; we figure out travel logistics, find sponsors, and then discover ways to optimize our funding. 

two students soaking in a hot spring in Iceland

COURTESY PHOTO

In organizing this year’s trip to Iceland, we had to learn how to delegate roles to all the planners and how to maintain morale when making this trip a reality seemed to be an impossible task. We woke up extra early to take 6 a.m. calls with Icelandic founders and sponsors. We came up with options for different levels of sponsorship, used pattern recognition to deduce the email addresses of hundreds of potential contacts at organizations we wanted to visit, and all got scrappy with utilizing our LinkedIn connections.

And as any good entrepreneur must, we had to learn how to be lean and maximize our resources. To stretch our food budget, we planned all our incubator and company visits around lunchtime in hopes of getting fed, played human Tetris as we fit 16 people into a six-person Airbnb, and emailed grocery stores to get their nearly expired foods for a discount. We even made a deal with the local bus company to give us free tickets in exchange for a story post on our Instagram account. 

Continue Reading

Tech

The Download: spying keyboard software, and why boring AI is best

Published

on

🧠


This is today’s edition of The Download, our weekday newsletter that provides a daily dose of what’s going on in the world of technology.

How ubiquitous keyboard software puts hundreds of millions of Chinese users at risk

For millions of Chinese people, the first software they download onto devices is always the same: a keyboard app. Yet few of them are aware that it may make everything they type vulnerable to spying eyes. 

QWERTY keyboards are inefficient as many Chinese characters share the same latinized spelling. As a result, many switch to smart, localized keyboard apps to save time and frustration. Today, over 800 million Chinese people use third-party keyboard apps on their PCs, laptops, and mobile phones. 

But a recent report by the Citizen Lab, a University of Toronto–affiliated research group, revealed that Sogou, one of the most popular Chinese keyboard apps, had a massive security loophole. Read the full story. 

—Zeyi Yang

Why we should all be rooting for boring AI

Earlier this month, the US Department of Defense announced it is setting up a Generative AI Task Force, aimed at “analyzing and integrating” AI tools such as large language models across the department. It hopes they could improve intelligence and operational planning. 

But those might not be the right use cases, writes our senior AI reporter Melissa Heikkila. Generative AI tools, such as language models, are glitchy and unpredictable, and they make things up. They also have massive security vulnerabilities, privacy problems, and deeply ingrained biases. 

Applying these technologies in high-stakes settings could lead to deadly accidents where it’s unclear who or what should be held responsible, or even why the problem occurred. The DoD’s best bet is to apply generative AI to more mundane things like Excel, email, or word processing. Read the full story. 

This story is from The Algorithm, Melissa’s weekly newsletter giving you the inside track on all things AI. Sign up to receive it in your inbox every Monday.

The ice cores that will let us look 1.5 million years into the past

To better understand the role atmospheric carbon dioxide plays in Earth’s climate cycles, scientists have long turned to ice cores drilled in Antarctica, where snow layers accumulate and compact over hundreds of thousands of years, trapping samples of ancient air in a lattice of bubbles that serve as tiny time capsules. 

By analyzing those cores, scientists can connect greenhouse-gas concentrations with temperatures going back 800,000 years. Now, a new European-led initiative hopes to eventually retrieve the oldest core yet, dating back 1.5 million years. But that impressive feat is still only the first step. Once they’ve done that, they’ll have to figure out how they’re going to extract the air from the ice. Read the full story.

—Christian Elliott

This story is from the latest edition of our print magazine, set to go live tomorrow. Subscribe today for as low as $8/month to ensure you receive full access to the new Ethics issue and in-depth stories on experimental drugs, AI assisted warfare, microfinance, and more.

The must-reads

I’ve combed the internet to find you today’s most fun/important/scary/fascinating stories about technology.

1 How AI got dragged into the culture wars
Fears about ‘woke’ AI fundamentally misunderstand how it works. Yet they’re gaining traction. (The Guardian
+ Why it’s impossible to build an unbiased AI language model. (MIT Technology Review)
 
2 Researchers are racing to understand a new coronavirus variant 
It’s unlikely to be cause for concern, but it shows this virus still has plenty of tricks up its sleeve. (Nature)
Covid hasn’t entirely gone away—here’s where we stand. (MIT Technology Review)
+ Why we can’t afford to stop monitoring it. (Ars Technica)
 
3 How Hilary became such a monster storm
Much of it is down to unusually hot sea surface temperatures. (Wired $)
+ The era of simultaneous climate disasters is here to stay. (Axios)
People are donning cooling vests so they can work through the heat. (Wired $)
 
4 Brain privacy is set to become important 
Scientists are getting better at decoding our brain data. It’s surely only a matter of time before others want a peek. (The Atlantic $)
How your brain data could be used against you. (MIT Technology Review)
 
5 How Nvidia built such a big competitive advantage in AI chips
Today it accounts for 70% of all AI chip sales—and an even greater share for training generative models. (NYT $)
The chips it’s selling to China are less effective due to US export controls. (Ars Technica)
+ These simple design rules could turn the chip industry on its head. (MIT Technology Review)
 
6 Inside the complex world of dissociative identity disorder on TikTok 
Reducing stigma is great, but doctors fear people are self-diagnosing or even imitating the disorder. (The Verge)
 
7 What TikTok might have to give up to keep operating in the US
This shows just how hollow the authorities’ purported data-collection concerns really are. (Forbes)
 
8 Soldiers in Ukraine are playing World of Tanks on their phones
It’s eerily similar to the war they are themselves fighting, but they say it helps them to dissociate from the horror. (NYT $)
 
9 Conspiracy theorists are sharing mad ideas on what causes wildfires
But it’s all just a convoluted way to try to avoid having to tackle climate change. (Slate $)
 
10 Christie’s accidentally leaked the location of tons of valuable art 🖼📍
Seemingly thanks to the metadata that often automatically attaches to smartphone photos. (WP $)

Quote of the day

“Is it going to take people dying for something to move forward?”

—An anonymous air traffic controller warns that staffing shortages in their industry, plus other factors, are starting to threaten passenger safety, the New York Times reports.

The big story

Inside effective altruism, where the far future counts a lot more than the present

" "

VICTOR KERLOW

October 2022

Since its birth in the late 2000s, effective altruism has aimed to answer the question “How can those with means have the most impact on the world in a quantifiable way?”—and supplied methods for calculating the answer.

It’s no surprise that effective altruisms’ ideas have long faced criticism for reflecting white Western saviorism, alongside an avoidance of structural problems in favor of abstract math. And as believers pour even greater amounts of money into the movement’s increasingly sci-fi ideals, such charges are only intensifying. Read the full story.

—Rebecca Ackermann

We can still have nice things

A place for comfort, fun and distraction in these weird times. (Got any ideas? Drop me a line or tweet ’em at me.)

+ Watch Andrew Scott’s electrifying reading of the 1965 commencement address ‘Choose One of Five’ by Edith Sampson.
+ Here’s how Metallica makes sure its live performances ROCK. ($)
+ Cannot deal with this utterly ludicrous wooden vehicle
+ Learn about a weird and wonderful new instrument called a harpejji.



Continue Reading

Tech

Why we should all be rooting for boring AI

Published

on

Why we should all be rooting for boring AI


This story originally appeared in The Algorithm, our weekly newsletter on AI. To get stories like this in your inbox first, sign up here.

I’m back from a wholesome week off picking blueberries in a forest. So this story we published last week about the messy ethics of AI in warfare is just the antidote, bringing my blood pressure right back up again. 

Arthur Holland Michel does a great job looking at the complicated and nuanced ethical questions around warfare and the military’s increasing use of artificial-intelligence tools. There are myriad ways AI could fail catastrophically or be abused in conflict situations, and there don’t seem to be any real rules constraining it yet. Holland Michel’s story illustrates how little there is to hold people accountable when things go wrong.  

Last year I wrote about how the war in Ukraine kick-started a new boom in business for defense AI startups. The latest hype cycle has only added to that, as companies—and now the military too—race to embed generative AI in products and services. 

Earlier this month, the US Department of Defense announced it is setting up a Generative AI Task Force, aimed at “analyzing and integrating” AI tools such as large language models across the department. 

The department sees tons of potential to “improve intelligence, operational planning, and administrative and business processes.” 

But Holland Michel’s story highlights why the first two use cases might be a bad idea. Generative AI tools, such as language models, are glitchy and unpredictable, and they make things up. They also have massive security vulnerabilities, privacy problems, and deeply ingrained biases.  

Applying these technologies in high-stakes settings could lead to deadly accidents where it’s unclear who or what should be held responsible, or even why the problem occurred. Everyone agrees that humans should make the final call, but that is made harder by technology that acts unpredictably, especially in fast-moving conflict situations. 

Some worry that the people lowest on the hierarchy will pay the highest price when things go wrong: “In the event of an accident—regardless of whether the human was wrong, the computer was wrong, or they were wrong together—the person who made the ‘decision’ will absorb the blame and protect everyone else along the chain of command from the full impact of accountability,” Holland Michel writes. 

The only ones who seem likely to face no consequences when AI fails in war are the companies supplying the technology.

It helps companies when the rules the US has set to govern AI in warfare are mere recommendations, not laws. That makes it really hard to hold anyone accountable. Even the AI Act, the EU’s sweeping upcoming regulation for high-risk AI systems, exempts military uses, which arguably are the highest-risk applications of them all. 

While everyone is looking for exciting new uses for generative AI, I personally can’t wait for it to become boring. 

Amid early signs that people are starting to lose interest in the technology, companies might find that these sorts of tools are better suited for mundane, low-risk applications than solving humanity’s biggest problems.

Applying AI in, for example, productivity software such as Excel, email, or word processing might not be the sexiest idea, but compared to warfare it’s a relatively low-stakes application, and simple enough to have the potential to actually work as advertised. It could help us do the tedious bits of our jobs faster and better.

Boring AI is unlikely to break as easily and, most important, won’t kill anyone. Hopefully, soon we’ll forget we’re interacting with AI at all. (It wasn’t that long ago when machine translation was an exciting new thing in AI. Now most people don’t even think about its role in powering Google Translate.) 

That’s why I’m more confident that organizations like the DoD will find success applying generative AI in administrative and business processes. 

Boring AI is not morally complex. It’s not magic. But it works. 

Deeper Learning

AI isn’t great at decoding human emotions. So why are regulators targeting the tech?

Amid all the chatter about ChatGPT, artificial general intelligence, and the prospect of robots taking people’s jobs, regulators in the EU and the US have been ramping up warnings against AI and emotion recognition. Emotion recognition is the attempt to identify a person’s feelings or state of mind using AI analysis of video, facial images, or audio recordings. 

But why is this a top concern? Western regulators are particularly concerned about China’s use of the technology, and its potential to enable social control. And there’s also evidence that it simply does not work properly. Tate Ryan-Mosley dissected the thorny questions around the technology in last week’s edition of The Technocrat, our weekly newsletter on tech policy.

Bits and Bytes

Meta is preparing to launch free code-generating software
A version of its new LLaMA 2 language model that is able to generate programming code will pose a stiff challenge to similar proprietary code-generating programs from rivals such as OpenAI, Microsoft, and Google. The open-source program is called Code Llama, and its launch is imminent, according to The Information. (The Information

OpenAI is testing GPT-4 for content moderation
Using the language model to moderate online content could really help alleviate the mental toll content moderation takes on humans. OpenAI says it’s seen some promising first results, although the tech does not outperform highly trained humans. A lot of big, open questions remain, such as whether the tool can be attuned to different cultures and pick up context and nuance. (OpenAI)

Google is working on an AI assistant that offers life advice
The generative AI tools could function as a life coach, offering up ideas, planning instructions, and tutoring tips. (The New York Times)

Two tech luminaries have quit their jobs to build AI systems inspired by bees
Sakana, a new AI research lab, draws inspiration from the animal kingdom. Founded by two prominent industry researchers and former Googlers, the company plans to make multiple smaller AI models that work together, the idea being that a “swarm” of programs could be as powerful as a single large AI model. (Bloomberg)

Continue Reading

Copyright © 2021 Vitamin Patches Online.