Seeing how security and actual software engineering often comes as an afterthought, instead of serving as a fundamental requirement, it comes to very little surprise to be honest. I guess that's the downside of the comparably low entry level when it comes to developing crypto related software (as opposed to, say, traditional finance, military and aircraft applications).
Properly handling immutable, decentralized transactions is hard and mistakes are costly without recourse. Even moreso when it comes to smart contracts. It seems like a lot of companies and developers haven't yet fully fathomed the implications of what processing irreversible scripts and transactions really means.
Do you think certain practices such as TDD/pair programming/ and certain languages such as using a functional like Haskell/Lisp/F#/Clojure/Elixir/Erlang would've prevented these types of situations to begin with? While anybody working with the web HAS to be proficient at JS, due to bugs from mutable state and potential tight coupling, I've really been reluctant to dive deep into C++/Python/(anything JS related Node/Solidity) when by just using another language, all of these potential threats are mitigated by default of the language.
As a general rule, good programmers can write good code in whatever language they happen to use; and bad programmers will write bad code in any language they try. Moreover, no formulaic technique will turn idiots who don’t know what they’re doing into
software engineers.
Bitcoin Core is the
gold bitcoin standard for reliable Bitcoin software. It is written (primarily) in C++. Programmers such as gmaxwell, sipa, and others who write excellent code for this project have no need to switch to another language, unless
they find technical reasons which would make another language a better tool for the job. Also, they have no need to be taught “certain practices”—whatever they do, it is evidently working.
I myself write in C. In my experience, one ready means for me to find a fool who has scant, shallow understanding of technology is to wait for someone to give me a popular speech about “memory-safe languages”, or whatever.
On the flipside, the idiots who created the software disasters in this thread could have been writing in pure Haskell—they still would have created disasters! Morons who even
think of using client-side validation code for financial transactions are
innately incapable of writing good code.
There is no magic bullet for creating the
software engineering of which HeRetiK speaks. And those who believe that the former exists, will never do the latter.
One exception to the aforestated general rule is such a thing as smart-contract code which lives on the blockchain.
That code must be absolutely free of bugs—including as of compiler bugs, etc., which can undermine even perfectly-written code. For any relatively complicated program, the only means to guarantee bug-free code is to mathematically verify its properties. That is why I am so excited about the Bitcoin Simplicity research, as discussed above; but that is still in the early research stages.
Plus, as you mentioned, people would be in jail for losing large amounts of money, the potential liability a company has, to me at least, makes this a no-brainer.
I think the first step is for people to stop grabbing onto crypto-nonsense, from fly-by-nights who bang out shoddy code for Bitcoin, to ICOs of any kind. There is an incentive to write awful quality code, when people actually buy into it. As LoyceV observed only a few posts ago:
Seeing how security and actual software engineering often comes as an afterthought, instead of serving as a fundamental requirement
Well said! PR is everything, create a token, a website, and a story, and people throw tens of millions of dollars at you!
Only a very small share of all cryptocurrencies put development first. Then again, it makes sense for the majority to only join crypto for quick cash. I'm really curious what will be the next phase in money grabbing, now that we've seen shitcoins, Token sales and hard forks.
(P.S.: Please trim your quotes. Thanks.)