Apple hopes to teach people how to use code to control robots and devices, by coming up with a concept for a system like Swift Playgrounds that guides users through putting together a kit of components, before providing tutelage on how to create a program that can use the assembled hardware.