Ashish Arya has 11+ years of experience in developing enterprise solutions using cutting edge J2EE technologies. As a solution developer, he involved in architecture and design of enterprise and web solutions. His primary skill set includes Flex/extJS/jQuery/HTML5, Java/ Swings, JSP/Servlet, JSF/Struts, Spring/EJB, Hibernate/JDBC, XML and WebServices along with verities of tools and APIs. As project and delivery manager, he has exposure of people, project and process management using different methodologies covering from waterfall, RUP to agile processes. He has delivered many business critical and complex IT solutions in the years of his experience. He also worked extensively on SOA to provide cross platform and legacy integrated solutions. He has extensive experience working with finance and healthcare domains. Ashish has posted 2 posts at DZone. You can read more from them at their website. View Full User Profile

10 Effective Ways to Become a Good Programmer

12.27.2010
| 67916 views |
  • submit to reddit

A good programmer is someone who always looks both ways before crossing a one-way street. ~Doug Linder

Working as a software programmer in IT industry, one thing that drives us daily to the work place; is that fun and passion lies in programming. But to make that programming a fun and to get an eternal elation out of it, one needs to learn and adhere to some basics which make you a good programmer.

I am not writing mantras which you can follow to become a good programmer, but the intention is to collate a list of helping tips which I learned and implemented in the industry to get good results. There is no definition of a good programmer, but here we are referring to the category of programmer who have developed excellent IT solutions and helped in overall growth of this industry.

1. Work on Basics

As it is true for any industry and any job, the conceptual understanding is the key for success. Unless one has strong conceptual foundation, he/she can never be a good programmer. The core conceptual understanding helps you in designing and implementing the best solutions in the best possible way. If still you feel gap in core computer science and your programming language specific concepts, it’s never too late to go back and review the basics.

2. Start putting question tags (how, what) with every set of code you write

One thing that I realized creating a clear separating line between good programmer and rest is that zeal to know what and how it is happening. There is small group of people who can never leave a code without knowing exactly what is happening when it executes. I understand that in tight deadlines, we don’t get this liberty always and hence have to leave the code just knowing that it’s doing its job. Although this is a bit different topic of how to handle such situations, but as a programmer one can always try the level best to dig into as much as one can. And believe me, this becomes a habit with time and then you do it unknowingly every time.

3. You learn more by helping others

Most of us have a common tendency of turning our heads towards forums or groups only when we need help. And again a clear separation between the good programmer and rest that the formers visit these places more often to help others. This makes them learn more then they learn getting their problem solved by someone else. Within a team as well, help others to solve their problems. Believe me, understanding others’ problem in their context, investigating on that and providing solutions; will leave you much more learned than before.

4. Write simple, understandable but logical code

As in almost every aspect of life, the formula of KISS (Keep it simple and short) works in programming as well. Write more logical code and avoid complexity. Sometimes people do write complex code just to prove their capability to write such codes. My experience says that simple but logical codes always works well, resulted in fewer issues and are more extendable. I remember an excellent quote

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

5. Spend more time in analyzing the problem, you’ll need less time to fix it

Spend more time in understanding and analyzing the problem and designing solutions for it. You will find the rest of the things quite easily doable. Designing not always mean using modeling languages and tools, it can be as simple as looking at sky and thinking solution in your mind. Those who have habits of pressing keyboard (for coding) the moment get the problem, usually ended us something different than the requirement.

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

6. Be the first to analyze and review your code

Although a bit difficult, but try to break your own code before others can and with the time you will learn to write close-to-bug-free code. Always do a close and unbiased review of your code. Also never hesitate to take others view on your code. Working with good programmers and taking their feedbacks will surely help you become a good programmer.

7. Don’t dismay yourself by looking at changing technology world

Over these periods in IT industry, I met with many people who are either disappointed by their work or even left it to search new job saying they want to learn and work in latest technologies. I don’t see any problem with this aspiration but the very first incorrect word is the ‘latest technologies’. What we are hearing everyday and mean here is new tools, APIs, frameworks and others means coming up everyday to make the programming easier and quicker. This anyway will continue in technology world. But what needs to be understood is that the core and basic technologies changes with much lesser pace than frameworks, tools and APIs around it. This is like the sea where the surface water moves very rapidly but the deep water is relatively calm and concentrated and most of the aqua lives survive here. So, feel yourself in that deep water and close to core technologies. For e. g. in Java enterprise world, lots of web frameworks exist and new ones coming every other week. But the core concepts of request based client-server communication, MVS pattern, filters/servlets/JSP, resource bundling, XML parsing etc remains same. So spend more time in learning these core concepts rather than worrying about ever changing frameworks and tools around it. Believe me, with the foundation of core concepts, you will always find easier to learn new frameworks, tools and APIs.

