There are some, you can find these here:
For 2010: http://social.technet.microsoft.com/wiki/contents/articles/8666.sharepoint-2010-best-practices.aspx
For 2013: http://social.technet.microsoft.com/wiki/contents/articles/12438.sharepoint-2013-best-practices.aspx
On this link, you can find a section called development which has some links about writing code.
Best practices are, and rightfully so, always a much sought-after topic. There are various kinds of best practices:
- Microsoft best practices. In real life, these are the most important ones to know, as most companies implementing SharePoint best practices have a tendency to follow as much of these as possibly can. Independent consultants doing architecture and code reviews will certainly take a look at these as well. In general, you can safely say that best practices endorsed by Microsoft have an added bonus and it will be mentioned whenever this is the case.
- Best practices. These practices are patterns that have proven themselves over and over again as a way to achieve a high quality of your solutions, and it's completely irrelevant who proposed them. Often MS best practices will also fall in this category. In real life, these practices should be the most important ones to follow.
- Practices. These are just approaches that are reused over and over again, but not necessarily the best ones. Wiki's are a great way to discern best practices from practices. It's certainly possible that this page refers to these "Practices of the 3rd kind", but hopefully, the SharePoint community will eventually filter them out. Therefore, everybody is invited and encouraged to actively participate in the various best practices discussions.