As a developer, I sometimes feel bored when I have to do the same task again and again in my day job, so I have to do something other than the normal coding which helps me to overcome the boredom.
First and foremost reason of getting bored is that you are not liking what you are doing. That's true when we have to do the same task again and again, it feels boring. But being in a day job you do not have any other option but have to do the task, so how you will overcome that boredom.
The reason is simple, try different things. I usually work on ASP.NET and I love it but I always have to manage the legacy code and I could not learn any new technologies coming in my way. So what I have done I started my mini project (though not getting enough time now to work on that) which is on the newer technologies which have its own set of issues and excitement. Thus I can somehow reduce the boredom because now I can spend some hours on the exciting things.
Similarly, you should also start with some hobby along with Software Development, like playing guitar, traveling or even photography. I too whenever possible try to travel as well as clicking pictures which reduces my boredom quite a lot.