If you were lucky enough there was already someone within your organisation who could program in your chosen language and who was willing to impart this knowledge. This kind of mentoring, combined with books and hacking existing code was how I first learned.