- Why does smart contract development require a different mindset than regular programming?
Your smart contracts are visible by anyone on the blockchain, they can be duplicated and tested easily to find vulnerability inside it. They are holding money and often your user money so you need to be really careful.
- Argue with your own words why clarity in your code is more important than performance.
Clariry is important because if you keep your code simple it will be easier to spot bugs, people who use your code as a library or people who code on your project will understand your functions easily.
- As the article says, all data and functions are public in a smart contract. What false beliefs might someone have around private data and private functions in a smart contract that could have dangerous consequences?
The consequence will be that confidential informations could be leaked. A really bad usage will be to base an admin function or a key function on a password which is stored on a private variable.
- Why do you think all the fundamental principles mentioned in the article comes down to tradeoffs?
You will always have to find the right balance regarding your smart contract use case, sometime you will have to change your initial code structure for security purpose.