Elegance in programming is oft misunderstood. I have seen many beginning programmers balk at the idea. "Why do I care what it looks like as long as it works?" This is a very dangerous notion that will cause problems down the road. Better to start off with the idea of incorporating elegance in your programming.
Elegant code is not only more efficient (usually) but easier to maintain. Maintenance is a large portion of any programmers job, and it isn't always your own code that you will be maintaining. You shouldn't necessarily confuse elegance for intelligence. To me elegance is more about discipline that outright smarts. Make sure you are always disciplined in your coding technique; from the way you capitalize your methods and parameters, to the plurality (is it a single widget or multiple widgets) of the items in question. Many languages have made for allowances in style by being very lax when it comes to spacing, you should not be. Be consistent about how you write your code, make sure that every thing you write looks uniform. Utilize tabs and spaces to help define your structure. Make sure you are properly utilizing functions, do not copy/paste the same logic in multiple places. If the same logic is required in more than one place, centralize it!
One of the most important things I have learned in over 20 years of programming is there is way more that I don't know, than what I do know. I am lucky enough to have a good friend that is also a programmer. We basically started at the same time (he had a couple of years on me). Every time I look at his code I find a new reason to be impressed (sometimes ashamed). Try
to never be ashamed of what you code. If you find code that impresses you, emulate it. Re-write and optimize your own code. I dare anyone to have a complex program and think it is completely optimized and couldn't be any better. There is almost always room for improvement.
Find user groups in your area, I promise they are there and usually free to attend. You will probably get to see some new technology at these types of meetings. It is not always easy to work as a programmer and keep learning. User groups are also a great way to be introduced to like-minded folks in your area. You want to be impressed by a coder; I got to chat with Charles Petzold at a user group meeting. I digress...
Kudos to the OP for bringing up the topic; I think it is an important issue. Coding is an art form- if you don't believe that you need to look harder. It isn't easy either. Programming takes an infinite amount of time to master. I did choose those words carefully and am fully aware of what I said. It is better to be aware of that fact early on. There will always be more to learn and always someone else that is don't it better. Try to never be frustrated by the examples of others, just use them and make your own work better. I have never met a real programmer that didn't want to help another out.
Enough jabber from me, I have to get back to work. Trying to figure out why a piece of code doesn't work in this one location where it does in every other install we have