How to improve Java programming skill and become better programmer

How to improve Java programming skill

Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ~Martin Fowler

Most of the beginners in Java always asks this question – ‘How do I improve my Java programming skills?’. It is easy to learn theoretical concepts but when it comes to solving real world problems most of them find it difficult. Even a person with good theoretical knowledge of OO concepts finds it difficult to apply it while coding. Sometimes even senior programmers finds it difficult to solve problems like producer-consumer, binary search tree, using recursion etc. The reason for all these may be that they didn’t understand the concepts by relating it to real life or they just don’t do enough coding. In this post we will see how to improve Java programming skill and a become better Java developer.

1. Have a solid understanding of OO Principles

In order to become a better programmer, you need to be really good at the data structure, algorithms, OO principles and Design Patterns. Having strong understanding of Object Oriented principles is a must for every Java developer. You should understand the concepts by relating it to real life situation. Ask yourself the questions like

  • What is an object in Java and how it relates to real world?
  • What is inheritance and what does “is a relation and has a relation” mean?
  • What is an interface and what is the use of it? How can I apply it to real life situation?

Like this for each concept ask yourself – What is this? Why is it required? How to use it? You can become good at OO principles by getting answer for these kind of questions.

2. Read Books

Nothing can replace a good book. A good book will teach you the concepts in a much easier way and by relating to real world objects. The authors are great programmers themselves. By reading books you are also learning from someone else’s experience. I suggest you to read  Effective Java by Joshua Bloch. This book brings seventy-eight indispensable programmer’s rules of thumb: working, best-practice solutions for the programming challenges you encounter every day. This book presents the most practical, authoritative guidelines available for writing efficient, well-designed programs.

If you are just starting with Java with no previous programming experience then you can check this book ‘Sams Teach Yourself Java 2 in 24 Hours‘.

3. Practice. Practice. Practice.

You can’t become a good programmer just by memorizing a book. It is easy to talk about the theoretical concepts. But you will come to know the language limitations, or design best practices only when you code. So to become a good programmer, you have to be writing lot of code. If you are a beginner, start with writing programs for simple problems like Fibanocci series, palindrome, pascal triangle etc and then you can move on to bigger problems like binary search tree etc.

Try to participate in online coding contests. I have personally participated in many of the contests in techgig to improve my coding skills.

If you are looking for a online platform to practice Java programs, take a look at this Coding Ground.

4. Master the core APIs

If you really want to become a good Java programmer then you have to master the core APIs in java.lang.*java.io.*, java.util.* etc. In case of  Web application development, no matter which framework you are using, you should have strong knowledge on Servlets.

5. Spend more time in analyzing the problem

Before starting with your code, spend more time in understanding and analyzing the problem and designing solutions. It will make the rest of the things easier. Once you do this, even if any issue occurs, you’ll need less time to fix it.

If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it. ~Richard Pattis

6. You learn more by helping others

Contribute to Open Source projects and subscribe to online technology forums like stackoverflow and start interacting with real programmers. Ask questions and also answer the questions asked by other forum members. By this way you can learn more by understanding others’ problem in their context, investigating on that and providing solutions. Good programmer visit these places more often to help others. Take a look at the open source java projects at GitHub.

7. Keep it simple

Always write simple, understandable but logical code. People tend to write complex code just to prove their capability to write such codes. Simple but logical codes always works well, resulted in fewer issues and are more extendable.

Good code is its own best documentation. As you’re about to add a comment, ask yourself, “How can I improve the code so that this comment isn’t needed?” ~Steve McConnell

8. Follow good blogs

You are not alone in this world. There are thousands of enthusiastic people working on the same technologies around the world and blogging their insights on the technology. Blogs are often written by programmer themselves and most of them share their personal view and experience. You can see different perspectives of same technology on blogs. You can see both good and bad of a technology on blogs. Follow the good blogs and respond/comment on posts with your opinion on that.

9. Keep yourself updated about the latest Java technologies

In Java world open source frameworks keeps evolving. By the time you start working on a framework, it may become obsolete and some brand new framework may come into picture with super-set of features. So keep an eye on whats coming in and whats going out by subscribing to newsletters.

10. Read documentation

One of the essential habits of good programmer is that they read lots of documentation. May it be specifications, JSR, API documents, tutorials etc. Reading documents helps you creating that essential foundation based on which you program in best of the way.

Last but not the least: Don’t compare yourself with others

Your comparison of yourself with others will only result in negative feelings and un-healthy competition. Everyone have their own strengths and weaknesses. It is more important that we understand ours and work on it. Analyze yourself, list down your areas of improvement and work on it. Programming is a real fun, enjoy it.

One man’s constant is another man’s variable. ~Alan J. Perlis

I hope this post has helped with ways to improve your Java programming skill. If you have any other tips to improve the Java coding skill, post it in the comments section.

The following two tabs change content below.
Working as a Java developer since 2010. Passionate about programming in Java. I am a part time blogger.
One comment
  1. Hey uday,
    I have gone through your blog and as you said yes i was having this same question too in my mind that how i am going to improve java programming skills and now completely agree with your guide as we need to do more and more practice , and the point which you have covered here that is ‘ you learn more by helping others’ that’s make a sense.Thanks for sharing this useful blog.

Add Comment

Required fields are marked *. Your email address will not be published.