Random Perl ... rant

Iain Barnett iainspeed at gmail.com
Thu Apr 3 15:37:18 BST 2008

On 3 Apr 2008, at 11:34 am, Peter Hickman wrote:
> I have a deep seated fear of languages that can't be worked from  
> the command line and vi.

I run all my C#.Net builds from the command line - using perl scripts  
(and some modules I hope to get on CPAN at some time).

You can debug from the command line too, or use notepad or vi or  
emacs for C# - but I wouldn't.

If you don't like the operating system you could try Mono, which I'm  
currently integrating into my build scripts so that all the C# stuff  
is cross platform. Today, I've been running C# projects in Eclipse  
and building them into Mono on my mac from perl scripts via the  
command line compiler ;)

But that's an aside. Windows isn't as nice as 'nix in so many ways,  
but the developer support from M$ is very nice, and I wouldn't let  
any anti MS feelings get in the way of noticing that. We (people who  
like perl a lot) could learn from this, especially for Perl6.

> So it's not that people want to stop other people using IDEs to  
> program Perl, or even that those IDEs don't exist. It's just that  
> some of us (and I'm only speaking for myself) have yet to be  
> convinced of what we gain from using an IDE.
> But feel free to try and enlighten us.

Ok, it might be difficult since nobody is going to use it unless  
forced to :)

The autocompletion is really nice, brings up all the overloads and  
types, brings up short documentation that the nice developer might 
(should) have written about the method (stored as xml comments in the  
source code). You can still type whatever you want, you aren't forced  
to do anything by the IDE. It saves a *lot* of time.

> Does it really make you more productive? - named params in perl means
> you don't need to rememeber the order of args

I would have to open another terminal and type in perldoc modulename  
to look at the names of the args, or wait for my browser to get to  
CPAN so I can look at the names of the args. Slow.
Or can I just let the popup tell me what name and type each param is  
as I type, and bold the one I need for that moment - sometime with  
further documentation for that param.  It's faster and more precise  
and cuts down on errors.

> Here's the difference between Java and Perl when it comes to IDEs.   
> Java
> source files contain all the meta-information that the IDE needs to  
> know

In VS the IDE keeps it's own files for meta-information, so the  
source code only contains code and comments. Again, you could just  
use notepad to develop, if you are crazy.

>  ... Almost all bugs I write are typos that get caught by strict
> and/or warnings, or algorithm errors such as getting an if() the wrong
> way round.  And these days I try to develop in such a way that I can
> really quickly zoom in on the bug - it has to be in the last ten lines
> of code I wrote, for example.

It will tell you of typo's and grammatical errors *before* you  
compile, as you type. (btw, C# is strict by default). Writing in such  
a way as to minimise bugs isn't just for perl, it's for everyone! :)

You can set up macros. You can set up "snippets".
You can add bookmarks, split windows, and there are lots of hotkeys.  
The newer versions have a built in webserver so you don't have to  
setup IIS just to debug or look at your work. There are even open  
source projects out there to help with SVN and running test harnesses  
from with the IDE (or without). Lots of helpful stuff.

There are also lots of downsides, like it takes up a lot of memory,  
compilation can be slow; it doesn't do perl; it doesn't run on  
anything but Windoze; it costs lots of money; M$ do try and control  
plugin development to coincide with their business model.

On 3 Apr 2008, at 2:14 pm, Jonathan Rockway wrote:
> I'll add to this that I don't think it's a coincidence that most of  
> the
> best programmers choose tools other than Windows and Visual Studio.

I'm sure that this depends more on the project than the programmer.

> Debuggers are too tedious to be useful.  Again, I don't think it's a
> coincidence that most of the best programmers use "print" instead of
> single-stepping.

I really can't believe anyone wrote this. That is the slowest and  
most tedious way to debug there is. Completely innefficient, and a  
last resort.

I'm not selling C#, dotNet or VS, or Windoze, I just happen to have  
used them (and they used me:). I'm trying to point out that the one  
thing M$ do very well is get bums on seats. If they've done it  
through building a good IDE then perhaps that is something that the  
perl crowd should think about.


More information about the london.pm mailing list