When programming backend, it is quite easy (at least for me), to do most of the stuff test driven and just keep hammering out a bunch of code that works, while being able to focus.
This isn't as much of a deal when I first start with the GUI part with dummy data, but once it all gets connected, and the GUI is created based on data from a an external API and my machine is running two apps at the same time and I'm basically debugging both, it just seems like I'm constantly context switching, not really being able to focus on one thing.
An example here might be a Node.js chat server that connects to another Rails application via some API. Now if the API was already done and set in stone, I could easily just focus on the Node.js part ... but trying to do the whole thing in some agile fashion, I just built the API as I build the Node.js app, which has a side effect on working on both Rails and Node (both backed up by different databases etc, ...).
If I compare this to working on one small library or just some deep backend stuff, I find that my productivity basically non-existent, because I constantly switch around and find bugs in 50 different places, instead of just focusing on one.
Is there something that I'm fundamentaly doing wrong?