Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Perl Advocacy w.r.t Teaching

by moot (Chaplain)
on Feb 10, 2005 at 02:53 UTC ( #429572=perlmeditation: print w/replies, xml ) Need Help??

A friend's high-school age son has an interest in becoming a (games) programmer. He's taken a VB class (at school) and this semester will be taking java (also at school). Naturally, I told him he should learn perl either instead of or along with java, and since his teachers haven't heard of perl, he is learning it outside school on his own time.

I'd be interested to hear of any monks' adventures with introducing perl into schools, particularly with regard to overcoming school board resistance. Also of any experience with perl as a teaching language specifically - what are your thoughts concerning using perl to learn to program, vs learning to program with perl? Coming from a C background myself I am unable to evaluate the merits of perl as a first language. Ideally I'd like to start the boy down the right path before he becomes too entrenched in the java way of things.

This is a private school, so I don't have to worry about meeting local or national curriculum requirements.

Replies are listed 'Best First'.
Re: Perl Advocacy w.r.t Teaching
by fireartist (Chaplain) on Feb 10, 2005 at 09:33 UTC

    If he wants to become a games programmer, why did you advise him to learn Perl?

    I think in order of importance, C++, C# then java, would be better advice.

      I agree with fireartist, perl don't run on playstation.
      Some universities run games programming courses usally based around platform specific development environments. What part of games do they want to program? a few physics or AI lessons might be handy

      If it is just a grounding required then good programming is largely language independent and pseudo code will probably sufffice.

      Being entrenched in a perl way of doing things is no better than being entrenched in a java one

      I put games in parentheses because he's not really sure if that is what he wants to do, he just knows it will be something involving programming. Plus, perl is accessible and (IMO) easy to learn; also it lets you get fairly close to the metal at times whilst shielding you from some of the nastier aspects of programming (memory management, e.g.)

      Also if you read my post I was interested in opinions of it as a language to teach programming with, which (again, IMO) is something at which it excels.

        I did read your post, I just didn't respond to that part!

        Have a super search for school, first language, learning, etc. There's been loads of discussions about this already.

        Without commenting on Perl's suitablility, I think you should consider the computing teachers' opinions/resistance more than the school board's. Can the teacher program Perl? Does she already have opinions regarding it? Would she be willing to learn it? If you're considering offering to teach an extracurricular class, are you a good instructor/teacher? Would you have the support of the current teacher?

        Sorry for throwing off so many questions, but I think there's many issues to consider if you're serious about this.

        I don't really feel qualified to comment on Perl's suitability for teaching. I've never studied CS, though would like to. I did a little BASIC at school, then a little javascript and php hacking. Perl was the first language I learnt/used to any extent.

Re: Perl Advocacy w.r.t Teaching
by samizdat (Vicar) on Feb 10, 2005 at 15:54 UTC
    Over the last few years, I've spent time each week in a local middle-school classroom. (See article here) I've also mentored high- and engineering-school kids in various ways. My experience has been that kids today don't get much exposure to computers except that involving waving a mouse. They get to be quite good at creating PowerPoint presentations, but they're clueless about how the computer gets there. <RANT>This has a lot to do with the sad state of teaching as well as the overarching goal of schools to turn out nicely conforming cattle.</RANT>

    But, to your question. Perl has an easy entry curve, even though a steep back-end learning curve. As an interpreted language, it's easier to grasp than C or C++. It's also a heckofalot easier to set up Perl on a BSD/Linux machine than it is to set up Java.

    I'd suggest something a bit different. Start with shell scripting! Teach kids to control their machine and their environment first, like how to insert cron jobs and .profile customizations. I'd also look into one of the little programmable microcontroller development kits. When I was a high school kid, the thing that fired my imagination was a class that used a little interpreted "assembly language" that was implemented on an IBM 360. We had to punch card decks to get at it, but the concepts of how to work the hardware directly really fired me up.

    Next, load up Blender3D. Understanding graphics and the embedded Python language that drives its animation will allow the boy to get a feel for what's involved in gaming. It's the only thing I've ever used Python for, and I have to admit it's waaaay cooool.

    "The right path" is to get him started. The key then is not to lead, but to get him to become self-starting. That's the critical issue in all of education, and it's the one thing schools (and television) are destroying.
Re: Perl Advocacy w.r.t Teaching
by Anonymous Monk on Feb 10, 2005 at 12:18 UTC
    Why did you tell him he should learn Perl? I don't get the impression Perl is used a lot in the games industry. Running speed is quite important for many of todays popular games, and Perl isn't suitable to get the best running times. Perl favours development time - but in games, the trade off between runtime and development time lies more towards runtime.

    As for Perl used to learn programming with - I don't think it's a suitable language. One doesn't use supercars or trucks to learn driving with - nor does one learn flying in an F16.

    Perl is a rich language. It has many operators, functions and syntax constructs. And while that's good for many programmers, it distracts when teaching programming.

    Look at the Wolf book (Mastering Algorithms with Perl). It suffers from the same problem. It tries to teach algorithms, but instead of focussing on the algorithms, time and time again, it takes detours to explain syntax, or to show a neat trick.

    I've taught students how to program. I've taught Perl as well. I wouldn't dream of using Perl to learn people to program. Pascal, Java, Python, Modula, Haskell, all languages suitable as a first language. But not Perl.

      Running speed is quite important for many of todays popular games, and Perl isn't suitable to get the best running times.

      Not as much as you'd think. The heaviest processing (graphics) is often done by the OpenGL library or a special language (like Cg), which offloads the work onto the GPU. Any language that can interface with OpenGL will work.

      Try loading up a 3D-heavy modern game and keep track of your CPU load. I often see my CPU at 20-50% usage, because all the real work is being done on the GPU.

      This will likely be more irrelevent as multi-core CPUs are introduced into the mainstream, since high-level languages often make it easier to take advantage of concurrent processes.

      "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Re: Perl Advocacy w.r.t Teaching
by hardburn (Abbot) on Feb 10, 2005 at 14:11 UTC

    I've heard that many games are using Python for much of their code. Python is also one of the best languages for teaching.

    Perl, C/C++, Java, and VB (in no particular order) are the last languages I would use for teaching programming. The fact that most undergrad CS courses teach primarily in one of those langauges should tell you something about the quality of undergrad CS.

    "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

      Should it tell me something about the quality of undergrad CS? It's not. It is, however, telling me something of the priorities of undergrad CS. (This goes to the OP's question, too.)

      The priority is to cater to their clients: the students. And the students usually don't care so much about the language as they do the ability to get a job afterwards. And this means C/C++, Java, and/or VB. If employers change their demands, the universities will definitely change their courses to follow.

      There are always some professors in some universities who are more concerned with teaching some purist programming goals than the employability of their students. Or they think that pure CS ideals are employable (and I've had a job where that is true - although they still used primarily C++ in as pure OO fashion as allowed by that language). These professors use Pascal, Python, Turing, or whatever they think is the purest language for teaching the subject matter. Perl doesn't even make the long list here, nevermind the short list, because Perl enforces almost nothing on the programmer, which is definitely not pure CS theory.

      Update: Added "usually" to the second paragraph.

        Take something like a data structure course. Data structures are completely independent of language. A rather lot of CS offerings do their data structure course in Java. Why? Java is the last language I'd use for teaching data structures, because you'll be forced to view all your data through the eyes of an object. OO is not useful for learning data structures, and will likely get in the way. Not only is Java a not good language for this task, it's an outright bad one, since the point is to learn data structures, not Java's obtuse way of implementing data structures. C would be a much better (though still not perfect) language choice, and LISP is probably better still. Leave Java for a Java class, if you must.

        If I'm going to take a Computer Science major, I actually want some Science (or rather, research). If it's going to be about making applications, then it should be called "Software Engineering" or somesuch. Something to make it clear that the goal is practical applications, not research and theory.

        "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Re: Perl Advocacy w.r.t Teaching
by bwelch (Curate) on Feb 10, 2005 at 17:12 UTC
    If the goal is to support his interest in becoming a game programmer, I'd first recommend forgetting about the school program. Unless he's lucky enough to have a supportive teacher, trying to influence the school's courses is likely to be difficult.

    Instead, find other routes to support the interest. Computer clubs, lan parties, community college courses, and local universities all could prove to be great sources of both contacts and information. Groups online (like Perl Monks) could also prove useful. Between forums and private IRC groups, my son has found great groups of people to help with questions regarding linux, PC hardware, graphics, and audio questions. Finding the right sources and groups can be challenging, but with effort it's possible.

Re: Perl Advocacy w.r.t Teaching
by zentara (Archbishop) on Feb 10, 2005 at 17:37 UTC
    If you want to "wet his appetite" send him to SDL which is a C library with alot of enthusiasts. There are Perl bindings to this library at sdl-perl

    Of course don't forget to mention the coolest perl-sdl game ever put out....Frozen Bubble P.S. Unfortunately, Frozen Bubble dosn't work with the latest version of SDL, but links to the older version are on the website.

    I'm not really a human, but I play one on earth. flash japh
Re: Perl Advocacy w.r.t Teaching
by Ytrew (Pilgrim) on Feb 11, 2005 at 07:02 UTC
    Perhaps, try to find out more about what the boy wants. Find out what kind of games he wants to make, and why. Does he want to learn programming in specific? Is he more interested in the graphics design elements? Does he just want to do "something cool" with computers? How much do the looks of the game matter to him? The gameplay design? What kind of games does he like to play?

    There orders of magnitude difference between coding up, say, a simple text adventure, and developing a robust interactive movie.

    It's harder for kids to make "something cool" these days, because the bar is a lot higher. When I was a kid, just making one coloured square chase another coloured square around was enough for a primitive game. I coded it in BASIC on my TRS-80 one afternoon, and it was vaguely amusing. Today, I doubt it would count as a "real game" to most kids. The average game they play today has several man/years of development time, and artists, musicians, and other trained specialist contributing. Making a custom version of "pong" may not cut it, these days.

    On the other hand, if he's just in it for a programming excercise, any game will do. My sugestion is that you find out more about what the boy wants to learn, then teach it to him, using whatever language seems most suited to the application and to the boy.

    Good luck!

    Ytrew Q. Uiop

Re: Perl Advocacy w.r.t Teaching
by zentara (Archbishop) on Feb 10, 2005 at 16:12 UTC
    First, running Perl on Windows is a PITA. Just to compile a module with a XS component is a major hassle. Everything works so much better on Linux, so your first priority should be to get the school to switch to Linux ( or a variant). That way you get free, easy to use C and C++ compilers, then Perl just naturally falls into place.

    As far as Perl being taught as a first language, the concensus amoung the "professionals" is it is not good, because it uses alot of "shortcuts" to make things easy; and a beginner will assume that those are standard methods in programming.

    I, on the other hand, am a 'big-picture person'. I like to get results, then if needed, delve into the details. So I say Perl is the IDEAL first language, because the student will get "immediate gratification" that he/she can do something useful with a program, besides adding 2 + 2. Within a few months, a students can be connecting to email servers, writing Tk gui's, and all the other cool stuff they want to do.

    Then, when they start asking about "speed", you introduce them to C. Then they are off to a good start, because you gave them a language Perl, which they can take with them the rest of their lives to write simple useful scripts. Plus Perl closely parallels C, with it's inner workings, as far as system innards are concerned, so they get an "easy to use" head start into systems programming.

    So "linux, Perl,C" is the way to create a generation of students to compete with the people in India. Otherwise, the US is going to fall behind the rest of the world, who are dumping Windows as fast as they can, and moving forward on solid ground with Unix variants.

    Anyone can install and use Windows at home if they want, but it is a dirt poor system to train programmers on. On the other hand, MSWindows makes it easy to spy on people, so maybe the government and schools have a "secret agenda" in pushing it.

    I'm not really a human, but I play one on earth. flash japh
      First, running Perl on Windows is a PITA. Just to compile a module with a XS component is a major hassle. Everything works so much better on Linux, so your first priority should be to get the school to switch to Linux ( or a variant). That way you get free, easy to use C and C++ compilers, then Perl just naturally falls into place.
      Well, that would disqualify Perl right from the start. I'd say any language that would require you to switch OS would be totally unsuitable for teaching. It's like saying "I'd like to learn how to cook" and getting a response "Sure. Cooking on electric is such a PITA, so your first priority should be to get a gas stove."
        Pity the poor trusting students.

        I'm not really a human, but I play one on earth. flash japh

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://429572]
Approved by neniro
[ambrus]: 1nickt: in theory, it shouldn't hurt the electronics, but also could temporarily cause problems until it dries, and the inside of the keyboard doesn't dry quickly, because it's closed.
[ambrus]: 1nickt: that's the theory. the theory is also that it should have dried by Sunday morning, but it didn't. so I dunno.
[ambrus]: I'll try today evening if it works now.

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2017-11-21 14:45 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (302 votes). Check out past polls.