You are here

10 ways bitcoin and blockchain are disrupting programming

Peter Wayner, Freelance writer

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 10 ways blockchain is teaching us new ways to write software.

Buyer’s Guide to Software Test Automation Tools

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.

[ More from Peter Wayner: 23 blockchain languages driving the future of programming ]

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.

[ Get Report: Gartner Magic Quadrant for Software Test Automation ]

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.

4. Programmers are more interested in proofs

Proving the code to be correct has always been a passion for the most mathematically minded developers, but most programmers avoid the hassle when the stakes are lower. When money is involved and active hackers have more incentive, though, building up a logical argument for the software's correctness is more attractive.

Programmers are relearning the lessons pushed by the theorem-loving mathy types in the hopes of squeezing the errors from their code.

5. Traditional languages are fading

Many C programmers love to claim that their language can do anything. They're right, and so are the lovers of other languages. You can implement blockchain algorithms in pretty much any language. Serious blockchain developers, though, are choosing newer languages with more emphasis on correctness, driving the path of innovation toward more accurate and trustworthy code.

As the blockchain-based algorithms find more and more uses outside of cryptocurrencies and digital contracts, they'll bring the interest in these newer languages with them, as well as the spirit of bug-averse coding.

6. Syntax is less important

JavaScript developers can write their code in pure ECMAScript or any of a burgeoning number of variations such as CoffeeScript, Coco, LiveScript, and Caffeine. Whatever they write, though, will be turned into plain old ECMAScript by a preprocessor.

The differences are largely syntactic and, at times, it seems as though they exist largely because some people don't like using their pinkie finger to type a semicolon. (More sophisticated preprocessing options, such as TypeScript, do add more practical features, such as type safety.)

Blockchain programmers are often less focused on the syntactic sugar coating of a language, and are more open about understanding how the code is converted to the instructions eventually executed by the blockchain virtual machine (VM).

They have to be. The conversion from high-level code to VM instructions is a big place where errors and omissions can creep into the software. Worries about attackers and security are forcing developers to spend more time thinking about how the code actually executes, and less time fussing about aesthetic issues such as counting tabs and spaces.

[ Also see: 32 app sec stats that matter ]

7. Programmers are embracing digital signatures 

Encryption is not uncommon on the web. You're probably reading this text in a browser that received an encrypted copy through the HTTPS protocol.

But digital signatures offer an entirely different layer of security that links a transaction to someone who holds the private key. The approach isn't perfect because the private key might be stolen or lost, but the algorithms provide some assurance that a particular person was responsible.

These digital signatures are common in some code platforms and have been for some time, especially in the distribution of software on mobile phones. Blockchain encourages regular developers to think about adding some digital assurance and keeping a secure log of everything that changes.

8. Blockchain is elevating Git's structure

Git wasn’t built to be a blockchain, but it is surprisingly similar. Each commit to the tree is not necessarily signed with a full-fledged digital signature, but it is sealed with a cryptographically secure hash function called SHA1. This hash function won't link the commit to a particular person, but Git version 1.8.3 introduced a feature that forces users to add a digital signature to their commits.

Git also doesn't put the commits in an unbreakable chain, in part because developers are often rebasing and merging their code in complicated ways. It's still an early example of how assurance can improve the history of data. Blockchain opens the opportunity to turn the amps up closer to 11.

9. Coders are making the transaction log open

Most SQL databases hide the transaction log from the user. They track all of the transactions in a single, trusted log file and then use this to recover from crashes and ensure consistency. Most SQL developers, though, will never know it's there because there’s usually no API or way for the average programmer to interact with it.

The blockchain world opens the door to these secret logs, both for transparency and security. Websites make it easy for users to follow the history of any coin from the moment it was created. Scientists study the transaction flow to understand the marketplace.

It's a different attitude toward data history. We still don't know everything that programmers will do with this option.

10. We are decentralizing the Internet (again)

When the Internet began, it was made up of hundreds, thousands, and eventually billions of machines, all first-class citizens with the ability to send and receive packets between one another. That's still technically true, but today some machines are more equal than others.

Hubs such as web mail sites, ecommerce portals, and especially social media sites dominate most of our interaction on the Internet. They earned this role by providing more organized and secure passage for bits when the traditional protocols (SMTP, FTP, HTTP) couldn't keep up with the bad bits such as spam. In essence, they centralized most of the power and control on the web.

[ Also see: The blockchain hype cycle: A reality check for the enterprise ]

Putting the trust back in the machines

Blockchain starts shifting us back to a world without trusted intermediaries who may or may not live up to the responsibility. It puts the power back to our computers, whether we have the maturity to deal with it or not. Another layer of trusted intermediaries are already helping to store our coins and negotiate our contracts, so this may be fleeting. But it's a refreshing return. 

[ Webinar: How to Fit Security Into Your Software Lifecycle With Automation and Integration ]