On Thu, Apr 22, 2010 at 11:38 AM, HACKER Nora <nora.hac...@stgkk.at> wrote:
> Hi, > > I wonder if some of you are in the same situation like me: I am the only > Perl programmer in the company, at least trying hard to get along :-), > but I have nobody to ask for help. So I spend hours and hours with my > book and the internet when I'm stuck. Luckily, so far I almost always > accomplished what I wanted to do, but I don't know whether it is "good" > programming - the scripts work, but if I compare them to some code that > comes from the experienced guys here on the list they just look ... uhm, > different ... How do you improve your scripts and in general your coding > style without having someone to alert/advise you what could be improved? > > Regards, > Nora > > > > Hi Nora, The fun thing about Perl is that there are a million and one ways to get things done, and most of them are not horribly bad. My biggest problem is that "The Internet" is not just a source of infinite knowledge but also of some horrible code that even though it works is usually not a very nice way of getting things done. It seems like a lot of that code makes its way to many sites that all copy it from the other guy and proclaim this to be "THE WAY". The best way to learn to do better is to stick to mailing lists like this, sites like perlmonks and the books we see so often advised on these sites. Another good trick is to in about 6 months to a year after you wrote some bit of code to have a look at it and see if you can improve it a little here and there. Often you will find that you have progressed a lot and can now get the same work done faster cleaner and easier to maintain then you could a year ago. The mentioned Perl Critic module is a very nice one and I would advise you to also pick up the book which it refers to so often. It is nice to see you are doing things different then the module wants you to but it is much better to figure out why. If you are looking for some other Perl coders to work with and learn from. Open source projects are the way to do this. They often attract a group of highly skilled people who are usually very willing to help and point out ways to get thigns done in a different, better or faster way with out making you feel like a complete idiot. After all the work that you do is work that they will not have to do so there is no point in them running you off for writting something in a less pretty way. :-)