Today’s guest post is by Jeremy Keeshin. Jeremy is the co-founder of CodeHS, a site to teach computer science to beginners. He recently graduated from Stanford University studying computer science, where he helped teach beginners there for three years. He also founded Stanford’s satirical newspaper called The Stanford Flipside, which is now one of the most widely read publications at the school, and the Flipside is now in several colleges and high schools. Today he’s sharing best practices when learning to code .
Many people want to learn to code these days. It is a mad rush to “create your first website” or “make an app.” However, I’d like to offer a short list of best practices when learning to code. We’ve helped to teach thousands of students to program while we were students at Stanford, and are now teaching high schoolers and students of all ages at CodeHS.
1. Keep an open mind.
When you learn to program, and you haven’t programmed before, there will be a lot of new ideas. Be willing to go with the flow.
2. Be willing to play around
One of the best ways to reinforce a programming concept when you are learning is just to play around with it. Maybe you learn a new command, a new function, a new concept… try to do the given example, but try to modify it a little—just to see what happens.
3. Style counts
When we teach programming and computer science at CodeHS, we focus on getting the program to work, but also on writing a program that has good “style.” What I mean by style is that the program is broken down in a reasonable way, and that an effort is made to make it understandable for another person who may come along and read the program.
4. Ask questions
Everyone gets stuck when learning to program—I promise. However, a big part of how well you learn is how you respond when you get stuck. Try to ask good questions—often the promise of formulating and asking the question actually helps clarify the problem you are having.
5. Focus on fun
Learning a new skill is about a million times more interesting when it feels fun. This means find a way to work on it that fits in your schedule, but one that is reasonable and maintainable.
Those are just a few tips, but the best way to learn is to just to get started! With CodeHS you start writing your
first program in just two minutes.