Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Programming Languages

by sstevens (Scribe)
on Aug 15, 2008 at 03:29 UTC ( #704470=perlmeditation: print w/replies, xml ) Need Help??

I've only been programming for < 10 years now. Perl was the first language I learned, and I was taught how to write sloppy, inefficient, illegible programs. Later on in school I learned Java, C, Scheme, etc. I really enjoyed learning different languages and playing with their different strengths. I really liked Scheme -- I read all of Paul Graham's essays and got his book, On Lisp (although I never got around to reading it). I eventually got back to Perl, incorporating everything I had learned about style, etc.

I recently got interested in Lisp again and spent a solid week reading Practical Common Lisp and getting my server setup with mod_lisp and Hunchentoot. I was really enjoying the power of macros (although I can only write simple ones), the style of the language and REPL. However, getting everything setup was extremely painful. More painful than anything I've ever done in Perl. Once I started actually writing an application, I found myself fighting with the language at every turn. Granted, I know this is because my mind hasn't been formed to work the way it needs to work in order to experience Lisp magic, but it was still very frustrating. The whole reason I delved into the language was:
  • To build things quickly, and
  • I just like the style
It had taken me such a long time to get the server setup, and now I was struggling just writing a simple application. In addition, I still didn't have everything working smoothly in regards to Hunchentoot starting automatically when the server boots up, handling multiple domains, etc.

At that point I was very frustrated and thought maybe there's some other language I should be looking at. I had played with Ruby on Rails before, and it was pretty neat. I just don't really like the Rails framework. It seems like there's a lot of overhead and you need to really dig deep to find out what's going on under the hood. I've also played with Python, which I liked. After playing with it more, I decided that I actually love Perl.
  • I can get things done in Perl quickly and painlessly (relatively speaking).
  • Perl has a great community of people willing to help with your problems.
  • There are 6 kagillion well-documented modules on CPAN to make your life easier.
Although I use quite a few CPAN modules, I'm sure I've written my own code to accomplish a task that someone else has solved and put on CPAN (and most likely a more efficient version, as well). For instance, I learned to save databases as delimited text files. This is fine, I think, for small databases. However, using Class::DBI and Class::DBI::AbstractSearch has made my life SO much easier.

I'm so grateful for the monastery, the monks, and the time they spend doing such great things as writing tutorials.

There really isn't any point to this rant. Maybe I'll find this in a couple years when I feel like I need to switch to another language, and I'll not waste my time.

Replies are listed 'Best First'.
Re: Programming Languages
by Lawliet (Curate) on Aug 15, 2008 at 05:47 UTC

    Very inspiring node, sstevens. It really made me think about my own experiences. I have been programming for two years (at most) with Perl being my first and only language. Of course, the first year was spent adapting my mind to Perl (no kidding, when I first picked up the language I had a hard time grasping why newline characters went inside the quotes, among other things). I have tried to get into python because it seems like a really fun and efficient language to program with but my attempts are fruitless. I always come back to the familiar; superior; Perl.

    I wonder what would have happened if I learned another language first. Would I always revert back to that, or is it just Perl is so much easier?

    Perl is like an extension of my own mind, and I cannot wait to learn more.</corny>

    I'm so adjective, I verb nouns!

    chomp; # nom nom nom

      Perl is like an extension of my own mind, and I cannot wait to learn more.

      Same here... even though Perl was my 6th or so ;)

      ++ but do learn another language or more. Preferably, learn something less like Perl than Python. It helps you as a programmer if you can see how to tackle problems in more than one way instead of just in more than one syntax.

      Scheme and Common Lisp are relatively popular choices. They lend themselves to approaches that can be useful in Perl, but which are different from the approaches of people more comfortable with C or Pascal descended (ultimately Algol descended) languages. Haskell, Prolog, Smalltalk, Postscript, Erlang, and Forth would be good options, too.

      There is a middle ground, too. There are other languages more like Perl in many ways than those mentioned in the previous paragraph which are still more distantly related than Python or Ruby. JavaScript, Ada, Fortran, and Lua are some with lots of documentation and source code out there. A+, HaXe, or hundreds (thousands) of other languages have been created and see some use, but are not necessarily groundbreaking in and of themselves.

      Some languages are mostly for playing with the concept of a programming language and implementing something in an unusual way. These aren't really useful, in general, for writing real software. They can be a fun learning experience, though. It's probably best to learn a few languages before playing with them, though. Unlambda, Intercal, Path, Dis, and Befunge are examples. Unfortunately, m4 and TECO's command mode appear to be examples in this set but are not. ;-)

        Lisp and Ruby were my next choices. The only thing is that I do not want to risk forgetting all the small helpful shortcuts and secrets Perl offers whilst learning another language.

        I'm so adjective, I verb nouns!

        chomp; # nom nom nom

