I was in a similar position until finally leaving my job this February. I am not a programmer, I was actually an investment banker, but I know what it feels like to work in a soul sucking job and feel helpless. The trouble is, like you said, you get stuck in such a job to "buy time" - for me it was to make some money to pay back student loans - but unless you know exactly what you want to do next or you are actively searching for it, the time gets away from you. It becomes a virtuous cycle - the longer you are in a job like that, the harder it is to leave. Here is my 5 step guide to figuring out what the hell you want to do and getting out of a job you hate:
Step 1:
Like aurelius said below, the first step is figuring out what the hell you want to do, what you care about. This part has nothing to do with your skill set or which frameworks you should learn, it has to do with finding a mission you believe in. For me, the epiphany was realizing I needed to find my mission. I woke up in the middle of the night gasping because I realized that I had been in a job I hated for over 4 years and all along I knew that I wanted to start a company. I was buying time, but instead of a year or two as I originally planned, it was 4+.
The next day I decided to explore every business idea I had ever jotted down. I started reading voraciously about every sector of tech I found interesting. I started studying the history of venture capital. Finally, I was getting on a plane to New York for a dinner with one of my clients and as fortune would have it, in the airport I stumbled upon up a book called, "Makers: The New Industrial Revolution." Half way through my flight after ripping through the first 150 or so pages, I realized that 3D printing/digital fabrication was where I wanted to spend my time. I was convinced that this was going to change the world in a big way and I wanted to be a part of it.
I think this search process takes time and is different for everyone, but I'd be willing to bet that the more effort you put into actively searching for what you want to do, the luckier you'll be.
Step 2:
Once you know what you want to do, you have to accept that you are going to have to sacrifice your free time to make it happen. But here's the kicker - since you've found something that you're passionate about, it doesn't feel like a sacrifice!
I'm not sure whether you meant that you're working 8 hours a day and only coding 2, but if that is the case, you have plenty of time left in the day to go after your newfound passion. Personally, I started going to every after work meetup (and some during the day too) in the Bay Area in the digital fabrication space, introducing myself in person, over twitter or over email to anyone who would give me the time of day. I also kept reading as much as I could on digital fab and on startups. Next I started putting together specs, a powerpoint deck, a business model canvas and talking to friends who had started businesses before. The point is start soaking up as much knowledge as possible and moving the ball forward in any way you can. Maybe that is setting up informational interviews with professionals in whatever area you want to get into. Maybe that is taking One Month Rails or Michael Hartl's RoR tutorial. The bottom line is, do something productive every single day.
Step 3:
Put a date on the calendar you are going to quit by and tell people who matter so you can't back out. Honestly you'd be surprised how much this helps. Saying it out loud actually allows you to visualize walking out the door. Maybe more importantly, by telling other people, you are more likely to hold yourself accountable. You have to keep doing this too. The more you do it, the more comfortable it starts to feel.
For me that date was after I received my annual bonus. In investment banking that is basically half your pay so it would have been very difficult to leave when I was just a few months away from a big payday. I'm not sure what that date is for you. Maybe you had wanted to pay off your car later this year and need to wait until then. Maybe you hate your job so much that you want to quit next Friday. There is nothing wrong with either one. However, in my opinion, once you know what you want to do, the general rule of thumb is, the sooner you can quit the better. So if you wait, make sure it's for a good reason because it is very easy to make excuses.
Step 4:
At this point you have identified the date you will be out the door and you continue to communicate that to your friends, family and mentors, so in the meantime, get yourself as prepared as you can for that date. That means some combination of giving up TV at night, waking up earlier, staying up later, giving up days during the weekend. Determine what skills you need for whatever is coming next and start acquiring them. Use your network - the beautiful thing is, once you know what you want to do and are committed to making it happen, you'll find that people will want to help you. Again, the mantra is progress every day. One day at a time.
Step 5:
Jump. The truth is you will never be ready. At least not completely. But if you have something you are passionate about and are willing to commit yourself to, it will all be worth it. Consider the jump itself your first success. You will certainly have failures and more successes ahead of you, but that is the fun part ;)