Why Blockchain needs Future-Proof Code
Tags: hackathons, blockchain, softwaredevelopment, bettercode
Published: 2017-12-24 02:25:09

---
title: "Why Blockchain needs Future-Proof Code"
published: true
tags: hackathons,blockchain,software-development,better-code
canonical_url: https://medium.com/bettercode/why-blockchain-needs-future-proof-code-cb09b39175e1
---

#### Because our society needs solutions that are innovative _and_ sustainable.
> I’m not a great programmer; I’m just a good programmer with great habits. — Kent&nbsp;Beck> Quality of code may not guarantee the success of a project, but it can definitively be its main, though invisible, cause of failure. — [Mario&nbsp;Fusco](https://twitter.com/mariofusco/status/806456518434582528)

**The Blockchain Hackathon**

In the second weekend of February, 50 teams will compete in the [Dutch Blockchain Hackathon](https://blockchainhackathon.eu/). Over a 54-hour stretch, they will unleash their creativity to build innovative blockchain-based solutions that may shape the future of our&nbsp;society.

The teams will compete in 5 thematic tracks, vying for praise and recognition by the jury, and for €50,000 in prize&nbsp;money.

The jury will be looking for quality, impact and contribution to the blockchain ecosystem. Teams can earn bonus points by using open standards and sharing their code through open source licenses. **And by producing high-quality code.**

**Why is code quality important?**

So why is code quality important in this hackathon? Are hackathons not intended to hack things together until they work? Not to produce something polished and future-proof?

Well, here are some reasons code quality is not a&nbsp;luxury.

- **Blockchain is based on trust.** Or, as Ravish Gopal explains, with Blockchain, “[the conventional _trusted third party_ mechanism is being replaced by software](https://medium.com/softwareimprovementgroup/blockchain-technology-do-we-trust-a-faceless-system-8cdafa7b32f3)”. And trust requires auditability. Better code is more auditable.
- Innovative solutions, whether [built by startups](https://dev.to/jstvssr/autonomously-driving-code-quality-2n10-temp-slug-5262134) or established organisations, must be adaptable, extensible, and transferable. Otherwise the solution will not **outlive the startup** founders and/or the first team that works on&nbsp;it.
- In general, **better code allows you to build better products**. Rather, as argued by Rob van der Leek, [great products are not built by great individuals, but by great teams](https://medium.com/bettercode/lets-build-better-products-1acfba24108d). And good code is both the hallmark of a great team and a necessary precondition for their successful operation as a&nbsp;team.

Well, you may say, these reasons only kick in after some time, not before my hackathon is over. So let’s narrow our focus to the first 54 hours of your team’s project. Why is code quality relevant?

- **Lunch** : Good code starts paying back before lunch on the first day. By that time you are no longer in your first iteration. You are modifying and enhancing the code you wrote in the morning. If it’s messy, hard to read, untested, bloated, and so forth, then you will slow down, inject defects without noticing, and lose your&nbsp;way.
- **Dinner**. Bad code makes your team hate you before dinner. The code you wrote looks weird and alien to your teammate that wants to build on it. Before adding to it, she needs to refactor. You don’t like what she does to your code. Rather than complementing each other you enter into a turf&nbsp;war.
- **36-hours in**. You just had your breakthrough idea that will set you apart from the competition and impress the jury beyond belief. Except that changing your code to implement this idea seems like jumping off a cliff. Your code is a house of cards. Should you refactor, reorganise, make the required changes? Or rather start over. Time is&nbsp;ticking.
- **Win**. You pulled it off. Your solution works, it wows the jury, and you’re are invited for the post-hackathon accelerator track. But wait! Though it works, you don’t know why or how. Some of your team members won’t hang around after the hackathon, but their code is a mystery to the others. In a way, you still come out of the event empty-handed.

![](https://cdn-images-1.medium.com/max/1024/1*OSE6kbMmyyIIW_1j7AyJaw.png)<figcaption>Why code quality matters in a Hackathon</figcaption>

**Can code quality be measured?**

Given the importance of code quality for teams to build great products, we need a shared definition of what code quality is and how it can be measured.

An abstract definition of code quality can be found in the notion of _maintainability_ as provided by the ISO 25010 standard on software product&nbsp;quality:

> **maintainability** = degree of effectiveness and efficiency with which a product or system can be modified by the intended maintainers, where modifications can include corrections, improvements or adaptation — ISO&nbsp;25010

We have operationalised this abstract definition in a concrete set of measurements, complete with thresholds and aggregation to a simple rating scheme (see “A practical model for measuring maintainability”, IEEE Computer Society Press,&nbsp;2007).

In turn, this measurement model has been the basis for 10 guidelines for the working programmer, published in _“Building Maintainable Software”_ (O’Reilly, 2016).

![](https://cdn-images-1.medium.com/max/1024/1*QItsZ4-mG4KiR8qpZAaQBg.png)<figcaption>The 10 guidelines for writing future-proof code from “Building Maintainable Software”.</figcaption>

At the [Software Improvement Group](https://www.sig.eu/), we have been using and improving our maintainability model over a decade to measure billions of lines of code and provide hundreds of executive clients with fact-based advice on how to manage their software projects and application portfolios.

So, yes, code quality can be measured.

#### Can you measure code quality yourself?

Plenty of tools are available for measuring code quality. But they come with pitfalls. They often measure the wrong things by default and require intricate configuration, and they flood the developer with _false positives_, i.e. warnings that don’t reveal any real problem (for a more detailed discussion, see my [success criteria for applying software analysis tools effectively](https://dev.to/jstvssr/govern-and-empower--using-static-analysis-tools-successfully-2ami-temp-slug-2767040)).

To avoid these pitfalls for developers, we have developed the [Better Code Hub](https://bettercodehub.com/). It provides developers with immediate feedback on the 10 guidelines. We designed Better Code Hub to be extremely easy to use, provide a clear definition of done, and empower teams to improve what&nbsp;matters.

The guidelines set crips thresholds, but they also provide tolerance for the occasional outlier. As a result, the definition of done provided by Better Code Hub is challenging, yet achievable and&nbsp;fun.

#### Code quality at the Dutch Blockchain Hackathon

The teams participating in the Dutch Blockchain Hackathon are stimulated and supported to innovate with high quality code. Support includes:

- **Books.** Free copies of _Building Maintainable Software_ will be distributed to the participants.
- **Better Code Hub.** The teams will get 12-month Pro access to the Better Code&nbsp;Hub.
- **Assistance.** During the event, a team of SIG consultants will help participants use the tool, and coach them on code&nbsp;quality.
- **Jury.** The measurement results of Better Code Hub will be made available to the jury, allowing them to award bonus points for higher&nbsp;quality.

**Is code quality relevant beyond this hackathon?**

[Software is the DNA of our digital society](https://dev.to/jstvssr/software-more-and-faster-but-how-i3j-temp-slug-725952). So yes, code quality is important for all of us. Competitive power and business agility depend on mastery of software.

If you are not participating in the Hackathon, but you are interested in measuring and managing code quality, here are some&nbsp;options:

- If you are a **start-up** , we have a complimentary Pro license for Better Code Hub for you as well (conditions apply).
- If you are an **open-source** developer, you can use the Free license on any public GitHub repository, within reasonable size limitations.
- If you are an **IT director, development team lead, or similar** , let me know about your challenges regarding code quality, developer competencies, team empowerment, software governance, application portfolio management, etc. At the [Software Improvement Group](https://www.sig.eu/), we know what it takes to be successful in both empowering self-organising teams _and_ applying effective governance over your in-house software development, your suppliers, and your IT landscape.

[_Joost Visser_](https://www.linkedin.com/in/jstvssr) _is CTO at the Software Improvement Group, Professor of Large-scale Software Systems at Radboud University, and author of O’Reilly books “Building Maintainable Software” and “Building Software&nbsp;Teams”._

- [Building Maintainable Software, Java Edition](http://shop.oreilly.com/product/0636920049159.do)
- [Building Maintainable Software, C# Edition](http://shop.oreilly.com/product/0636920049555.do)
- [Building Software Teams](http://shop.oreilly.com/product/0636920048565.do)
- [BetterCode](https://medium.com/bettercode)
- [Dutch Blockchain Hackathon Community](https://blockchainhackathon.eu/)

* * *