HTTPS SSH
UPDATE: 

This tutorial has been superseded by a brand new tutorial. 

Head to https://developer.atlassian.com/display/DOCS/Create+a+Confluence+%27Hello+World%27+Macro 
for the latest guide to how to create your first Confluence macro.