Many Java developers ask me How to become better programmer, how do I improve my programming skills, or I am good at Java but not so good on problem solving skill etc. This is reality, today's era is full of language expert than real programmers. It's easy to understand keywords, methods and API of Java programming language, but same time it's difficult to solve a real problems, design reusable and robust software and get maximum of data structure and algorithm. I have often seen Java programmers not doing so well when asked to design and code a solution in limited time, but same time they are really good with Java concepts and all theory. Even senior programmers of 4 to 6 years experience in Java programming, sometime fail to solve questions like designing coffee-maker, coding Vending Machine or sometime even recursively reversing a linked list. I may be just moving off from becoming better programmer, but it's important to know your limitation and then work out to resolve those. If you feel resistance in coding, then you should code as much as possible, if you feel stressed and lost in designing using Object oriented analysis and design, then you should do designing using pen and paper as much as possible. This resistance is what actually preventing you from being a better programmer. I have personally found that coding and designing presents lot of resistance to an average programmer, because in most of them in their professional job don't do enough coding and development. By the way, there could be numerous tips to become better programmer, I will stick with my list, which I personally follow and which has continuously helped me.
10 Tips to Improve Programming Skill and Become Better Programmer
In order to become a better programmer, you need to be really good at data structure, algorithms, designing using OOPS, multi-threading and various programming concept e.g. recursion, divide and conquer, prototyping, and unit testing. Programming is a combination of many skills, which means it's not possible to learn it in quick time, rather it will come with time and experience, but that won't happen automatically. You can spend 5 years doing a Java programming job, without being a good programmer. Since most of Java interviews focus on theory rather than programming and coding skills. Not many programmers practice these essential programming skills. If there is a mandatory problem solving programming test, I would bet, average programmer would have been much better. Any way, here is my list of things, which can help you to become a good programmer.
1) Coding, Coding and Coding
Why I have coding at top of this list? because it's difficult and same time it's central piece of programming. By doing coding, you also realize your mistakes in designing, error handling, threading and then go back to those respective skill to improve. You just can not work in designing only, coding produce output, which is important to learn and act as success. By the way, do not stop just after solving the problem, it's always better to throw away your first solution, that is just a prototype, your next solution should address issues, missing requirements which you have found building prototype.
2) Reading Books
Coding is easier said than done, and there is huge difference between good code and bad code, but how do you know? Until you have seen a good code, and know why a particular code is good, you can not understand difference. This is where books comes to help, more often than not authors are great programmers themselves. They offers their experience in form of book. I love books, but one book, which is particularly helped me is Clean Code by Uncle Bob. By reading this book, I have found myself finding problems in my code and applying advice given in this book every now and then. My advice is if you ever find such books, grab them. I also recommend reading this classic books many times, and refer them every now and then. Another similar book is Effective Java by Joshua Bloch, which is full of good advise. It's also from of my list of must read books for Java programmer. Also, by reading books you are learning from someone else's experience, and there is only two ways to improve yourself, either by learning from own experience (which is very limited) or learning from others experience (which is unlimited). Remember more is not always good, rather than reading 5 books, I suggest read two book, which you enjoyed reading multiple times.
3) Contributing to Open Source, Signing-up mailing lists
Contributing on Open source code, especially from Apache, Google and some other projects is another way to improve your programming skill and become a better programmer. Just signing there mailing list and following discussion teaches you a lot. Since most of discussions happens between good programmers, by listening them and understanding problem and their approach, solution and view, automatically develop good programming habits on you. To get most of it, do not just sit passive, ask questions, offer your view, but same time value others as well.
4) Practising data structure, Algorithms and Design related problems
I was thinking to put that as second item, but it ended up fourth. In my opinion this is the most critical of things to do to become a better programmer. Most of good programmers I have seen and met are really good in data structures, algorithms and basics. By learning these things, you take better advantage of what is available. Since data structure is key piece of any programme, solid knowledge of them helps during problem solving. Similarly knowledge of key programming principles, search and sort algorithms and other well know algorithms develop programming skills on you.
5) Reading Good Blogs
Reading good blogs is a small part of reading books. How does reading blogs helps you to become better programmer? Well it does. Since blogs are often written by programmer themselves and most of them share there personal view, experience, you often find them relevant. Also blogs are small piece of information so it digests well. Blog also help to learn new technology and new features of existing language and API. Many times, I have seen something subtle, or missed things from a really well known part of Java described in a small blog post.
6) Reading Code
If reading blogs helps to become good programmer, than reading code help more than that, but same time reading blog is easy but reading code is tough. Do you see resistance? then you should do it. Look code of open source projects, your fellow programmers code, your existing proprietary code, code from Java SDK and try to understand how they work, try to see what they are doing and why they are doing. Find patterns, develop navigation skill, initially you will find it boring and difficult, but with time you will develop a good code sense, which will alert you when you do mistake, help you to spot others mistake, gaps and code smell. This Code sense is one of the sign of better programmer, they often tend to look, what you missed.
7) Writing Unit test
Unit test complement thinking and coding process, and subsequently helps you to design better. Anything which is difficult to test has chance of improvement. Also writing unit test helps a lot in finding better names, better abstraction, better interface and abstract class design and overall improves code quality. But like coding and designing, unit testing is also tough job for average programmers, you will see lot of resistance there. Some programmer writes trivial test, instead of thinking hard on usage scenario. Remember there is no substitute of think through process, after analysis, design and development, unit testing is another opportunity to think through scenarios and gaps in your code. Make it a rule, always write Unit test for your code.
8) Doing Code review
Like Unit testing, Code review is another thing which help to become a good solid programmer. Code review help both reviewer and author, reviewer improves his code sense and offer genuine advice, while author learn from his mistakes. It often helps that the code you think is rock solid, has some bugs which only other programmer can see, Code review and four eye check does that for you. If you are lucky and get a chance to work in a company which has unit testing, code review as discipline then you are likely to be better programmer than rest. These two things immensely help to improve programming skill.
9) Talking to fellow programmer
Reading is passive event compared to talking. Talking a program and discussing that with fellow programmer, often leads in better solution, it's natural because your mind tends to involve more, whey you talk and listen to other. I have then found gaps, missing requirements, bugs and design flaws while discussing with team mates. In software industry, where programmers tends to isolate them with there computer, talking, sharing and doing white board sessions helps immensely. Don't just sit and code, talk, listen and think and hangout with fellow programmers. participating on event also helps.
10) Participating Stack Overflow and forums, Commenting in Blogs
This is another form of activity, which helps to revise knowledge. By sharing knowledge, first person who benefits is the one who share. Since programming is big and vast, you tend to forget most of things which you don't use for more than 3 months. Participating in StackOverflow and answering others queries, commenting on blogs and forums is a nice little way to revise knowledge and same time correct your misconception. By putting our knowledge in front of others, we not only helps others but also put them into test. Many times you will see, someone benefiting from your knowledge but also you are getting your misconception corrected.
Every programmer wants to become better programmer, but not every one succeeds. Apart from natural talent of programming and problem solving, it requires lot of hard work, constant learning and perseverance to become a better programmer. The more you do real work e.g. Coding, Designing, Unit Testing and Code review, the more better you will become. If you just want to do one thing at this moment, I would say go and read clean code.
Tidak ada komentar:
Posting Komentar