In your second link, the linked followup post is also interesting as it captures some misunderstandings one might have when starting out with STM code.