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


by Ozyark (Initiate)
on Jan 07, 2001 at 05:42 UTC ( #50304=perlmeditation: print w/replies, xml ) Need Help??

Some thoughts on learning a new programming language, for me anyway:
Motivation (i wanted to make my own game, and i needed to find a way to save the player "stats")

Simalarity to a preknown language (PERL is close to Javascript and Basic) A good Book (im using one from QUE) A place to test scripts (I STILL dont have a good one...)

There can be good. There can be evil. There can be money. There can even be recounts. But nothing can be greater than the power of ........ CHEESE!

Replies are listed 'Best First'.
(jeffa) Re: Learning
by jeffa (Bishop) on Jan 07, 2001 at 07:17 UTC
    You are on the right track, but you are falling a little short. Perl is about as similar to Javascript as a Ford is to a Chevy, and is about as similar to BASIC as a Ford is to an airplane.

    In a perfect world where time is not an issue, the best way to pick up a new language is to really understand what a language is in general. Then you don't have to waste time memorizing the syntax. The only exception I can think of are languages that require you to think in a new way, such as Lisp and Scheme.

    If you get the chance, take a compiler course. Understand how to create a language, write code that recognizes syntactical words, write code that makes sense out of the order of those words/symbols, then translate that language into the neccessary machine code that actually moves them 1's and 0's around. If you have the time that is.

    As for books, read as much as you can. Then go back and read some more - go back over the basics again and again until you code in your dreams. O'reilly and Addison-Wesley make some of the best around, IMHO.


    (the triplet paradiddle)
Re: Learning
by davorg (Chancellor) on Jan 07, 2001 at 17:15 UTC
    Simalarity to a preknown language (PERL is close to Javascript and Basic)

    Er... no. not really. Perl (never PERL) has its root in C, shell scripting, sed and awk. It's not very similar at all to Javascript or BASIC.

    A good Book (im using one from QUE)

    If you gave use the title then we could give you opinions on you book. There are a number of Perl books out there and 90% of them are rubbish. To learn Perl the best books are probably Learning Perl, Perl: The Programmers Companion or Elements of Programming with Perl.

    A place to test scripts (I STILL dont have a good one...)

    What's wrong with the system that you posted this message from? Perl runs on just about any platform. There's even a pre-built binary version for many of them (including Windows). If you're testing CGI scripts, then Apache is the best web server and that is also available free for just about any platform.


    "Perl makes the fun jobs fun
    and the boring jobs bearable" - me

Re: Learning
by lemming (Priest) on Jan 07, 2001 at 08:56 UTC
    I think jeffa addressed some issues. If you have a system, you can test most Perl scripts rather effectively.

    Now while I think the power of a good Mascarpone can beat most Javascripts and even Velveeta can meet a Word Macro; It takes a high quality Stilton to even come close to Perl. Though Stilton isn't as versatile as Perl. It's more like a Cheddar that can be placed in many settings and has enough variations. From the mild chedder to be put on a simple grilled cheese sanwich, to the state dinner with a sharp cheese sauce on the side. THWACK!

    Sorry for the violence, but I couldn't let him continue typing
Re: Learning (cheese?)
by ybiC (Prior) on Jan 07, 2001 at 09:16 UTC
    "CHEESE" ?!

    Is that you, Petruchio, under that rubber Ozyark mask?   ;^D
        ducking and running
        (it's pronounced "why-bick")

      Stop it.

      We all know you're really princepawn.

      We all know ybiC really stands for "your brother in Cheese".

      We all know you're an advance scout for the troll hordes, sent to find weaknesses in our monastery.

      Just stop it.

      We're on to you.

      Stop it.

Re: Learning
by Coyote (Deacon) on Jan 07, 2001 at 12:02 UTC
    I think you are right on track on the motivation issue. The most important thing for me is having an interesting problem to solve.

    I have mixed feelings about the usefulness of knowing a "similar" language. Understanding the basics of another programming language will acellerate your education in perl, but you will also bring some bagage from that other language with you. For example, how would you find an instance of a character pattern within a string in BASIC? Or C? or Pascal? Now are any of these approaches the best way to do it in perl? Of course the beauty of perl is that you can take almost any approach you want to solve a given problem. TIMTOWTDI! Rather than knowing a simliar language to perl you may be better off knowing many languages that are not like perl.

    ---- Coyote (aka: Rich Anderson)

      Rather than knowing a simliar language to perl you may be better off knowing many languages that are not like perl.

      There are languages that *aren't* like Perl!?


        Well, ultimately, any language that can implement a Turing machine could be said to be "like" Perl.

        But it's pretty easy to define some higher level categories of languages and Perl won't fall into all of the categories. For example, Perl very quickly decategorizes away from Prolog. And depending on how you slice it, I suppose Perl isn't all that much like Smalltalk, or Lisp, or Icon.

        That's not to say you can't borrow knowledge of problem-solving from these languages. That's more to say that you can't as easily just take a program written in one of those languages and implement it in the same number of lines of Perl with a high correlation between the lines, as you can say with C or Pascal.

        It's too early in the morning for me to recall the "big 4" breakdown... I'm sure tilly will chime in. Something like "functional", "declarative", "procedural", blah blah. (Ahh yes, a Super Search yields Why I like functional programming, go see.)

        -- Randal L. Schwartz, Perl hacker

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://50304]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2023-02-01 03:52 GMT
Find Nodes?
    Voting Booth?

    No recent polls found