You are on page 1of 4

This article has been cross posted from my personal blog

:
http://www.itsallpartoftheplan.wordpress.com

At the very onset, let me make it clear that I DO NOT consider myself a good programmer. I rate my
coding skills as average and I am still learning and have a long way to go before I am even slightly
pleased with my programming skills. Yes I am better than quite a few people when it comes to
programming, but thats merely because they are lazy and like to sit on idly all day and never bother
about programming. Their horrible skills make my less horrible skills look marvellous. I have
performed abysmally in ICPC and have never done well in any coding contest worth mentioning (I DO
NOT consider college level contests worth mentioning). I havent succeeded yet in Google Summer of
Code and my Imagine Cup moderate success (and glorious failure) isn't much to write home about.

So most of the tips I will mention below are lessons learnt from failed endeavours, they are what I
have wanted to be and I am not. So lets dive in.

1.Decide why you want to become a good programmer: Is it because you want a job,
preferably in a high paying software firm? Great. Then you are set to reach NOWHERE. All good
programmers I know are good because they loved what they did. Develop interest in programming.
See, programming is the only branch in engineering where you can straightway apply what you learn.
Your dad may have a car but he certainly wont allow you to tweak the V2 or swap it for a v6 just to see
what happens. But with computers you can do whatever you want. You want to simulate a virus? Cool.
Install a virtual OS and run it. Then, when you are done, remove the virtual hard disk. If you are good
at what you do, you will get paid and surely get that dream job. Yes, even I want to work in a big
software company. But thats not because of the fat paycheck. Its because of the work they do. Because
of the exposure I will have. Have you ever bothered to find out what all these companies do and the
enabling technologies behind their products or the kind of R&D they do? Jobs will come. Dont make
yourself a sucker for one. Sachin is not a great cricketer today because he decided to play cricket to
earn money and get dozens of endoresements.

