Nifty tidbits and random thoughts on technology and anything else that catches my fancy
Monthly Archives: August 2004
Perl – you’ll either love it or you’ll hate it, but you won’t ignore it if you want to get things done!
Have spent the better part of yesterday night writing a Perl script to aid my fiance’ in doing some log analysis. And I’m no Perl guru – my biggest Perl program till date wouldn’t have been more than a 100 lines.
Here’s my raves and rants on it
- Most powerful reg ex capabilities with a full programming language to back it up!
- Large and powerful standard library.
- Platform independent. Have windoze at work, usually am on a cygwin console and have linux/windows dual boot at home. Perl doesn’t complain!
- Syntax – I’ve never got used to the ultra concise Perl vars. But then, I dont use it regularly enough. Still, the syntax just isnt readable.
- Syntax isn’t orthogonal – guess what I’m trying to say is that there isn’t one and only one way to achieve something. While this is totally
against the Perl mantra of “There’s more than one way to do it”, in spite of using it on and off, I’ve never been able to embrace
- OO Perl
- Writing perl mods
I’ve used all of them at sometime or the other but the next time I pick up Perl to do some nifty little script, I find myself going through perlsub, perlref, perlreftut and perltoot – not nice!
I guess at sometime I did come across Python – which is supposed to address all the shortcomings of Perl while retaining the pluses. But then once I got everything set up, saw that its indentation sensitive!! Now does that remind me of something….called FORTRAN ??
Anyway, it put me off so much that I never took a look at it again – probably I should, and be more generous while at it!
Meanwhile, I’ll use Perl the next time I need to write a nifty little script to do some text analysis.
Interested? – I’ll recommend Robert’s perl tutorial.
Programmer: n. Person who spends 10 hours automating something that takes an hour manually just so that
- He can see his program complete the work in 1 hour.
- He can tell his poor kith and kin what a great guy he is.
So I managed to get myself a gmail account – raghu dot rajagopalan at gmail dot com . And I love google groups access. However, wanted to know if there is some way where my posts don’t show my email address.
Have posted a query to google feedback – will let you know if something comes of it.
Meanwhile have started looking at NUnitForms – have to try out some code to see if it’s as nice as nunit. If any of you have tried it out, please do post your suggestions and feedback on the tool.
On an aside, with console driven tools (nant, nunit etc) gaining popularity, I find myself running the cmd.exe a lot more. I’ve been a long time (> 2 years) fan of cygwin for running bash and other *nix tools on windows and it certainly helps that I can run all .net command line tools from there. However, it does have its wrinkles – it recognizes only unix style paths and this sometimes gets me into trouble. So for that I have to resort to cmd.exe – where I’ve always missed tab completion for files and folders. Found a couple of tweaks that get you *nix behavior on windows:
- Command prompt in the context menu in Explorer (win 2000)
- Open explorer
- Tools->Folder Options ->File Types
- Type n in the list boxand navigate to ‘Folder’ item
- Click Advanced in the bottom frame. An Edit File Type window pops up.
- Click New – and in the Action Box, enter Command Prompt. In the Application Box, enter “cmd.exe”.
- Close all windows and restart explorer. You should have a new context menu for folder items called “Command Prompt”
- Tab completion as in *nix.
- Open the registry with Regedit.
- Navigate to the key
- Set the values for CompletionChar and PathCompletionChar to 0×09
[You can download power toys for various windows versions for this behavior, but I like to do it without yet another download]
Havent really been active on the blog – kind of ignored it till now. Anyway, I’m back, fwiw. There’s been quite a lot of changes here and I guess that’s the thing that’s kept me from blogging – add to it the fact that I’m new to maintaining a journal on the web.
These days am looking for some generous person to invite me to Gmail.
Haven’t really done much on the programming front – other than digging around to find out if I can launch an executable on the client from a web page without the warning pop ups.
Read KB 232077 on MSDN for a solution using cab files.