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.

Here's a bit information about me, before starting with the question.

I am a Computer Science Undergraduate, Java being my primary coding language.

The basic problem in my University are the teaching standards. No one is concerned about teaching coding knowledge to students, rather than just theoretical knowledge.

The effect being, most of my fellow college mates don't understand programming at all.

Even I haven't been able to come out of the traditional programming environment, which limits my coding to an extent.

What are the possible ways by which I can develop and expand my programming/coding skills.

Also, can you suggest the sources for the same?

Edited: Sources suggesting development of coding skills.

share|improve this question

closed as not constructive by MichaelT, Kilian Foth, GlenH7, Martijn Pieters, Robert Harvey Apr 25 '13 at 21:16

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

13  
FYI: From my experience theoretical knowledge will certainly help you in later part –  Tech Jerk Oct 1 '10 at 11:27
5  
Can you swim with just reading "teach yourself how to swim in X days" book? –  pramodc84 Oct 6 '10 at 9:11
8  
"Deliberate practice". Do something that is slightly more difficult than your current level, solve it, learn from it, repeat. –  user1249 Oct 13 '10 at 19:14
7  
@pramodc84 But certainly reading a book related to swimming and then jumping into a river will certainly help THAN just directly jumping into a river and trying to learn swimming –  Tech Jerk Oct 15 '10 at 9:03
4  
It's like that in most universities. A degree is not about being a good coder; it is about knowing the theories behind that, and how to apply them - you can say that being a good coder is left as an exercise to the graduate. –  configurator Dec 19 '10 at 15:10

24 Answers 24

up vote 45 down vote accepted

Programming is one of the fields where experience matters. Therefore, to become a better coder, you should code more. However, writing is not the only thing you should do. You also should read code of other developers and learn from it what a good code is. Refer to SO questions about this.

You might also find books, which are specifically devoted to coding, useful; such as "Code Complete". They contain descriptions of what good code is, which, combined with your fundamental knowledge, can make you a good programmer.

share|improve this answer
8  
Code Complete is good reading- that is the book I most wish I had read when I came out of college as a programmer. –  glenatron Oct 1 '10 at 11:53
2  
Now that book is on my must-read list. :) Thanks! –  ykombinator Oct 1 '10 at 14:52
2  
+1 for mentioning code complete :) –  adamk Nov 24 '10 at 23:01
2  
@ykombinator: (push 'code-complete must-read) –  Giorgio Apr 25 '13 at 15:29

My favorite quote is from Confucius:

I hear, I know. I see, I remember. I do, I understand.

All knowledge I got, was from applying one and single strategy:

Take the most challenging path, always.

You want to learn C#? Get a job as a C# developer.

You want to learn Italian? Go there with a dictionnary english/italian, and talk Italian

You want to learn coding ? Code!

share|improve this answer
18  
+1 for always take the hardest path. Eventually, they become an easy path! Good answer. –  Ryan Hayes Oct 1 '10 at 12:04
3  
It certainly seems like a daunting task to set yourself up for a challenge but I find it yields motivation to succeed. Great answer. The languages I know best are the ones I dove in head first without a clue and continually learned with each project. –  Chris Oct 1 '10 at 12:19
2  
I changed hardest by most challending. It's more positive –  user2567 Oct 1 '10 at 12:33
1  
Good programming is not a spectator sport. –  Incognito Oct 1 '10 at 17:56
4  
@Pierre, you want to learn 1) Latin and 2) Perl. Code Perl in Latin: csse.monash.edu.au/~damian/papers/HTML/Perligata.html –  user1249 Nov 17 '10 at 7:18

Coding is great advice, but without someone there to give you feedback, you'll just repeat your mistakes. Find a job, work on an open source project, find a mentor and get them to look at your code.

share|improve this answer
1  
Exactly! That's a great point. Probably I have no mentor, as of yet. –  ykombinator Oct 1 '10 at 15:54
4  
Write some code, and post it with a specific question on StackOverflow.com and you'll get plenty. –  JeffO Oct 1 '10 at 16:12
1  
This is why I keep bitching to have code reviews on our project, but "there's no time for that." –  MetalMikester Oct 1 '10 at 17:16
1  
@MetalMikester - but there's always time to do it over. –  JeffO Oct 1 '10 at 17:47

Here's a presentation Dan North gave and QCon on how to move from novice to expert programmer called Sharpening the Tools. Below are key suggestions from the presentation:

  1. Practice the basics: kata, code for fun ...
  2. Learn from other people: read books, blogs, etc., read code, programme in pairs ...
  3. Understand the trends: what is happening in the industry now
  4. Share knowledge: best way to learn something is to understand and teach it
  5. Maintain your toolbox: use "timeless" and new tools
  6. Learn how to learn: understand how learning works
