This is my first ever programming related job. [...] As far as I know, contracting apparently doesn't look as good on the CV.
I wouldn't necessarily see it that way. A recruiter may see a contract position as a project with a well-defined beginning, execution time and end.
Imagine the following exchange:
-So, NegativeBreakfast, I see that you worked for Company X for 4 months as a contractor. How did that went?
-Oh, it was a very nice experience. They needed a developer to finish some new requirements, and hired me to help with that. We managed to deliver it within the specified period, and my contribution is now live. And while the project is a wrap and they do not need my services for now, the client seemed to be very happy with my work.
This would be a very nice thing to hear as a recruiter: the client needed help, you provided and left in very nice terms, demonstrating professionalism. (You may back it up with a recommendation letter.)
And, in any case, showing that you have some professional experience is much better than nothing at all.