Thursday, June 25, 2009

An Email to a Beginner

> I am very keen to gather knowledge of perl. I use perl for last six months,> and I am new to perl. So I need your help and kind suggestion to develop my> skill in perl.

There is a simple four prong approach:

read

write

ask questions

answer questions

You need to read docs, books, blogs, and code.

The docs are available on your system through the perldoc command(type perldoc perldoc to learn how to use it), but you can alsoaccess of the information online at perldoc.perl.org (core language)and search.cpan.org (everything under the sun).

If you have co-workers or friends who are writing Perl code, take a look at it. CPAN is also a good source for code to read.

Just as important as reading is writing. You should be reading a partof one of the books and then writing code. And I don't just mean theexamples from the book. Play with the concept the book introduced.See what you can make it do. These don't have useful programs. Anddon't worry when you make mistakes, Every programmer makes mistakes.By making, and learning from, these mistakes now, you will be betteroff later.

In addition to playing with the concepts in the books, you shouldchoose an ambitious project to implement. When I started out withPerl, I was a DBA/Developer, and I wanted a nice SQL editor. I wasrunning on Linux at the time and was missing Informix's SQL Editor (itonly ran on MS Windows) and was dissatisfied with dbaccess (theirterminal client). I looked around and found a GUI toolkit (Gtk) thatworked with Perl and a way to connect to the database (DBI) and I juststarted trying to make something work. When I finally got somethingworking, I realized I needed a new feature, and got coding again. Andso the cycle goes. When you run out of ideas, you can always tryreimplementing UNIX commands. There is wealth of programminginformation to be gleaned by doing this.

And don't be afraid to ask questions if something confuses you are youcan't get something to work. I suggest two resources: the perlbeginner's list and Stack Overflow; just remember not to post thesame question to both (it annoys people).

Answering questions is just as important as asking them. If you thinkyou know the answer, respond to the question. You will probably besmacked down, but what is worse: thinking you know the answer when youdon't or a little bit of embarrassment? To try to get you over beingafraid of embarrassment, here is an exchange where I was thoroughlybrought to task for being wrong, and this didn't happen years ago, ithappened this month. The trick is to care more about the information than your pride.--Chas. Owenswonkden.netThe most important skill a programmer can have is the ability to read.