2. Programming languages: Very often people equate good coding skills with number of
programming langauges known. Thats just damn untrue. While knowing a lot of programming
language is good and sometimes, even, essential; it is more important that you know one or two
lanugages very well. I 'know' and have used more than a dozen programming languages and yet C and
Java are the ones I am truly comfortable at. Thats sad of course. I really wanted to be good at
Assembly and Lisp as well. Never got the time or chance to develop those skills. To be good at a
language takes years (at least 2 years). Being good at a language means, you understand where it is
best used and where using that language makes no damn sense. On the other hand, knowing a
language takes anywhere from 3 days to a week. If you are a beginner, learn C first. Don't buy
Yashawant Kanetkar. Buy the book "The C Programming Language" by Brian W Kernighan and
Dennis M Ritchie (If you don't know who they are, do this 1. Slap yourself 2. Google their names). This
book is not the easiest but is the best. Its a small book but it is the most powerful. Generations of

Its a good idea to participate in ACM ICPC or Topcoder. Such contests are spread over many months. please do not harbour any misplaced desires of being a good programmer and do not waste your time by reading this post further.GSoc and Imagine Cup are like Test Matches. You dont have to come up with solutions too fast and you dont have to mug up algos. Use GCC. 5. Also please DO NOT use Turbo C. ICPC is like T10 while CFF. Programming is an art (not a science. read the book "Introduction to Algorithm" by Thomas H Cormen et al. Just try and understand whats written. on the other hand. 3.programmers have been brought up on it. Again reading does not mean remembering everything. 4. Another important thing is Data Structures. You may be good in one and bad in another and yet you could be a good programmer. Its not necessary that you know each algo by heart (in fact good programmers never learn things by rote) but you must understand when to use what.com. There are just too many. GSoC. the algorithm becomes self evident. You may also refer Andy Tanenbaum's "Data Structures in C and C++". Again. Yes you read it correctly). If you are in Windows download Dev C++. It has GCC Read this (small) essay by Peter Norvig Teach yourself programming in 10 years . Also may be "Concrete Mathematics" by Donald Knuth. fast thinking and you are expected to keep algos at the back of your mind. For algo. Microsoft's Imagine Cup) where you develop a complete software. and like any art it requires painstaking effort. I would suggest you to participate in both types and then decide if you want to focus on either or both. Then there are coding contests (like Sun's Code for Freedom. "The Art of Programming Vol I to V" by Donald E Knuth are mandatory. Its so damn outdated. But you will have to rely mostly on the internet for help as not many around you would know Python. Algos will broaden your understanding and give you new ways to tackle problems. Its more important than algo. Also C has the broadest usage among all programming languages. Also if you have desires to participate in coding contests (the respectable ones). requires creativity and focus spread over a long period of time. Some people suggest Python as the first language to be learnt. Coding contests: Coding contests are good for developing your algorithmic skills and they make you think fast. Once you have chosen (or developed) the correct data structure. Python is certainly a good language and is easy too. Google's Summer of Code. do a Google [ ]search and find out who Peter Norvig is. You learn a lot from these. CFF. Contests like ICPC require lot of practice. Both require different sort of skills. And if you think this book is tough for you. I am working on SCALASCA right now and then I will move on to Sun Grid Engine and Sun xVM Hypervisor and contribute code there. Participating in FOSS projects: You MUST participate in some free software projects. You get to see a lot of . Algorithms: Any good programmer has a good understanding of algorithms.

it looks good on your CV too. Now don't wait till the day you are an expert in these languages before contributing. don't waste time sharpening your pencil when you should be drawing. You are not a programmer if you have not read that book. You can ask me for directions. Most people catch cold feet when they go through some of the prerequities of such projects. Learning by emulation: Emulate the best. you must emulate the best. what you were getting into when you took up this branch of engineering and I am pretty sure you have NOT bothered to find out what awaits you in a MBA course either. And if you don't. I dont like reading the books (or any books for that matter) that you mentioned above: Well this is not yet the world of Matrix where I can just feed in programming skills to your brain. 7. All the best b. c. Give me one programming language that does all: There is none. Do it only if you want to. Design Patterns: Any art is learnt by emulating. a basic knowledge of some common design patters in needed if you are planning to develop something that is even moderately complex. Design Patterns are tried and tested architectural (of the software kind) solutions to some commonly encountered software design issues. I dont find any interest in computers and want to do an MBA:Mainly a statement often repeated by Second Year(sophomore) students. please forget about being a good programmer. You would need to know a lot of C/C++ and Javascript (for developing modules). And therefore. or bothered to find out. Programming is an art. You can't . . Take Thunderbird for example. And thats how things are gonna remain buddy. Thats really your problem. 6. And did I mention. You did not know. I am also quite sure that 2 years after an MBA (if not earlier) you will also say pretty much the same thing about your job. I suggest "Head First Design Patterns" from Oreilly as the first step. Well what can I say. Each has a different purpose.code and learn the best practices. And therefore. I did not ask you to take Computers or even to join Engineering. And this is possible by reading books written by the best and/or going through code from some of the best free software projects. Now let me address a few common grouses a. I would urge anyone serious about programming to read the book "The Art of Unix Programming" by Eric S Raymond (dont forget to first slap yourself for not knowing who Eric Raymond is and then googling his name). Dont force yourself to read them. Period. May be its time for you to use the excuse mentioned above (point a).

Need ideas? Come to me. e. and document what you wrote so you don't have to answer so many questions about it.h. This makes you write programs that don't just react to your needs. the second great virtue of a programmer Hubris: Excessive pride. the third great virtue of a programmer. Start one of your own 2. and hubris.h (yes people here still use Turbo C) and may be string. the likes of Richard Stallman. Or at least pretend to.they expect to go on a Autopilot ride. It makes you write laborsaving programs that other people will find useful. develop some real software and not just do those exercises in the book (that is necessary of course but not sufficient). . Hence. should not involve anything other than C and the only files you need to include should be stdio. Most of the languages I have learnt are because I was forced to do so as part of some project. So get set on your way to become a great programmer. Just pick up the basics in a day or two and then apply it to a real life project. When people say this. I want to a 'real' project: Thats great. but actually anticipate them. They expect me to 'give' them a project. one thats easy (read. Rithcie. Hence. Brian. Also the quality that makes you write (and maintain) programs that other people won't want to say bad things about. You can do two things:1. All the best. Join a FOSS project. I will learn X programming language by this sem/year/decade :There is no way you can sit with a book and learn a language. Hence. You need to do some real work with it. the sort of thing Zeus zaps you for. the first great virtue of a programmer Impatience: The anger you feel when the computer is being lazy." Laziness:So that you go to great effort to reduce overall energy expenditure. conio. But most people are not happy with this.h and math. Finally as Larry Wall says in Programming Perl : "We will encourage you to develop the three great virtues of a programmer: laziness. impatience.h) and I should tell them what to learn. Torvalds.d. Raymond.