For most of the tech world, blockchain has been like that crazy uncle from the other coast, the one you see every other Thanksgiving. Sometimes he’s rich. Sometimes he’s poor. Sometimes he’s railing against the corruption in Washington. Sometimes he’s telling tales of his gang of guerrilla coders who are building the foundation for the new establishment. He might be crazy. He might be right. He could be both.
But when you take the time to dig behind the stories of outrageous fortune, you’ll find that the world of blockchain and bitcoin is more than a complex stew of money, politics, and power. The technology that’s emerging is changing how we program computers.
The need to defend against fraud and maintain a stable source of truth across a hostile Internet has forced programmers to confront some of the most vexing problems in computer science. The solutions aren’t perfect, but they are good enough to lead us to rethink how we build all our systems.
Here are best 10 ways blockchain is teaching us new ways to write software.
1. Coders must take distributed decision making seriously
The Internet is forty-some years old now, but we still haven’t figured out the best way to create algorithms that allow multiple machines to work well together. Oh, they can handle the problems that are easy to split into parts, but deeper issues about consensus and decision making are difficult to get right, especially when there are malicious actors out there.
The blockchain paradigm is one of the first big efforts to find a way for frenemies to collaborate. They need to work together on building consensus on who owns which coin, but they must verify because trust can’t be assumed.
In the past, many of the solutions depended upon setting up a single source of truth, a perfectly adequate solution, but one with too many dangers of corruption and abuse of power. The push to create a stable blockchain is forcing programmers to tackle the most challenging issues of distributing power and, perhaps, building a fairer world.
2. Programmers must be more careful
Creating software has always required care because bugs—especially small, unanticipated ones—can introduce errors and crashes. When the stakes are low, you can fix most bugs by simply restarting the code or rebooting the system.
But people who program blockchains are often dealing with money, and that’s a big incentive for hackers, who will comb through software looking for mistakes to exploit. Active attackers are much more dangerous than the kind of random glitches that trip up regular code.
The bug-induced losses at the larger exchanges and ventures, including the decentralized autonomous organizations (DAOs), have been dramatic. The developers of the various blockchain languages are emphasizing correctness and making decisions that empower programmers to be more careful.
3. Languages are getting simpler
One of the easiest bug-killing strategies is to simplify languages by stripping out all the clever constructs that make them harder to analyze. Yes, programmers have asked for these extra tools over the years, but experimenting with neat syntax enhancements and preprocessors is fine when the only stakes are games and web pages showing cat videos.
Blockchain developers tend to be happier with simpler approaches because both the programmer and the code reviewer are more likely to understand the code completely. This leads to fewer bugs and more stable code.
Will these ideas leak over into the mainstream? As blockchain-based data structures become more prevalent, programmers will bring this simple aesthetic with them. Will it stick? Time will tell.