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

To dive into problems other people are facing and where you could give advice based on your available knowlegde but most of the times the questions push you to take it one or two steps further.

And off course also:

Reading good books, make the examples, discuss them with colleagues, and go on...

Make a proof of concept about a certain goal you want to reach, not doing it in production code but just a kindergarten project where you try all sorts of different scenarios

Scraping the internet for good examples, clarifications, good blogs

Clearly define with the (inhouse) customer what they really need, we all know this fabulous picture, it makes so much difference to communicate the desired functionality, get the details clear, discuss business rules, use-cases and their deviations.

And last but not least:

Don't let your (proud) ego stand in the way of learning from your own mistakes and from others

After doing lots of the things mentioned here: get a good programmers editor (editplus for me), learn several programming languages (C++ and Lisp cover a whole spectrum of techniques), learn regexps (actually pretty simple, compared with other stuff, but amazingly powerful), learn about top-down parsers (that way you forget the idea that regexps can solve everything), I found the biggest help from an unexpected place:

Learn Mathematics.

Really.

This is not about learning calculus formulas or other stuff that is taught to engineers. That's not the mathematician mindset. This is about being able to think and write a correct proof for some theorem, sometimes grabbing ideas from the most unexpected places, or doing stuff that looks like a crazy workaround to the untrained mind. And advanced linear algebra course can be a great Mathematics intro.

After this, your programming mind literally grows bigger, by a huge amount. You can hold bigger and more complex pieces of code in your head, and it actually looks very simple. After some really hard Mathematics proofs, some complex algorithms look trivial to you in comparison.

However, there is a caveat: most Mathematics teachers will want you to be both the programmer, and the computer. You write the proof by hand, and perform all calculations of any application by hand, otherwise it has no merit. Most of them still don't understand the power of computers. In the same way, most programmers will disregard Mathematics as 'that bunch of calculus formulas with no direct relation to programming'. If you get the good bits from both worlds, you will be a better programmer than 99.99% of them all.

I answer this question like teachers from language classes. If you want to speak Russian, you must speak Russian. If you want to read Russian, you must read Russian books. If you want to write Russian, you must write Russian!

So if you want to write high quality programs, you must code. But writing high-quality code isn't the only measure of a good programmer. You must do a lot of other things, but I think you get the idea of the things you must do to become a pro.

Finally starting to work again in the field after excruciating years at college, at the Swiss Federal Institute of Technology in Zurich (ETHZ). I had worked as a web developer / graphic designer for a large company during the dot com boom after high school, prior to college and the mandatory army service here, and missed these days while my brain was being hammered with endless lessons on Eiffel, Prolog, compiler design, algebraic set theory etc...

I believe that reading and experience are the most important in improving.

When I first start a language, I like to read a couple quick start tutorials, then I work with it a bit. After I have a better feel for the language, I read a more complete book cover to cover. In order to use whatever language you choose to it's full potential, you need to know everything about the language, including it's strengths and weaknesses.

Reading books about general programming has helped me out as well. A lot of the most important concepts of programming are not language specific. A book about a single language doesn't cover the same areas since learning a language and learning to program are different things.

Seriously though, I often find myself repeatedly implementing the same sort of functionality in new ways. Each is an adventure that always raises new questions. Answering those questions allows my skills to grow.

Learn another programming language, possibly one that has a fundamentally different approach. Scheme, D, Scala, JavaScript. It will open up your mind at what can be done with each of them, even if you do not get to any level of procifiency.

I switched to an editor with syntax highlighting, contextual autocomplete ("intellisense", etc), and automatic indentation. This has had a greater positive effect on the efficiency of my code production and the readability and maintainability of my code than any other single thing that I have done or learned.

To learn how to ride a bike you have to ride the bike. To learn how to program you have to program. The more you program the better you become IF... if you always try to improve yourself and you always strive to create good code. And this brings us to what good code is and what good programmers are. There are so many answers to this. But some basic guidelines are: clarity, simplicity, generalization.
The reality is practice alone doesn't make perfect. Perfect practice makes perfect. You need to code and also have your code reviewed by some other eyes. You need to read code written by others - good code and bad code. You need to understand how code rots and good code yesterdays becomes mushy bad smelling code tomorrow when the conditions, requirements, constraints change.
It seems I can go on and on forever... Okay the gist is code a lot in various areas with various languages and think critically about it while exposing your code to others' opinions.

Being open to languages or approaches that were outside my comfort zone. I would say another major player was sharing what I learned with others. When you have to explain why, it pushes you to be certain you know it.

lol. typing in code from magazine articles (yup, back in the day we used to do that for full-page Amstrad and Atom code listings). It may be like rote learning, but it got me from nothing to something, everything I've done since is incremental to that initial bump.

Learning different coding paradigms can really open your mind up to a higher level of thought. Looking at your standard diagramming vs the COBOL VTOC for example. Reading the Extreme Programming tenants. Actually trying to do a program with a top down programming method, then a bottoms up method.

I used to think, before I learned so many languages, that if I only learned enough languages that would make me a great programmer, because every language has something special - Pascal has set notation, COBOL has extrodinarily efficient memory allocation for multidimensional arrays, BASIC is... basic. But chances are that simply learning a small set of languages that are radically different, like (COBOL, C++, and LISP) will be an improvement. I cannot verify that though.

Knowing that every language is just syntax - especially if your not going to take the time to learn what a language is really good at.

There is nothing that will do more for coding skill than writing code. I would go so far as to say there is limited utility to be gained from anything that does not directly involve crafting code. If you are fortunate enough to work in a job where you are not constantly hammered by deadlines, stepping back and working through your section of the project with another programmer then doing the same with their section of code will do more for your programming skill and understanding of how to make engineering decisions than ten books [unless those books have Stroustrup, McConnell, or the likes on their spines].

.. the same could easily be said for software engineering students. Be brave, let others read your code and read theirs. Constantly be working. You will be much better for it.

Taking part in code reviews. This really combines the idea of reading other people's code with having to think about presenting your own. Seeing other people's mistakes is just as valuable as seeing their whizzy clever stuff, and the pressure of having other people see your code really concentrates your mind on making your code as comprehensible as possible.

I now think about the ease of maintenance of code as being WAAAY more important than its efficiency, and I choose an easily comprehensible design over a super-efficient but incomprehensible one every single time. Of course it helps that the poor maintenance programmer figuring it out may well turn out to be me :-)

I found that when in the initial phases of my career, moving around often helped tremendously. This forces you to expose yourself to different ways of doings things. I've interviewed people twice the seniority of myself that have spent the last 10 years at the same company and was surprised by how little they've evolved since college with respect to their programming abilities. You can easily surprise yourself at how differently people do things when you move to a different company and how much better (or worse) their approaches are. Point being, you want to expose yourself to as many different ways of doing things as possible, especially while you have the luxury and the opportunity to move around often.