Friday, June 11, 2010

Tips for being a better programmer

1. Read, Read, Read
Read a lot, read stuff books, blogs whatever. Subscribe to blogs so that you will learn something new everyday.

Read other peoples code, I mean read good code, for me I read some parts of the Spring MVC and Spring Security modules code to better understand how it works and I sometimes amazed at how clean the separation of the different modules are. Reading bad code, cause you will never want to do the things that guy did.

Read about the history of programming, it's quite a shame that most programmers don't really know much about its history. You can watch Douglas Crockford's video to get an idea of where all these came from.

2. Try Try Try
But its not enough to read, you must try! If you are a OO try try functional programming, if you are a functional guy, try OO. Try web programming if you mainly do desktop apps.

Don't try with something trival! Like printing HELLO WORLD. Try and solve a problem.

See a problem? Suitable for writing a small project? Go ahead and try it! I always try to keep in mind a few such problems so that I always have something to do if I have some free time. And by trying it in a context of a problem you can see what value the new tool/framework/language can bring to you. You need to develope your toolbox so that everything you see will not be a nail.

Interested in Google maps ? Write something with Google map!

3. Be Clean
Write clean code, leave the code a little bit cleaner than when you came. Uncle bob's Clean Code, is a great book about how to write better code, read about the SOLID principles while you are at it.

4. No "I" in team
We work in teams, very few of us that are doing this for a living work solo. Learn to be a people person, I remember during my high school days, an image consultant came by to teach us how about color and clothes and etiquette and she emphasize the importance of people liking you, because if people like you they will be willing to teach you even if you are not very good. Dale Carnegie has a nice book on the topic, How to win friends and influence people.

Many a careers are sometimes determined by not how good you are technically but how you are as a person.

5. Be through (or at least try to be)
What can be more frustrating then someone coming up to you and say "Hey the webservice didn't work", and when you probe further you found out that he didn't know what exception caused it because he didn't bother to check the logs. He just comes up to you and expect a magical answer.

Well try to be through in solving a problem, at least your lead or your manager will appreciate that you have at least tried to find out the cause.

6. Know your users domain
Know the domain be it accounting, customer service, military, will aid in you communicating with your users. It makes talking with them so much the easier.

3 comments:

  1. Very nice and practical. thanks for sharing.

    ReplyDelete
  2. Great little article with some very good observations and advice.

    ReplyDelete