Overview
If you ask most programmers how to become great at programming, you'll usually get the same response, "Program." While experience in writing code is extremely important in learning how to be a great programmer it doesn't quite capture the full picture of how to learn programming effectively.
First Things First: Please Take All This Advice With A Grain of Salt
I've found the worst thing you can do is nothing at all. Do whatever you enjoy doing to learn. If you are doing nothing because you want to do something "right," then that will just hinder you and your talent. So whatever advice you don't like here, just ignore.
The best way to learn anything is to start a passion/obsession for it. Just do whatever you need to do to love coding. If you become proficient, you start applying some of these techniques.
Taking the Athlete Approach
Becoming the top in your field is very similar no matter what you're doing. Because athletics has refined their training strategy over many years, I like to take that as an example.
Practicing
If you look at College Athletes, they typically train for around 4-5 hours (or longer) every weekday (I used to be one of them), taking a couple days off to rest. During these practices they typically run drills, learn how to refine their skills, learn new skills, watch film of themselves and others, and scrimmage/play the game.
Practicing Learned Skillz
If you're like me, you don't like doing repetitive stuff. If you do it once, then you want to say it's done and you'll never have to do it ever again. However, this is not great learning-wise. Athletes will do the same stuff over and over again because that's what allows them to get faster and/or stronger at that activity, as well as commit it to memory. If you want to get better at programming, you'll have to practice doing things over and over again. If you do this, you won't forget if you run into the issue ever again (which is extremely likely), you'll be able to use that knowledge on other issues, and you'll be a lot faster at writing code like that.
Practicing for Speed
The faster you are at performing certain tasks like debugging, writing code or finding the correct files to edit, the more time you will have to be a better programmer. Doing speed excercises, like writing a certain python program over and over quickly, or getting to different folders/files in unix as fast as you can, or debugging a bug faster and faster, will allow you to be a faster programmer and be able to retain information in your brain for fast retrieval.
Learning from Mistakes
Most athletes don't have train alone: They have coaches to help them get better and teach them how to get over personal hurdles. Programming has something actually better: A community of coaches/teachers.
I'm pretty sure most programmers know this one, but I'll repeat it here: You can Google Anything! Google is a fantastic resource for debugging errors in your code. The programmer community is one of the largest communities on the internet. Older programmers know how tough learning how to program can be, and it seems almost all want to give back to the younger generation. Because of this generosity, we have communities like Stack Overflow to help you learn how to fix bugs you've encountered. All you need to do is type in your error in Google and you should get at least a couple results. If you can't find anything from Google, goto Stack Overflow yourself and ask the question!
Learning new information
Athletes like to look up information to see how they could improve their techniques or how to train better. Programmers need to learn more information about specific technologies, or research to see if there are any new programs or technologies. Again, we have Google to the rescue. Google anything, find something you want to learn about, and take notes! Study it like something you'd study in school (Unless you don't want to).
Taking and Reviewing Notes
You need a way of remembering things you've done. If you don't remember, then you'll be bound to repeat looking up stuff on Google, which is inefficient as well as annoying to do. By taking notes, you'll be able to easily review important details and commands you've learned.
Along with taking notes on things you've done, you should also write comments in your code! If you ever go back to the code you've written, you want to be able to easily find out what you were thinking. Also, you want others to be able to read your code and find out what the heck you were thinking.
Taking notes is hitting a save button in a video game. If you were fixing a bug and you need to go back to it another day, then sometimes you'll have to go all the way back to the beginning, retrying things you've already done to try to fix it. If you write notes, you can be caught up to speed extremely quickly and won't have to redo things you've already done.
Reviewing Video
I don't think a lot of people will take this one seriously, but reviewing video of yourself programming/learning can significantly help you become a better programmer. It allows you to examine your actions, allowing you to take note and fix things later. It allows you to take notes on things like code and commands later so you don't have to bother yourself while you're in the zone. It allows you to review things at a later date and share with others so that they may learn how to do things they didn't know how to do before.
If you want help setting up your environment to be able to automagically take video from the terminal, and reduce the size of the file, please comment/message me and I will show you how. It's a bit too complicated to explain here, but it's really cool once you've gotten it going.
How to Apply This Strategy of Learning
Here's a decent way of applying these learning techniques
*This should be done at least once a day for about 30 minutes*
Take Film
- Look over yesterdays stuff
- quickly go over commands in the terminal
- Try to write any programs and code learned yesterday again quickly
- Repeat until feel comfortable
Stop Film
Review Film at 8 times speed & Write Down notes you feel would help
*This should be done for every new thing you do, trying to limit yourself to programming thing per hour*
Take Film
- Review What have learned previously
- Run the new commands/code you've learned
- Write Code
- Write Comments as you go
- Keep text file of what you've done
- If you don't know something:
- Look it up
- Write down the thing w/ comments & fix code
Stop Film
Review Film at 8 times speed (or faster) & Write Down notes you feel would help
Conclusion
If you are just getting started learning how to program, please don't pay too much attention to this post. The most important thing you can do is develop a passion for programming and to start writing programs or, if you are more of a beginner, taking classes at sites like Code Academy or TeamTreehouse. However, if you're an intermediate programmer trying to become a great programmer, maybe try some of these techniques if you feel like it.
NOTE: Please note that I am not an expert at this topic and this info can certainly be improved. If you have questions, comments or suggestions for this blog post, please comment! Also, this guide is currently in rough draft form. If you would like it to be more in depth, I will be extremely happy to improve on this, all you need to do is ask in the comments and I will do it asap (I just don't want to spend forever on something no one reads and/or cares about).
No comments :
Post a Comment