Blog commenting is a SEO technique that is utilised by many low-quality SEO companies that offer prospective clients ‘quantity’ rather than ‘quality’ external links. The process of going to a blog, writing an irrelevant comment and inserting your ‘keywords’ as your name is definitely perceived to be spam and it is not a recommended strategy to undertake.
However, if you go to a blog, add a meaningful comment, and leave your name as your ‘real name’ or ‘company name’ can be classified as a legitimate external linking exercise (at a push). However, the effectiveness of blog commenting has never been proved, and my personal opinion is that it is a low-quality exercise that was utilised about 5-6 years ago. Again, if your agency or in-house SEO team recommend this activity, tread carefully.