Re: Programming Languages
by samtregar (Abbot) on Aug 16, 2008 at 17:24 UTC
    There really isn't any point to this rant. Maybe I'll find this in a couple years when I feel like I need to switch to another language, and I'll not waste my time.

    I think the key is to wait for a problem that you can't easily solve in Perl, or that you can solve more easily in another language. Switching to LISP for web development is just going to make LISP look bad - Perl definitely has that problem licked.

    I was in favor of switching to Erlang for a project at a prior job. Erlang isn't a better general-purpose language than Perl, not even close (thank you CPAN!). But it does offer really convenient distributed, fault-tolerant multi-processing. The next time I'm working on a parallel-processing server with high up-time requirements I'll be tempted again. It's certainly do-able with Perl but you pretty much have to roll it from scratch.

    Similarly, if anyone ever asks you to write a client side GUI (and you can't talk them out of it), I think you'd be foolish to do it with Perl. Sure, it can be done but it won't be easy. Switching to something built for the task - Java, C#, Air, etc - is probably worth the effort.

    I guess the biggest challenge to a comfortable Perl programmer is being able to realize when it's time to find a new tool. Perl can do so much so easily that we can very easily slip into thinking Perl can do everything!


Re: Programming Languages
by Joost (Canon) on Aug 16, 2008 at 00:46 UTC
    All of this sounds a lot like my experiences. On the whole, I'd lay out my conclusions like this:

    1. Common Lisp is incredibly powerful, but you'll have to write most infrastructure yourself (to be fair; lisp does make it pretty easy to do that).

    2. Ruby with Rails is great but you'll have to take the "enforced" structure with it (which is pretty good) or you'll end up at point 1, except that CL really is a more flexible language than Ruby. Neither CL or Ruby extensions are well documented in general compared to CPAN.

    3. Perl with DBIx::Class / Class::DBI and a couple of good mod_perl controller classes will give you a good start, but you'll have to choose a bunch of good CPAN modules to provide for the base of your project. Forget about integrated solutions, but the documentation is good.

Re: Programming Languages
by samizdat (Vicar) on Aug 15, 2008 at 13:29 UTC
    It sounds like you have been expecting to have magic happen, sstevens. Think about what you were trying to do. You want to have an OS set up, a webserver with an on-board embedded interpreter, AND a back-end interpreter behind that. Woof!

    Just think about it for a bit. Even with Perl, setting up multi-layer web processing systems is no kiddie project. I agree that more of the rough edges have been sanded off with Perl, at least for mainstream deployments, but you still need to have some understanding to make it happen. Let's see: you want to set up an OS you don't understand, with a webserver you don't understand, with a module you don't understand, for a language you don't know, to do something you haven't figured out yet.

    Sorry to be so rough on you -- even with > 27 years at it I STILL don't deeply understand all of the above -- but really, hubris can get you in trouble faster than anything. Larry Wall can have all the hubris in the world, because he WROTE Perl. Have you, by chance, studied the source code of any of the pieces you cavalierly tossed together? If you haven't, may I humbly suggest that you take one simple piece, like a symbolic LISP interpreter, and learn what it takes to make even that one little piece of the magic happen. There are dozens out there, even one written in Perl. Once you grok that fully, then maybe take a look at something a little more complex like the Ruby interpreter. Talk about awesome, there's some slick C code.

    Speaking of Ruby, you ding Rails, once again without taking the time to understand it. The old adage about any powerful technology being indistinguishable from magic is applicable here, but IMHO Rails is the _most_ accessible framework out there, as well as being one of the most potent. Every line of code, every single class definition, and every API is available for your inspection and is cross-indexed and documented on the Web. The only pain I encounter with Rails comes from the complexity of the Web, not from Rails itself. ANYTHING that blends HTML with Javascript with CSS with SQL with UN!X is going to be complicated, no fooling!

    Your mistake is that you equate understandable with easy. Just because you can succeed in getting a Perl-centric webserver set up with less grief, does that imply that you understand it better? Does that imply that it IS better?

    We all like to write nodes about goshwhata pearl is Perl -- I'm not immune either -- but let's go back and look at such nodes and use them to help us shore up our inadequacies. Deal? :D

    Don Wilde
    "There's more than one level to any answer."
      I didn't mean to say that anything I mentioned was bad, or that I could do a better job implementing it.

      With Lisp, I said I was fighting it because I don't have the Lisp mindset. I'm sure if I spent more time with it, I'd really grow to like it. I know that Apache, mod_lisp, Hunchentoot, and Lisp itself are especially intricate and well-engineered. I can't imagine ever being at a level to implement even a piece of what the people behind those technologies have implemented.

      I certainly did not mean to ding Rails. Far from it. When I was working with it, I was amazed at everything it does for you. I merely meant that I would rather work with something simple (again, relatively. By no means do I mean "so simple that I could do it, or that I even understand it") than use a framework like Rails (or maybe even Catalyst -- I've never played with it). I'm not saying that the MVC design pattern is stupid or overrated. I've played with it before in school and I actually think it's fan-freaking-tastic. I'm also not saying that I want to do everything myself -- if that were true, I'd have to make my own language, interpreter, OS, computer, transistor, etc.

      I never said I understand the inner workings of Perl or that Perl is better than anything else. I simply said I like it more.

      I do think Perl is a pearl. I make my living (as do most of the monks here, I'm guessing) by writing programs. Perl makes it easy for me to do that. That's all there is to it. No reading between the lines or taking this to mean that all other languages suck. Of course other people can get more done with languages other than Perl. That's fine! If I was going to make a multi-purpose robotic simulator that demonstrates a Q-Learning agent's ability to learn as it navigates and adapts to indoor and outdoor environments, I might not choose Perl as the language to write it in.
        I did read more into what you said than you intended; it just seemed to me like you hadn't put a lot of effort into understanding what was going on.

        We all stand on the shoulders of giants; be they Larry Wall or John McCarthy. It pays to remember that as we try to be worthy of their efforts. :D

        Don Wilde
        "There's more than one level to any answer."
Re: Programming Languages
by cormanaz (Chaplain) on Aug 16, 2008 at 00:16 UTC
    Well said, sstevens. I describe Perl to the unenlightened as is the Swiss Army Knife of programming languages. I have yet to find anything it can't do.

    I haven't tried Lisp. I can assure you that Perl beats the hell out of <show-age>Fortran and PL/I</show-age>. I also could not see what all the fuss is about with Ruby.

    Java snobs always sniff about how superior their language is, and how "unmaintainable" Perl is. But I find Java inscrutable because of its atomistic style with all the teeny-tiny methods scattered all over the place. Anyway if I wanted that I could do it with OO Perl. Plus declaring EVERY SINGLE THING is just plain annoying. I can prototype code in Perl in a quarter of the time it takes in Java.

    Viva la Perl! (Or is it el Perl?)


      Viva la Perl! (Or is it el Perl?)

      If you are thinking of Perl as pearl (you know, the oyster's pearl) then it would be "la". But if you are referring to the programming language Perl, it doesn't go with an article because it's a proper name.

      So it would be "Viva Perl!".

      PS: This got me thinking that, in spite of Larry thinking of Perl as one of his daughters, in spanish Perl thought as a programming language would be male because the noun "language" is male.


Re: Programming Languages
by rudder (Scribe) on Aug 16, 2008 at 02:47 UTC
    I can get things done in Perl quickly and painlessly (relatively speaking).

    I think that's one key right there. I don't want to have to work for my tools -- they should work for me. And Perl seems happy to oblige.

    Also, I agree about the community. Haven't seen its equal.

Re: Programming Languages
by PetaMem (Priest) on Aug 18, 2008 at 16:07 UTC

    LISP is certainly a mighty language but I can't stand the brackets.

    But LISP *is* useful. We would not have had The Gimp if it wasn't for Common Lisp!

    Gimp History (the first 2-3 paragraphs are sufficient)

        All Perl:   MT, NLP, NLU

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://704470]
Approved by kyle
Front-paged by Old_Gray_Bear
[runrig]: HmLk2vSXXtk
[LanX]: ... Trump Around. ... 🎶
[runrig]: Total Eclipse
[runrig]: (of the Sun)
[runrig]: Is happening now...will get to about 70% where I am

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2017-08-21 16:59 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (324 votes). Check out past polls.