Extract of Programming

December 8, 2010 at 12:00 pm | Posted in Programming | Leave a comment
Tags: , , , , , , , ,

A colleague of mine once asked me a question: How to become a better Programmer? It was a brilliant question. I have been hanging on comp.lang.c for quite some time and I have always tried to learn as much as possible from programmers who are better than me. This has led to many changes in my belief-system on what is right way to program and what is not Over time my definition of what are called fundamentals and basics of programming have changed. I have become better and the very first sentence of the long answer to the question How to become a better Programmer or What is the essence (extract) of programming, will be Love. Yes, good programmers, brilliant programmers love to program. They have certain kind of attitude that defines them, that separates them form the rest of void main()s.

I know you will say that everyone just can’t love programming. Yes, you are right. Trouble is, our education system does its best to not to let creative students love computers.  You have to find your own way, you are on your own. Good news is once you determined to find your way then lot of people will help you, many of them you might never meet in real life. The community of these programmers, hanging out there reading code for hours can become your favorite pass time. These programmers are very helpful instructors and teachers. You will never be spoonfed, you will never be disrespected but only analyzed and encouraged to write good programs, programs that have quality.

I had a misconception when I was a graduate student that writing big and complex programs will make you a better programmer, It will not (actually It will but its not true for beginners, you must already be good at basics to start writing big and complex software). When you begin to program, quality comes from writing small programs, not big ones. Unfortunately most programmers have a weak fundamental grounding in what they do. Here is the answer:

  • Write short programs. They will make you better. e.g. think what *p++ and *++p will do for a pointer p and what can be the result of *p++ = *++p.
  • Don’t just think, write code. Reading books will not take you anywhere. Knowledge is essential and it won’t make you a better programmer. Write code and write more code and write a lot more code.
  • Write code and read archives of comp.lang.c if you get problems. Most of the time solution will already be there. Don’t just ask for help. Search, read archives and if you can’t sit for hours reading archives and trying code, you are not going to get better.z
  • Hang onto you favorite language newsgroup. For C we have comp.lang.c, same for others e.g. comp.lang.lisp, comp,land.c++ etc. you can’t be a better programmer without hanging out there for a few years.
  • Be technical rather than personal on Usenet. If someone says something that you don’t like because it goes against what you have learned from your school/college then please get over it. You are not in school anymore, its real world and hence things are done differently here.
  • Rather than learning three or four new languages, give priority to learn basic algorithms and data structures. They are tough, yes, and they are very rewarding when it comes to solving real world problems (which is what you will do in a software job/business). This approach will save you not only from lot of suffering caused by Segmentation Faults but also happiness will come when you see how succinct, meaningful and readable your programs have become. That’s called maturity.
  • If you want to learn new language then learn something opposite to what you already know e.g. if you know C or C++ already then rather than learning Java, go learn Common Lisp, If you already know Python, then start learning learn Haskell, if you already know Perl, then learn Ruby to see how it solves the same problems. If you think you already know a lot of programming then read Structure and Interpretation of Computer Programs and tell me how you feel 🙂

What I have written is based on my years of experience in programming. I have summarized my experience in a very small and short blog. I have done many mistakes as beginner and I don’t want you to waste your young years in walking a path and later realize that it was wrong. Youth won’t come again, save it, invest it to proper use. Programming is a kind of love difficult to leave once you got hooked onto living with it. Its a joy but a hard kind of joy 😀

Copyright © 2010 Arnuld Uttre, Village – Patti, P.O – Manakpur, Tehsil – Nangal, Distt. – Ropar, Punjab (INDIA)

Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice, and the copyright notice, are preserved.

Leave a Comment »

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: