What are some common mistakes made by beginner programmers?
Good question. Some thoughts:
Contrary to what some people try to tell you, programming is not for everyone. If you're first trying it out and you're not having any fun or feeling very motivated after a while, that's okay. It doesn't mean you're stupid. Not everyone can be a programmer just like not everyone can be a car mechanic or novelist. I had a buddy who went to college for an IT degree but gave up after one semester because he hated programming. He now owns a chain of retail stores in the southwest and is probably a millionaire. He failed becoming a programmer but failed at becoming a failure. (Pretty much the opposite of me.)
Learn version control early and use it often. It will be a pain in your ass to learn, but your ass is also what it can save.
Beware the Dunning-Kruger effect. (Perhaps, specific to programming, we should call it the Yanderedev effect.) After programming for a while and being able to get the computer to more or less do what you want for a while and maybe even getting someone to pay you for it, it's easy to start thinking like you're hot shit. But there are always going to be people who have been doing this for far longer than you have and have much more experience. Stay humble and don't get stuck in your ways - always be willing to learn new ways of doing things and accepting that the ways you've learned to do things might not be the best, even if you've been doing it that way for years. Related to that, don't be afraid to ask questions on places like Stack Overflow or IRC channels. Even if you just lurk at these places, it can help to expose you to libraries and such that you didn't know existed. Always be learning. Related to this, beware the XY problem; if you're asking about how to do Y to do X, don't be upset if people challenge you about doing X. I often see conversations like this in IRC channels:
Noob: I'm emailing users their passwords in plain-text emails, but the emails sometimes take half an hour to send. Does anyone know how to make sure they get sent immediately?
Neckbeard: Uh, why are you sending users their passwords in plain text? You shouldn't be doing that; it's a major security vulnerability.
Noob: LOOK JUST TELL ME HOW TO SEND EMAILS IMMEDIATELY OKAY I KNOW WHAT I'M DOING GOD YOU PEOPLE ARE USELESS
Don't be that guy. If someone with more experience challenges some aspect of your code, there's likely a very good reason for it. Programmers generally do not knowingly give each other bad advice.
Don't reimplement wheels. Before writing code to do something, check to see if there's an existing library out there you can leverage which does what you need. Odds are that library was written by someone smarter than you and has been subject to scrutiny by other developers, so it is probably faster, more secure, and less buggy than what you would write by yourself, and of course you'll save a lot of time while you're at it.
There is no magic involved in the function of a computer. If something doesn't work as expected, it's effectively impossible that that was just a weird one-time bug that will go away on its own. If there's a bug, it's almost certainly in your code and not in the frameworks or libraries or OS or hardware that you're using. Okay, yes, it's theoretically possible that the bug is in someone else's code, or was caused by an errant magnetic wave flipping a bit in RAM, but very unlikely. 99.5% of the time, the bug is in your code. Look there first.
Value your time and your work. You have a valuable skill. Unless you're volunteering for a charity or working on an OSS project or something, don't work for free or for stock options or for exposure. If you're freelancing, have a clause in your contract which ensures you have the copyright to any code written that a client hasn't paid for, and if they don't pay you, cut them off from the code until they do. Always try to get $5 or $10 more per hour on your next contract compared to your previous one. If you're salaried, always be open to offers from other companies in your area, especially if your current company is screwing around with you and making you crunch. Don't think you have to be loyal to a company because they have a kegerator and a Ping-Pong table in the break room but gee, do you think you could come in on the weekend so we can get this sent to the client by Monday, I'll get some pizzas delivered to the office, it'll be fun. You don't have to put up with that kind of manipulation.