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

The hunter-gatherer groups at the heart of a microbiome gold rush

Published

on

The hunter-gatherer groups at the heart of a microbiome gold rush


The first step to finding out is to catalogue what microbes we might have lost. To get as close to ancient microbiomes as possible, microbiologists have begun studying multiple Indigenous groups. Two have received the most attention: the Yanomami of the Amazon rainforest and the Hadza, in northern Tanzania. 

Researchers have made some startling discoveries already. A study by Sonnenburg and his colleagues, published in July, found that the gut microbiomes of the Hadza appear to include bugs that aren’t seen elsewhere—around 20% of the microbe genomes identified had not been recorded in a global catalogue of over 200,000 such genomes. The researchers found 8.4 million protein families in the guts of the 167 Hadza people they studied. Over half of them had not previously been identified in the human gut.

Plenty of other studies published in the last decade or so have helped build a picture of how the diets and lifestyles of hunter-gatherer societies influence the microbiome, and scientists have speculated on what this means for those living in more industrialized societies. But these revelations have come at a price.

A changing way of life

The Hadza people hunt wild animals and forage for fruit and honey. “We still live the ancient way of life, with arrows and old knives,” says Mangola, who works with the Olanakwe Community Fund to support education and economic projects for the Hadza. Hunters seek out food in the bush, which might include baboons, vervet monkeys, guinea fowl, kudu, porcupines, or dik-dik. Gatherers collect fruits, vegetables, and honey.

Mangola, who has met with multiple scientists over the years and participated in many research projects, has witnessed firsthand the impact of such research on his community. Much of it has been positive. But not all researchers act thoughtfully and ethically, he says, and some have exploited or harmed the community.

One enduring problem, says Mangola, is that scientists have tended to come and study the Hadza without properly explaining their research or their results. They arrive from Europe or the US, accompanied by guides, and collect feces, blood, hair, and other biological samples. Often, the people giving up these samples don’t know what they will be used for, says Mangola. Scientists get their results and publish them without returning to share them. “You tell the world [what you’ve discovered]—why can’t you come back to Tanzania to tell the Hadza?” asks Mangola. “It would bring meaning and excitement to the community,” he says.

Some scientists have talked about the Hadza as if they were living fossils, says Alyssa Crittenden, a nutritional anthropologist and biologist at the University of Nevada in Las Vegas, who has been studying and working with the Hadza for the last two decades.

The Hadza have been described as being “locked in time,” she adds, but characterizations like that don’t reflect reality. She has made many trips to Tanzania and seen for herself how life has changed. Tourists flock to the region. Roads have been built. Charities have helped the Hadza secure land rights. Mangola went abroad for his education: he has a law degree and a master’s from the Indigenous Peoples Law and Policy program at the University of Arizona.

Continue Reading

Tech

The Download: a microbiome gold rush, and Eric Schmidt’s election misinformation plan

Published

on

The Download: a microbiome gold rush, and Eric Schmidt’s election misinformation plan


Over the last couple of decades, scientists have come to realize just how important the microbes that crawl all over us are to our health. But some believe our microbiomes are in crisis—casualties of an increasingly sanitized way of life. Disturbances in the collections of microbes we host have been associated with a whole host of diseases, ranging from arthritis to Alzheimer’s.

Some might not be completely gone, though. Scientists believe many might still be hiding inside the intestines of people who don’t live in the polluted, processed environment that most of the rest of us share. They’ve been studying the feces of people like the Yanomami, an Indigenous group in the Amazon, who appear to still have some of the microbes that other people have lost. 

But there is a major catch: we don’t know whether those in hunter-gatherer societies really do have “healthier” microbiomes—and if they do, whether the benefits could be shared with others. At the same time, members of the communities being studied are concerned about the risk of what’s called biopiracy—taking natural resources from poorer countries for the benefit of wealthier ones. Read the full story.

—Jessica Hamzelou

Eric Schmidt has a 6-point plan for fighting election misinformation

—by Eric Schmidt, formerly the CEO of Google, and current cofounder of philanthropic initiative Schmidt Futures

The coming year will be one of seismic political shifts. Over 4 billion people will head to the polls in countries including the United States, Taiwan, India, and Indonesia, making 2024 the biggest election year in history.

Continue Reading

Tech

Navigating a shifting customer-engagement landscape with generative AI

Published

on

Navigating a shifting customer-engagement landscape with generative AI


A strategic imperative

Generative AI’s ability to harness customer data in a highly sophisticated manner means enterprises are accelerating plans to invest in and leverage the technology’s capabilities. In a study titled “The Future of Enterprise Data & AI,” Corinium Intelligence and WNS Triange surveyed 100 global C-suite leaders and decision-makers specializing in AI, analytics, and data. Seventy-six percent of the respondents said that their organizations are already using or planning to use generative AI.

According to McKinsey, while generative AI will affect most business functions, “four of them will likely account for 75% of the total annual value it can deliver.” Among these are marketing and sales and customer operations. Yet, despite the technology’s benefits, many leaders are unsure about the right approach to take and mindful of the risks associated with large investments.

Mapping out a generative AI pathway

One of the first challenges organizations need to overcome is senior leadership alignment. “You need the necessary strategy; you need the ability to have the necessary buy-in of people,” says Ayer. “You need to make sure that you’ve got the right use case and business case for each one of them.” In other words, a clearly defined roadmap and precise business objectives are as crucial as understanding whether a process is amenable to the use of generative AI.

The implementation of a generative AI strategy can take time. According to Ayer, business leaders should maintain a realistic perspective on the duration required for formulating a strategy, conduct necessary training across various teams and functions, and identify the areas of value addition. And for any generative AI deployment to work seamlessly, the right data ecosystems must be in place.

Ayer cites WNS Triange’s collaboration with an insurer to create a claims process by leveraging generative AI. Thanks to the new technology, the insurer can immediately assess the severity of a vehicle’s damage from an accident and make a claims recommendation based on the unstructured data provided by the client. “Because this can be immediately assessed by a surveyor and they can reach a recommendation quickly, this instantly improves the insurer’s ability to satisfy their policyholders and reduce the claims processing time,” Ayer explains.

All that, however, would not be possible without data on past claims history, repair costs, transaction data, and other necessary data sets to extract clear value from generative AI analysis. “Be very clear about data sufficiency. Don’t jump into a program where eventually you realize you don’t have the necessary data,” Ayer says.

The benefits of third-party experience

Enterprises are increasingly aware that they must embrace generative AI, but knowing where to begin is another thing. “You start off wanting to make sure you don’t repeat mistakes other people have made,” says Ayer. An external provider can help organizations avoid those mistakes and leverage best practices and frameworks for testing and defining explainability and benchmarks for return on investment (ROI).

Using pre-built solutions by external partners can expedite time to market and increase a generative AI program’s value. These solutions can harness pre-built industry-specific generative AI platforms to accelerate deployment. “Generative AI programs can be extremely complicated,” Ayer points out. “There are a lot of infrastructure requirements, touch points with customers, and internal regulations. Organizations will also have to consider using pre-built solutions to accelerate speed to value. Third-party service providers bring the expertise of having an integrated approach to all these elements.”

Continue Reading

Copyright © 2021 Seminole Press.