or it really depends on the coding culture within a specific project/company/etc?
I mean, how actually common it is to always annotate your contracts in accordance with the official docs?
Depends on how experienced the coders are. I started annotating code mainly to remind myself what functions were for. In big coding projects at some point you need notes.Otherwise you have to figure out over and over what your code is actually for. When you work for big companies, it is often mandatory. If not annotated,the source gets hard (and expensive) to maintain. If some other coder has to maintain your code and has to figure out what all the functions do, that costs days, even in a relative small project. A pro coder easily costs 100 an hour, 800 per day. If they have to spend three days figuring out what the functions do, that is 2400 dollars wasted, basically. It takes (a little) more time when developing, but it pays off in the long run. Once you get used to doing it, you often use cut-and-paste standard templates and fill in the particular details. Takes 2 minutes per function. And as said, it is often mandatory for professional coding jobs. If you want to work for big business, it is smart to develop the habit asap. Solidity coding is still young, I noticed a lot of coders don't annotate, and it comes across as unprofessional. It has to become a standard in a coding culture at some point.
Wow, thank you very much for such an exhaustive answer. Yea, it all makes sense, I should probably develop the habit to control myself better — once you develop the habit it's probably quite easy.
Обсуждают сегодня