8. Work-arounds don’t work for longer time

Many times software programmers implement work around solutions (may be because of lack of time, lack of problem understanding or lack of technology experience). But over the period these work around solutions always resulted in corrupting the code, making it less extendible and maintainable and lot of wastage of time later on. Always prefer to implement when you know the in-out of the solution. I understand that it becomes unavoidable in some circumstances, but it’s like, one should speak truth always but you tell lie in some circumstances.

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

10. You can learn from others code as well

I interacted with some excellent programmers who actually have java source project inside their IDE all the time and read/refer that in daily work. They do it not only to fulfill their appetite of knowing the basics but also to learn ways of writing good programs. Reading and referring reliable and known open source code or your senior’s code, can also help you making your programming better.

And the last, not listed above: Don’t compare yourself with others

Your comparison of yourself with others will only result in evolution of negative feelings and un-healthy competition. Everyone has got his or her strengths and weaknesses. It is more important that we understand ours and work on it. I have seen many times that so called ‘fundoo-programmers’ (fundamentally strong programmer) also make silly mistakes. So, analyze yourself, list down your areas of improvement and work on it. Programming is a real fun, enjoy it.

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

 

From http://ashisharya2003.blogspot.com/2010/12/10-effective-ways-to-become-good.html

Published at DZone with permission of its author, Ashish Arya.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Tags:

Comments

Manuel Jordan replied on Mon, 2010/12/27 - 10:04am

3. You learn more by helping others  <--- very true

Josh Marotti replied on Mon, 2010/12/27 - 11:02am

I think point 8 states it somewhat, but I'd really like to see:

"Write code for maintainability."

Projects are 10-20% implementation, 80-90% maintenance.  Making your code (and problem) easy to maintain is a must.  I think Larry Wall said something along the lines of "a programmer must be lazy" in his tenants of a programmer.  You should never want to do anything twice that you can automate during your coding.  This is what leads to things like continuous integration and such.

Stephane Vaucher replied on Mon, 2010/12/27 - 11:23am

Good post. To become a great programmer, I'd add staying humble.

Mats Henricson replied on Mon, 2010/12/27 - 3:47pm

I think you've forgotten the most important way:

   Write code at day, at night, and weekends. As much as you can. Year in,year out.

You will never ever become a good programmer unless you write a lot of code.

Bozhidar Bozhanov replied on Tue, 2010/12/28 - 5:50am

After a year on stackoverflow, answering questions, I can vote with two hands for point 3 ;)

Nirav Assar replied on Tue, 2010/12/28 - 3:14pm

Another good point to note on for a good programmer is to be test-driven. This suggestion is not to be a purist or to always test first, but a good programmer always tests his code in an automated way. This always allows him/her to refactor the code to make it more maintainable, extendable, and understandable. Without a set of regression tests, no one can touch the code to make it better without fearing of breaking it, or without knowing it in and out. You would also have to know the myriad of manual test steps to change any code. Thus, programming without automated tests is like coding without insurance. If you code without tests, you tend to make it work, then never touch it again because its risky. Unless you are a god, your code can always be improved after the first time. And it will definitely change if your application is worth anything.

 Thus I think this point supplements #4, #6, and #8.

Ashish Arya replied on Wed, 2010/12/29 - 3:41am in response to: Josh Marotti

Agree! True that a healthy percentage of time in a project is attributed towards maintaining it. This is also referred in #4, write simple, understandable and logical code and that way you move one step closer to maintainable code. Thanks.

Josh Marotti replied on Mon, 2011/01/03 - 10:15am in response to: Ashish Arya

Yes, you had a few that insinuate maintainable code, just wanted to see it spelled out specifically :)


Good article! 

Rjay Calo replied on Mon, 2011/03/21 - 11:25pm

..hi guys.Im starting studying a JAVA right now.for its more difficult to understand some codes

but I need work with it. As of now I need some mentors to teach me about JAVA.I really like

this programm,I can accept some.docs or tutorials about JAVA..I really need some help for those 

who already know about JAVA..just email me.in this add.rj_calo@yahoo.com

Rjay Calo replied on Mon, 2011/03/21 - 11:30pm in response to: Ashish Arya

.hello.I realize that I need some help to those who really know abour JAVA

and read you message while ago.and I see that your good..Im asking that if you can help

me about JAVA.as of now I need some basic tutorials about java.I can accept some docs and tutorials

 

Randolph Cardoso replied on Thu, 2011/11/24 - 2:12am

wow tnx for the tips sir...

 

Randolph Cardoso replied on Thu, 2011/11/24 - 2:20am in response to: Ashish Arya

good day sir me i ask what is your facebook account so that i can tell you a question about programming..because i want to learn it badly..

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.