Looking back at my career and life as a programmer, there were plenty of different ways I improved my programming skills - reading code, writing code, reading books, listening to podcasts, watching screencasts and more.

My question is: What is the most effective thing you have done that improved your programming skills? What would you recommend to others that want to improve?

I do expect varied answers here and no single "one size fits all" answer - I would like to know what worked for different people.

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

18

Practice, practice, practice. And never be satisfied with the first thing that comes to mind.
–
Mark RansomSep 3 '10 at 5:28

2

+1 for Mark Ransom...The difficulty comes when you're still not satisfied with the 100th thing that came to mind!
–
Stimul8dOct 21 '10 at 8:11

360 Answers
360

Many great answers here. However, one of the most effective things for me personally was to join Stack Overflow. There are many people here that are smarter then me, and I learn a lot from their very thorough questions and answers

Do you mean this as "lean regexes so you learn more about string manipulation", in the same spirit as "learn assembly so as to learn more about your processor", or "learn regex and solve all string-related problems with regular expressions"?
–
RobJun 15 '10 at 14:05

In my own experience it has been the code that I didn't know how to write that taught me the most.

If you seek out hard problems you will learn to learn to work hard; learn to do your own research; learn the best language for the job; learn to use development tools (IDE/debugger, source control); meet people who are like minded, and above all else become inspired.

Write code-generation software. Create a simple database with a few related tables. Then write a web interface to interact with it using whatever tools you can find. Then, using the same language, write software that will write what you have just written.

You'll see that a well designed relational database, with well thought out field definitions (type, length, nullable, default, etc), contains all the information your code generation software will need. Write a code generator to generate your data abstraction layer. Then write one to create a web interface (list view, add form, edit form, etc).

The more you write, the further you realize you can go. It gets addictive and you get better...

I asked really smart colleagues "stupid" questions I was embarrassed to ask. As Einstein said, "If you can't explain it simply, you don't know it well enough."
I have also investigated the codebase at work on my own time. You have centuries of programming experience at your fingertips if you work for a decent sized programming outfit.

Appreciate that there is no magic. There's a tendency to shy away from reading or understanding a piece of very complicated and magical looking code, with the feeling that it should be left to the masters and gurus. Any code written by a human can be parsed and understood with enough time and patience.

Documenting my code. At first I didn't bother because it was for school projects that no one would ever need to look at again. Then I realized that even if other people didn't need to read it, I would need to years down the line, long after I had forgotten why I had made the choices I did.

Working through the same hard problem twice is a pretty good motivator to document future work completely.

I enjoy picking up any language that I can get my hands on. Then I can decide what the language would best be applied to and throw it in my "toolbox". I really like being able to pick the right tool for the job.

Ensured that no matter what role I was in (e.g., currently software architect of a large project), I would be writing code. I've seen too many former developers stop coding entirely and they went up the technical or management hierarchy, and gradually lose touch with the reality of building software. The only solution to that is to keep writing code.

Learning new languages, writing in different environments, doing different kinds of applications... as much diversity as possible helps to round out your programming skills.

But the bottom line is that the only way to get better at something is practise, and to continually challenge yourself with projects of ever-increasing difficulty.

Getting involved in an open source project with a lot of developers that are smarter than me. For me, it was getting involved in the Asterisk project (www.asterisk.org). However, the key thing is finding a project that you can be passionate about.

1) Be curious. Learn from the smartest people around. Read books, articles and code on how things have been done or may be done
2) Think. Play around and try out your own ideas
3) Fail. You only know what is good when you now what doesn't work