Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share

migrated from stackoverflow.com Feb 6 '11 at 3:55

This question came from our site for professional and enthusiast programmers.

locked by Yannis Rizos Mar 13 '12 at 20:38

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 Ransom Sep 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! –  Stimul8d Oct 21 '10 at 8:11
5  
Not wasting any of my time on Programmers Stack Exchange site helped me improve my coding skills immensely. –  Job Feb 2 '11 at 17:53
3  
@Mark Trapp how is this not constructive? –  rightfold Jan 22 '12 at 23:14
1  
@WTP - Read the description. "This question is not a good fit to our Q&A format." - as someone who asked this question, I agree. It was asked in more relaxed times. –  Oded Jan 23 '12 at 16:52
show 2 more comments

360 Answers 360

Writing code and lots of it.

share
3  
Reading and writing lots of code... Open source is such a boon to us ;) –  Oded Jan 11 '09 at 17:13
show 2 more comments

Programming. Working on interesting projects. There is NOTHING like getting in and working on stuff. Especially under pressure. I always tell anyone who asks me how to program - just find a cool project (even if you have to make it up) and work on it.

share
4  
I agree. Getting my hands dirty in a project has been probably the biggest contributor to my improvement. ; ) –  Mike Grace Jul 18 '09 at 23:14
1  
Exactly. The single best way to become a better coder is to code. You can learn all you want from books, podcasts and co-workers, but you have to apply it before you really understand it. Code more, and code more different stuff. Because you don't learn much from repeating the same old trick. –  mcv Jan 12 '10 at 16:30
show 1 more comment

Pair-programmed with very diverse and opinionated people

share
show 1 more comment

Looking back at old things I wrote and realizing just how bad they were.

share
28  
When I go over old stuff of mine I get nearly-irresistible urges to delete the whole file. Sometimes the whole directory. –  Christopher Mahan Sep 16 '08 at 21:03
3  
@Christopher Mahan: And on really bad occasions, the entire volume. –  Thanatos Sep 3 '10 at 5:35
show 5 more comments

Subscribing to Coding Horror lol. Actually I found that getting a new job on a project that interested me helped the most. Mind numbing web programming for the great state of NY was kinda depressing and was holding back my coding potential.

share
add comment

Writing code, I tend to read too many books,it's good to know the theory but the practice is really where you can become a master.

share
add comment

Many people have suggested writing code. I'd have to say that reading other people's code is much more beneficial.

share
11  
a mix of the two is actually what works best for me; reading other people's code and refactoring it to make it more readable is a great exercise –  Manrico Corazzi Sep 17 '08 at 7:23
4  
Reading code is interessting, but it doesn't really get under your skin until you actually do it. –  tovare Sep 17 '08 at 19:38
show 2 more comments

Go all out: create your own project, your milestones, your resources, dependencies, requirements, and test plan. It will force you not only to improve your programming skills to operate within specific parameters, but will also serve to highlight exactly where you most need to improve. Make regular updates about your progress, whether through a blog or more formal project updates, so that you can see exactly where you've been and where you hope to go.

share
add comment

Competing in TopCoder Algorithm contests.

share
14  
I find TopCoder a little problematic. OK, it makes you better at thinking about algorithms, but you are forced to work with bad style (all code in one class) and under time pressure, so you probably won't comment and test. Perhaps Project Euler is the better choice. –  hstoerr Dec 10 '08 at 16:12
3  
You're not forced to work with bad style; you can have as many classes as you like. Also, you had better test if you want to pass consistently, since a solution that fails a single edge case gets zero points. –  mquander Feb 13 '09 at 19:39
2  
@hstoerr - not to mention the fact that competitors are rewarded for making their code difficult to read (their solution is harder to challenge) –  Shane Fulmer May 18 '10 at 14:27
7  
(sorry if this sounds offensive) I find people who don't like Topcoder (or other similar contests) try to invent reasons why doing them will make you a terrible programmer. Its ok if you don't like them. But making up spurious reasons is IMHO not helpful. No serious contestant at TC intentionally obfuscate code (it is actually grounds for disqualification if caught). I see lots of people who don't compete write bad code all the time. Algorithm contests do not aim to teach good coding habits (learn that from somewhere else), rather they aim to teach/develop something much deeper. –  MAK Nov 3 '10 at 12:45
2  
TopCoder is way to show yourself how much better you could become. –  Thomas Ahle Feb 6 '11 at 2:07
show 2 more comments

Learned Scheme.

