It won't affect your career negatively in the long run, but it might be a slight temporary setback in terms of ease of getting a first job again once you come back. But then, after that, it might actually be a positive.
Put yourself in the shoes of your interviewer (after you've come back): everything else being the same (eg. compared to an equivalent guy from your class who worked for 3 years straight as a programmer before applying), they might have a slight worry that you've gone a bit rusty on your time off, or possibly that you didn't love programming enough to stick with it for a while longer initially after graduation. It's important to sell your year off well, but I don't think it'll be difficult. Just be prepared for many potential employers to essentially see you as almost a fresh graduate again (due to the break + relatively short initial stint before the break), and depending on how hard you're finding it to get work again, don't be too picky for getting an initial re-entry gig.
After that first job back though, it might very well be seen as a positive by most interviewers. Doing something productive-but-different like this makes you look like a more rounded person, in the long term. It stands out on your job history in a good way, not as a useless break that just took time out of your main career without giving anything back.
TL;DR version: It won't hurt your career in the long term, just be prepared for the idea that your next programming gig after you get back might be slightly more "junior level" than someone who just worked those last 2-3 years straight. And after that, in the long term, it's likely to be seen as a positive.