Nala (Ramayana)

As the son of Vishvakarma, Nala was the chief architect of the bridge to Lanka.

As a child, he enjoyed throwing whatever he found into the water. There are two stories.

When he threw a precious stone of a sage into a pond, the latter cursed him that anything he threw into the water should float on the surface. 

Since Nala was always sad that everything he threw into the water sank, he got a favor from his mother, that anything he threw into the water should float on the surface.

Both, curse and favor, helped him building the floating bridge.