share|improve this answer

Try to write a compiler for some simple language from scratch. You will improve you skills a lot along the way (with some nice theoretic techniques from formal language theory as a bonus). I tried to write a simple version of Excel, and it's also a very nice exercise.

Like others said the only way to improve your coding skills is to actually do it. Get your hand dirty with some large projects. But then for large program, it's even more important that you master software design techniques, otherwise the size of the program seems unmanageable.

There's one nice quote from Nate Kirby:

"Bad programmers ignore details. Bad designers get lost in details."

So switching between these two levels of abstraction is the skill you should master.

Also the speed of how many lines of code you can write per hour is not what you should aim for. I like a quote by David Parnas:

" I often hear developers described as `someone who knows how to build a large system quickly.' There is no trick in building large systems quickly; the quicker you build them, the larger they get!"

share|improve this answer

I've implemented either a betting pool or a Baccarat game in almost every language I've learned.

This type of software covers

  • Dates and times, with calculations
  • Currency types and things that can be converted to and from currency
  • A discrete set of rules that is easy to test
  • States, transition between states and multiple entities responsible for state transition
  • Multiple users with different views of the same model
  • Multiple end conditions

Multiple player blackjack and poker would work also.

One caveat is that in my day job I work on financial systems and there is a huge overlap between things to consider when writing a multiplayer game of chance and a trading system.

share|improve this answer
  • Select good opensource projects and read the code.
  • Take up a medium size project for yourself and start coding
    • If you're interested in web development, try to build an existing site from scratch using your favorite technology; how about twitter in django?
    • If you are into desktop application development, start with a notepad and improvise it to support advanced features (regex based searches, to begin with).
share|improve this answer

Think of it like this.... Tiger Woods didn't get to be "the best" golfer by watching golf or by reading about it. He got that way, as any other athlete does,by studying, by practicing, by finding where he can improve his game and doing something about it.

Coding is the same. The best way to get better at it is to study what others do, understand WHY they do it that way, and then doing it your self.

share|improve this answer

As in any other human activity, the best way to improve is to practice your knowledge, but you need some exercices for that. Dave Thomas, one of the authors of the book The Pragmatic Programmer, introduced the concept of Code Katas, similar to the kata concept in martial arts.

You can take a look there: http://codekata.pragprog.com/

share|improve this answer

Jump in the water, it might be cold at first and you'll be tempted to get out but soon your body will get used to it and become warm again and as you become comfortable in the water you can then swim around maybe go into the deep end.

I just finished college a couple of months ago where i studied Java. Same as you i didnt have a clue on how to code properly. About a month ago i wanted to build a web app in PHP. I didn't know what i was doing but just went for it. It was intimidating and overwhelming at first but as you practice it becomes natural. I even wrote the application many times, every time simplifying it even more. Now im working on the app from scratch but this time im figuring out how to do it objected oriented and using PEAR and its module quickform which is another hurdle i've to get through but determined and excited nonetheless.

So practice. Jump in the water! Best of luck :)

share|improve this answer

I suggest learning all of the syntax of your favourite language. Understand how to use virtual functions, inheritance, lambda if they exist. etc. One thing i did was grab a large scary library (i did this with boost and STL for C++) and see if every line and every keyword make sense.

Or alternatively you can read the language syntax reference if there is a good one that covers the most up to date version. As an example here is the C# reference (Not the version at the top. I made the mistake by looking at a more popular older version that didnt have the syntax i was looking for)

share|improve this answer

The general consensus is "write more code", which I agree with, but I'll add to that advice that you should write a lot of different kinds of code. Java is fine as far as languages go, but you should definitely write code both up and down the power spectrum. In addition to Java, I'd suggest doing a few small projects in a lower level language (C is a good one for this), a scripting language (I prefer perl, but python is also a good choice), a functional language (lisp is the general recommendation here, but OCaml and Haskell are also good choices), and at least get comfortable with reading an assembly language.

Also, pick some variety in the types of programs you implement. Look at implementing at least a Desktop GUI, a rich web application, a network client and server, a driver, a data munging utility, a ray tracer, and a physics simulation.

All of the projects should be relatively small in scope, the goal isn't to have a featurefull program, but to get a wide breadth of experience in the different domains you might run into, to learn the different types of thinking needed for each, and to find out where your interests are.

Once you've done that, you'll have a good idea of what type of programming you're the most interested in, and you can find or start an open source project to get experience working on large code bases, dealing with long-term projects, and working with other developers.

