Paul Krill
Editor at Large

Good advice: Bad code happens, so be prepared

analysis
Aug 23, 20132 mins

Developer of Storm computation system offers words of wisdom and experience on dealing with imperfections in code

When it comes to coding, software development is subject to mishaps. And when developers embrace this, they can make their software better, says Nathan Marz, developer of the Storm real-time distributed computation system.

Marz emphasizes that errors are a way of life in software development. “I’d like to start off by making the claim that your code is wrong,” and so is everybody else’s, Marz said at the NoSQL 2013 conference this week in an Jose, Calif. Given that code is wrong, it is wrong to treat code as deterministic, he said, but instead it should be treated as something that might or might not work.

When developers embrace that their code is wrong, they can design much better software, he added. “To design better software, you have to consider what are all the possible impacts of your code being wrong.” Monitoring software is as important as functionality itself and is the key to minimized downtime, he said.

Marz cited his open source Storm project as an example of what developers can achieve when recognizing coding problems. Storm, he said, solved a problem with the job tracker in the Apache Hadoop distributed computing system. Hadoop’s job tracker keeps state in memory, but when the job tracker failed, all the jobs died with it, he said. Storm’s Nimbus job tracker keeps state intact, he said. “If you kill it, nothing happens.”

Developers, he said, should embrace immutability, in which data is almost never changed or deleted, but rather only is added. Instead of doing updates and deletes, using immutability offers auditing benefits, said Jason Bloomberg, and analyyst at ZapThink. “The benefit is that you always have essentially a full audit trail of everything that went on.” (This is how electronic medical record systems work.) Expanded access to storage, including cloud storage, makes immutability more viable, he said.

Another design principle for developers is minimizing dependencies, limiting what can go wrong, said Marz.

This story, “Good advice: Bad code happens, so be prepared,” was originally published at InfoWorld.com. Get the first word on what the important tech news really means with the InfoWorld Tech Watch blog. For the latest developments in business technology news, follow InfoWorld.com on Twitter.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author