I think Mike Hearn's list is useful. When applying it to my project I have the following replies:
- I've started using C++. I feel confident using C++ and I know I can make reliable C++ code; the only thing new for this project is the large focus on security. I have the impression it's easier to make cross-platform portable C++ code that doesn't require things like a Java runtime or Python interpreter. Many "managed" languages come with huge standard libraries with their own security vulnerabilities. I suppose only the parts I'm actually using really matter, but I'm not really sure about that. About garbage collection: doesn't that make the state of your software unpredictable? Maybe garbage collection is OK as long as your destructors don't do too important things?
- I won't re-implement Bitcoin; I plan to use it through the RPC interface.
- I'm not even close yet to the deployment stage, but thanks already for the sysadmin advice about hosting etc.. During application development, I intend to keep the application lean-and-mean; if it gets bulky I will consider splitting it up so that different parts can be run isolated and with minimum privileges.
- Right now I have a habit of carefully documenting each method and function, where I list e.g. all requirements on input objects and things it promises about output objects; I also mention whether some requirement is checked or not checked. Obviously, checked is preferred.
- Right now, my default behavior in case of errors is "log the error message and terminate the application". Obviously, when verifying untrusted input, default behavior should be different (e.g. "reply with error message, close the connection and clean up") to prevent DoS attacks.
- I decided to use exceptions in C++for error handling: I have the impression the cleaner, smaller code is worth the effort of making everything exception safe. I have the impression that the things you need to do for exception safety are already good practice anyway. The downside is of course that new developers also have to have "C++ exception skills"; right now I'm making decisions based on my own skill level.
- My application is only P2P in the sense that all participants have the same role, and form an arbitrarily shaped network. The difference with most P2P networks is that in my case, participants choose carefully who they are talking to. Consider it to be a sort of a dark-net, if you wish. In my case, TLS is only used to protect confidentiality; integrity is ensured with other cryptographical measures.