The 6 Keys to be Better Programmer

I’ve been studying how to become better programmer. During this process I found out five rules/keys/tips for me. All the problems that I run up against were solved by these keys. If I were to give six of them on programming, it would be the following:

Learn the basics - Data types, structures, keywords, language syntax, algorithms, best practices. I'd like to warn you: "be prepared for programming to be boring and annoying sometimes." The truth is, learning the fundamentals of algorithms and design patterns is supposed to be tedious sometimes. Some may feel shocked just by hearing the word "learn" and yes, it can be utterly tedious, but trust me, it's worth it. You won't enjoy every single moment, but the bitter work will be worth it if you see it through. Think of it as eating your vegetables. Your programming vegetables which will let you grow as a good programmer.
Sit down and study the fundamentals, use references and be open for new ways - all these are something that many younger programmers don't do, my younger self included. Using templates and references to guide you through the developing process is not cheating or copying. No one can program, develop or manage everything that exists right out of their head without any flaws.

Use Lab Diary - record every single line of information, code or notes that you may need in future. Don't lose your solution and do not spend time solving problems twice. Once solved a problem - analyze it, categorize it and write it down. Next time just apply the known steps for solving it. If any changes need to be done - add them to your Lab Diary. This will save your time and give you freedom to focus on new problems.
Second benefit of this point is a map of your knowledge - this is priceless - some say that writing change the world and I can't agree more with this. We are humans and our memory can fail (which is not always bad) but your writings will stand unchanged. A captain without a map is like a fish without a water. Don't let yourself in this trap. Good programmers are good not because they know everything but because they know where and/or how to find the solution!

Never give up. This phrase may be banal or old-fashioned, but patience is pretty much the most important thing for improvements in every aspect in life. In programming is with essential power. I had times when I wanted to give up and start doing something else. My solution for these situation is time. Spend a week to recharge far away from programming and/or search for new way of solving old problems. For me give up is just a decision by a human. In short term give up is the easy way, in contrast in long term not giving up will paid off with experience and confidence.
Know also when or how you should give up. Working a week or two on a problem that is already solved and you can find the answer on the web is not always good option. Remember that great scientist also had mentors and teachers :)

Enter communities - Try to join several depending on your interest and get as much feedback as you possibly can. A great places to start are StackOverFlow, Quora, Stack Exchange, TutorialsPoint or specialized forum for your knowledge expertise. Ask for reviews, ideas, critiques, join various facebook groups of interest that help you, and after that, try to apply the knowledge you've gotten.

Play with your code! - Experiment as much as you can! Look into different algorithms, languages, tools, IDEs or even things that aren’t directly related to programming. You’d be surprised how much benefit your programming gets from doing something different!Don't be afraid to fail. Fails can be extremely beneficial and to teach you what should not be done. Of course fails is better to be during development and test phases and not in production. The more you fail the more you will know.

Have fun while programming. Another fancy phrase. Don't program something to appeal others unless it's commercial work, and even then, avoid being a sellout. Your personal work should reflect your interests, your knowledge, and your experience!". Changing style is not an easy task and not always worth in long term. Trends come and go, quality and style are forever.
Try to find best environment for you like: office(light, noise, music), hardware(keyboard, mouse, monitor), use best tools(IDE-s, language etc).
Programming can be fun - when money and deadlines are not constraints. It also means to know when to stop and when do you need a break. And one favorite sentence from a movie:
“Did Bernoulli sleep before he found the curves of quickest descent?”