Matt Gerrans
Posts: 1153
Nickname: matt
Registered: Feb, 2002
|
|
Re: i need an answer for this please
|
Posted: Sep 20, 2003 11:01 PM
|
|
When I first learned Perl it was a bit of a labor, because it just seemed to often be quiky, complicated and arbitrary. Later, whenever I wanted to write a Perl script, I could never remember the syntax and always had to find a book or reference. Or just give up and write the thing in another language. I kept thinking I should stick with it, because it was so popular and people were always touting it as so powerful. And it is. I just couldn't get comfortable with it. And of course, whenever I look Perl code, it is completely incomprehensible (even if I wrote it).
Since I was working mainly on the Windows platform and it was begining to look like WSH (Windows Script Host) was going to be "the thing" there (such as always being pre-installed, having easy access to COM automation objects and Windows Management Instrumentation), I resigned myself to JScript. Even though I learned VB in its early days (keeping abreast version 1 - 5, or so), I just couldn't stomach that synatx (in VBScript) any more than necessary (unfortunately, since the MSDN examples are predominantly VBS instead of JS, it is much more necessary than I'd like). However, JScript is very hard to write well and very hard to debug. It is also very verbose; often things that seem like pretty simple tasks take pages and pages of code.
Then I discovered Python. It was such a breeze to learn. Everything seemed to be done in a straight-forward and simple way. Often, while learning it, I'd be thinking "it sure would be nifty if it could do x, or if it worked like y" only to find that to be the case a few pages later. I loved the idea of using indentation as the demarcation of code blocks; some people complain that it seems unusual, but what's wrong with that? Most good ideas do, at first. I thought it was brilliant when I first saw it: good code is always properly indented, so why not use that information and, at the same time, enforce good indentation style in all code? Python code manages to be quite concise (like Perl) and yet very readable (unlike Perl). Python is exceptionally good at text processing, so even while I'm usually working on C++, Java, or (currently) C# projects, I still use a lot of Python for code generation, project maintenance and miscellaeous tasks.
About a year or so later, even before reading The Pragmatic Programmer, I heard about Ruby. I studied it for a while and it had some nifty features, but it was unable to unseat Python as my favorite scripting language. I like Python syntax better than Ruby (which reminds me a little of VB syntax in some ways) and Python now has such incredible library support that one of Ruby's best features is the fact that it can import Python libraries. If it were not for Python, Ruby would probably be my scripting language of choice.
Anyhow, I think that answers the question: I would recommend Python. However, I think the more you know, the better, so I would encourage you to learn both: First learn Python -- I bet it will take much less time than you expect. Then you'll have time left over to learn Ruby!
|
|