share
show 1 more comment

I think the most important thing you can do is make a conscious effort to improve. There's no single silver bullet, you have to keep looking for new sources of information, new experiences, and more practice.

And the second most important thing, think about what you're doing, why you're doing it, and how you can do it better. Same thing with previous projects. Look back at what you've done, and how you might do it differently now. Think about what could have been done better, or where you could still improve on it.

I see two great examples of this at work every day. I have one coworker who loves to learn, and wants to be the best developer he can. He's uses any downtime to read blogs, read books, discuss programming techniques, and ask tons of questions. He's also very noticeably improved in just the past year. Another coworker does his job, and does it fairly well. But that's all he does. He sticks with what he knows, doesn't make much effort to improve, doesn't work on any projects outside of his existing ones, and after 4 years, he has the exact same skill set and programming ability that he had when I met him.

share
7  
And he probably has less skill because some of his knowledge became obsolete.. –  Jonta Nov 20 '08 at 14:14
add comment

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...

share
show 1 more comment

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.

share
add comment

Pair programming with other folk by far raised my quality, broadened my horizons, and helped me understand the practical issues of day to day development. Couple of big points:

  • it doesn't matter how elegant your code is - if someone else can't understand it you're already sunk.
  • be ready to divorce your code in a heartbeat. The romance is in the "doing" not the "outcome".

In response to Thorbjørn's question about pros/cons of pair programming. I feel I've been lucky enough to sit next to devs with quite different backgrounds (languages, experiences etc.)

  • Usually starting with a reasonable but often incomplete spec, we'd work through the problem and decompose it. While often there is complete consensus on approaching the problem - I learned most where our opinions deviated. (e.g. the sharing of negative experience of a particular approach)
  • Before coding we'd often spend much time at the whiteboard diagramming and walking how we thought the components would play out too. Having someone else validate your thoughts or poke holes in your supposedly watertight solution is quite humbling for the first time, but makes you better in the longterm.
  • Sometimes the hardest thing to do was compromise on the "right approach". Sometimes we'd step beyond pseudocode into class designer to role play what the code would look like. Often it became clear from doing this which approach was most natural. Much of it came down to a level of trust that we had in each other to do the right thing.
  • Worst aspect of pair programming was resisting the urge to grab the keyboard and just do it yourself because it was clear in your head how to do it. Giving space to let people's thoughts playout was sometimes where I learned the most.

In general though sometimes frustrating, it is also sometimes very rewarding. I feel I get as much out of pair programming as I give.

share
2  
Pair programming has not worked for me. Could you add some comments on how it has worked for you, and what doesn't work well? –  user1249 Nov 21 '09 at 9:21
add comment

Two things:

  1. Read code written by different people.
  2. Write documentation for code written by other people.

Writing code is extremely easy; every other person I know can do that. But reading someone else's code and figuring out what it does was a whole new world to me.

share
42  
AND one of the best ways to learn what NOT to do :) –  AviD Sep 21 '08 at 10:46
9  
You can see how they do something. Maybe they do it in a better way than you? –  Jonta Nov 19 '08 at 14:52
4  
I had to dig into a really old and completely undocumented project, document it, fix some bugs in it, and port it to a new system. I learned a lot, and not all of it was what not to do. Though I did learn the value of comments. –  Sydius Dec 9 '08 at 6:56
show 9 more comments

I think you will learn a lot by reading books and taking a look on the code of open source projects.

share
add comment

In no specific order...

  • Working with people far smarter than myself

  • Always listening to what others have to say, regardless if they're junior, intermediate, senior or guru. job title doesn't mean anything.

  • Learning other frameworks/languages, and seeing how they do things, and compare that to stuff that I already know

  • Reading about patterns, best practices, and then examining my old stuff and applying those patterns where necessary

  • Pair programming

  • Disagreeing with everything Joel says. ;)

share
41  
I know it seems really gratuitous and potentially reputation whoring, but if you separated those items out to one per answer people could vote up which ones they agreed with, allowing for a more specific end vote "solution" of this question. –  davebug Sep 16 '08 at 23:10
117  
Watch how smarter people handle mistakes - that's when I learn the most from them –  Mike Robinson Feb 2 '09 at 21:38
82  
if this is a list in no particular order, shouldn't it be an unordered list rather than an ordered one? :P –  Jon W Aug 31 '09 at 19:03
3  
I agree with mmyers - just because you disagree with someone doesn't mean you're ignoring them. Actually, it's the opposite - in order to disagree with them you're actually paying attention to them. –  Cristián Romo Oct 10 '09 at 21:46
15  
I don't cart-blanche disagree with everything Joel says, I think much of the time he has some interesting things to say. My comment was tongue in cheek. There's a lot of stuff that I agree with when it comes to Joel, but about once a month he makes me shake my head and ask "What? Are you serious?!". Which I love, as I find those the most challenging things that force me to really check my position and what I believe. –  cranley Oct 19 '09 at 17:14
show 17 more comments

