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.