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

If effectivity is measured as improvement/time, then I'd say I learned the most from:

looking at a multitude of other languages (sometimes only reading a book and introductions about them)

looking at a multitude of frameworks (sometimes only reading the introduction and crawling through the reference)

I've learned a lot of idioms, patterns and approaches from this, as well as quite a lot of common mistakes not to make.
And also I learned a lot from trying to understand, why certain things are done the way they are and whether or how they could be improved.

The best thing I did to become better was finding a mentor. Having a mentor made me strive to become the best at what I do. This inspired me to read more, learn more, and yearn to become a mentor one day myself. I was stagnant before and finding someone like that to look up to was the best thing that ever happened to my career.

Share your code and collaborate openly with other programmers (if they can be great programmers, that's the best)

It's not only working with other people, but to review code, discuss different ways of doing things and learn for each other (even some peer programming). I've been in works when you worked with people, but each one takes care of their own code, since the design to the tests, and, well, you're on your own...

But when you can discuss freely what it's the better way of doing something and you make code together that's something that teach you a lot...

Debugging other people's programs.
Teaching / tutoring.
Playing with a lot of different languages.
Reading books and tutorials and browsing the net.
The greatest shortcoming of my professional development as a programmer was working in isolation. I could be wrong, but I think one of the best things you can do is find better programmers (individuals and teams) to work with and learn from.

Learning symbolic logic, particularly predicate and deductive logic. While studying philosophy I was able to immerse myself in this area of study and it actually pointed me to studying mathematics and learning to program.

This helped me learn programming since I almost saw it as a real world application of this logic. Specifically deductive/truth-functional logic helped me easily grasp boolean values, binary/ternary operations, and conditional statements, among other things. Studying predicate logic has helped me understand areas concerned with scope, object-relational mapping, and program flow.

This study of logic also pushed me into mathematics which also helped in a plethora of ways.

I wrote some coding standards documents for our company, presented them in a course and then set about reviewing code against them.

This involved time spent researching and investigating and documenting. It then involved time spent trying to format it into a manner than could be communicated and presented clearly. Finally, it involved reading other people's code, and learning to separate the good bits from the bad bits.

Writing your "programs" on sheets of papers b/c the access of a computer was the heaven's bliss and actually almost that rare... or storing the program on a cassette tape since the computer didn't have a floppy disk, or writing plain hex since there was not even a normal assembler.
That's what makes you realize you do love programming and you are born with enough passion to do it.

But most of all reading books and later reading (others') source code, just try and play it in your head. Unfortunately, lots of nowadays open source code has quite appalling quality, however understand why (or if) it's appalling make a good starting point.

I think one of the things that made a big difference to me was writing a long tutorial on something I had been working on as a hobby for a while. It really helped me organise my thoughts and tidy up the tutorial code as I knew other programmers would be looking at it and either learning from it or pointing out to me that I'm an idiot through it. I think doing it as a single chunk was really helpful too as it gave me a much deeper understanding of the field I was working in.

Also when I went freelance and was working for myself, that forced me to up my game. I didn't enjoy it that much and I went back to working full time after only a year or so, but it was still a very educational time.

Work for a small company - lesser layers of management and others bossing around - more responsibilities, more learning! This way, one can learn more in less time cos' small companies generally have a lot of work to be done in the least amount of time possible. No matter how you chose to implement the solution - that is where the 'learning' part comes in. Ask the great folk here at SO to verify your solutions and I always had people suggest most elegant solutions here.

I am with a small company, pay is crap but I have no boss. I am given requirements and I go about achieving those goals in the most elegant/efficient manner.

This isn't really specific to programming, but I like to hang out with people who are smarter than me and are willing to help. Whenever I come to them with a problem and ask them how they would solve it, their logic is what improves me. Learning to think in different ways, finding shortcuts (while still understanding why they work), and just improving yourself by watching others is the best way to get better at almost any skill.

Reinventing the wheel many times, in the form of implementing all the kind of algorithms and programs I could find interesting, was very useful for me. Chess programs, device drivers, data structures, network servers, and so forth. About design skills, I think reading many RFCs is a great help.

Code guidelines - formerly I named my vars like a = b * c, instead of more readable employeeSalary = avgSalary * fte, reused a code by copy-paste and did many other bad things in the code. My code was like a mess of unreadable routine. Learning of writing a beautiful code was not easy to me, but as soon as my code was more readable by me and in a team, I understand that I did less bugs. Now I write a beautiful code (thanks to Resharper) easy as one-two-three.

Usability and design - usually developers forget about this important thing. But knowledge about it may help to improve programming skills. How? This is fully connected to 'code guidelines' described above. A beauty not only in the code, but in user interface that you develop, has a good influence on developer's happiness, which in turn affects the quality of the code.

Reading "Clean Code — A Handbook of Agile Software Craftmanship" by Robert C. Martin. It made me aware of lots of characteristics of good and clean code that I din't even think of before. Absolute must-read!

To me, the inflection point was that I started reading code from great open-source projects. I saw different styles, new techniques and it opened my mind so much that it was a sensation similar to traveling and living in other countries.

Get your feet wet doing some basic "hello world" programs. Read programming books, read blogs, get to an intermediate level and do a lot of programming in different things, keep yourself challenged, pair program as often as possible, contribute to an open source project. Next, read "code-complete" Write more code, start to write good code.

Find something outside of work that you can develop. I'm just starting to jquery and there are heaps of JavaScripts people have written that simplify tasks. I've been looking at these javascript files and learning how they work. I broad answer I was trying to get at was to use other people's work and incorporate it into your own (following copyright laws) Then understand how they they do. Good hunting.

I found reading Code Complete 2 by Steve McConnell from cover to cover (and actually trying to follow most of his advice) has drastically improved my programming skills, especially since I don't get the benefit of working with other programmers in a large corporate environment.

Also, practicing good design (explained in the book) and analyzing other people's design is important to moving in the right direction, skills-wise.