Working as a programming lab teaching assistant -- having to teach another person to code, particularly through example, really made a big difference in the quality of the code I wrote.

share
add comment

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.

share
add comment

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.

share
add comment

Used them.

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.

share
add comment

I spent the first several years of my career maintaining other people's code.

(The second most effective thing would be spending a few weeks grokking Common Lisp.)

share
add comment

Took a part-time job tutoring CS students at my university. It really forces you to understand something at a completely different level when you have to explain it to someone else.

share
1  
I can vouch for that. –  John Calsbeek Sep 17 '08 at 4:10
1  
An instructor at the university told me about the opening when I was still a student. I stayed for nearly a year (part time) after I graduated. –  Bill the Lizard Oct 1 '08 at 20:05
29  
As Douglas Adams writes in "Dirk Gentley's Holistic Detective Agency": "the best way is to try and explain it to someone else. That forces you to sort it out in your mind. And the more slow and dim-witted your pupil, the more you have to break things down into more and more simple ideas." –  Jonta Nov 19 '08 at 14:58
2  
Too True. Teaching photography made me a better photographer. Not much of a coder tho :( –  CAD bloke Nov 20 '08 at 6:41
9  
mutuo ista fiunt, et homines dum docent discunt - Seneca –  pageman Aug 12 '09 at 20:45
show 6 more comments

Contributing to/participating in open-source projects was by far the biggest thing for me.

share
add comment

1 - Read about a specific, narrow topic in a book like Code Craft, or Code Complete

2 - Apply just that one lesson to a project I'm working on

3 - repeat

share
add comment

The most effective thing I did to improve my programming skills was while I was in college I learned to teach myself any subject and not to rely on an instructor or a course to learn somthing.

share
add comment

Deciding NOT to be a 'Jack-of-all-Trades'

If you're serious about programming as a long term career, understand that you'll likely never be hired because of your versatility, but rather your expertise. To make an analogy, the least popular character in Everquest (at least when I played) was the Bard, who was good at nearly every skill but wasn't excellent at any of them. Pick a specialty and devote your time and energy at mastering fewer technologies rather than being so-so at many.

share
7  
don't waste time playing MMO spent it learning instead could be a valuable advice to ;) –  pmlarocque Oct 16 '08 at 20:25
7  
Perhaps you can't imagine being hired for versatility, but it is actually rather common for me. Indeed, I am often specifically sought out as a consultant because I have an unusually broad set of skills, e.g., Oracle & SQL Server, Java & C#, Windows & Unix, etc. –  Rob Williams Nov 18 '08 at 23:00
2  
@Rob: I think tool diversity is a good thing. And general-purpose CS knowledge is a must. But I also think it's wise to choose a problem-domain specialization (machine learning, e-commerce, compilers, networking, 3D graphics, etc). I personally don't consider tool-fetishism as a "specialization". –  benjismith Feb 13 '09 at 19:38
2  
A DSP guy is going to want to use DSPs, an FPGA guy wants an FPGA. A C# guy wants to write C#, a Ruby programmer wants to use Ruby... etc, etc, etc, etc. Specialists won't know the best tool for the job. –  darron Nov 24 '09 at 6:25
1  
Of course they might hire a Ruby guy if they can find one that suits their needs. But if you have to choose, I think it's better to hire a good programmer than a programmer that has experience in your language and framework. Learning a new language or framework is easy. Learning to be a good programmer is hard. –  mcv Jul 27 '10 at 15:26
show 7 more comments

The obvious answer is:

Learned my first programming language.

share
2  
This answer doesn't make any sense. –  ShaChris23 Aug 11 '10 at 0:25
show 1 more comment

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.

share
add comment

Working with other great developers has taught me a lot over the years, that and actually doing stuff just for the hell of it from time to time.

For instance, I wanted to learn how to draw charts in GD so i wrote a simple biorhythm generator just for the fun of it. Not rocket science and I don't really believe in the pseudo-science behind it, but it was a good chance to learn what I wanted to do.

share
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.