share|improve this answer

Code! Code! Code!

share|improve this answer

You're getting a few similar answers and mine will also be the same. Write code. There are two good ways you could do that.

  1. Pick something that really appeals to you or interests you and just go about implementing it. If you're into games, write a game. If you're interested in web stuff put together an interesting and original website. You might not manage to finish it even, but the experience will teach you a whole lot.
  2. Pick an open source project that you find interesting and get involved with it. Learn from the existing code and use it to fix bugs, build unit tests and implement new features.

Either of those will give you the direct experience of programming you need as well as the involvement in programming communities as you learn and have to ask questions to get more out of it. You will make many mistakes. This is good- if you stop making mistakes you have stopped learning and you need to find some new way of challenging yourself.

share|improve this answer

My suggestions

  • Find a pet project and write it in a different language(lyke python/c#) to the one you know. This will teach you more than you can imagine. Look at other projects that are similar and try to get feature parity with them. You can go slow with this and have modest goals, steadily increasing your difficulty level with new features. This also becomes your show piece whn you go for a job interview.
  • Find uses in your project for relevant technologies like web services, javascript, ajax, geocoding and basically anything that is making headway in the software world.
  • Play with other operating systems like Linux/freebsd. The more exposure you get to different kinds of systems the more you will understand the thinking behing them, and why they did things in the way they did.
  • When your done with parts of your code go back to it and try to improve it constantly. Find ineffiencies, add more comments when needed, try to perfect it.
  • Dig around at c2.com. There are a lot of good coding practices. Learn these and try to apply them in your own project.
  • Read books like the pragmatic programmer and code complete, they will give you the knowledge of battle hardened programming.
  • This may sound unrelated, but find another technical hobby if you don't have one already like racing RC cars, playing a musical instrument or learning a foreign language. The more pieces of your brain are in use the better, and you need to unwind from time to time because programming can get too much.
share|improve this answer

Peer reviews really help improve the quality of your code. If you have no real mentor, you can post your code [after you reduce it to necessary minimum] at StackOverflow or RefactorMyCode or mailing lists and people will help you with improving the quality of your code.

share|improve this answer

If you want to improve your skill in java,i suggest you a web there you can solve simple java problems and get improved in java.go to www.codingbat.com i'm a beginner in java and i have solutions for most of problems there.

share|improve this answer

"How do you get to Carnegie Hall?"

"Practice, practice, practice!"

share|improve this answer

"Practice!" That is a cliche.

You should review what you've learned in the math classes, and make some programs that deal with the problems. Also, implement an elevator program, a vending machine (that calculates changes in coins), to sharpen your logic skills. Think of everything in the everyday life, and implement them.

share|improve this answer

Yes, practice is extremely important to develop programming skills and to keep them sharp. However practice alone will only take you so far. You also have to learn from people who know more than you. There are techniques you have never heard of, practices whose benefits are not immediately obvious, and tricks that you could never invent yourself.

The way to learn new techniques, neat tricks, and useful practices are many. Read books. Talk to co-workers. Ask questions. Review other people's code, and have them review yours. Read blogs and articles on programming, including this site. In short, do not work in a vacuum.

Oh, and if you are not sure what NP-complete means, or if the big-O notation scares you, then you should probably take some theory of computation and algorithms classes.

share|improve this answer

I would say that you should read up on design patterns, such as Builder, Factory, Composite, and eventually Observer, Mediator, and Flyweight. Design patterns aren't the end-all-be-all for coding solutions, but they demonstrate how to implement theoretical concepts of object oriented programming.

share|improve this answer

I can only suggest the thing what has worked for me. I had dream to learn programming language and create chess engine with it. I have left spend time on books, articles and small samples. So i decided to check real projects which has better documentation for developer.I have chosen one and started to read the project day by day. Don't think that passing days waste of time while reading. It is much better than spend time reading on articles and books. You will highly encounter many thing which is not clear at first sight but day by day this will change if you try research patiently. Don't expect to understand everything in a week.You have to hold your low Self-Esteem when you don't understand some things.Just try to discover how this *ucking awesome thing is working and enjoy.

Choose an existing project which you have passion for it.Start to read codes, debug it and try to understand how the things works everyday. Also use the project for yourself. Then start to add some features which you want. Even try to write same or similar application.

share|improve this answer

Lerning by doing...

Try to start a small Open-Source project. Or find an existing project to join.

To show other people your code is the best way to get feedback and to become better.

share|improve this answer

I happen to like Code Koans as a way to improve skill.

The Ruby one is pretty nice. There are also Koans for Scala and Python.

share|improve this answer

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