I taught myself, while doing the standard IT desktop support role. I built a few small tools for the team, then started working on larger projects, and over the course of about 1 year, converted full time into a development role.
So the idea that learning to code is something you do outside the workforce, and then need to find that "first gig", is not necessarily true.