Over the past 6 months, I’ve had the unique opportunity to observe a wide range of programmers – students, teachers, and world-class experts.

I was curious if there were any patterns and characteristics that made for successful programming teachers and students. My goal was simple: to make myself a better teacher and a better student, so I could help others too.

Here’s what I’ve found so far.

Great programming teachers…

…point students in the right direction, but don’t give out all the answers.

They coach students to be curious and independent – to search for their own answers. They let students stumble and rewrite code a few times. They let students discover valuable patterns, problem solving techniques, and the sheer joy of shipping something that works.

…are encouraging, but never critical.

They give praise when students write great code, and offer suggestions for refactoring clunky code. They give pointers and offer direction, but never criticize a line of thinking.

…promote writing as little code as possible.

They will direct students away from complexities and toward simple, elegant solutions. The fewer lines of code, the better.

…are patient and remember what it’s like to be a beginner.

They remember that everyone was a really bad programmer at some point and needed help (including themselves).

Great programming students…

…learn how to learn.

They don’t just look for answers, but look for patterns and techniques. They search for root causes by breaking down problems. They use Google and Stack Overflow constantly.

…talk less, listen more, and observe.

They realize they can learn a ton by just watching how their teacher solves problems, communicates, and teaches others. They literally watch and learn.

…tend to move more slowly, and are thoughtful in their analysis.

They take the time to think about a problem, craft smart questions and succinctly explain the issues they’re running into. They get better and better at embracing slow time.

…keep their code tidy.

Messy code is often the result of messy thinking. Having neat code makes it easier for others to help them, and as a result, they learn faster and understand more deeply.

…are persistent.

They are absolutely relentless in the belief that they can solve any problem (and usually do). Hours or days can go by with little or no progress, so it’s crucial to have this mindset.

…have a “ship it” attitude.

They set reasonable goals against relatively short time frames. They recognize that momentum is critically important because it provides the feeling of accomplishment and energy to keep pushing forward.

…start coding when all else fails.

There are so many places to get stuck – syntax, concepts, gems, libraries, tools, books, tutorials – the list is endless. They realize the sooner there’s real code, the sooner they’ll have something to react to, adjust, and make better.

And great programmers…

…never stop learning or teaching.