Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Perl as one's first programming language

by amarquis (Curate)
on Apr 07, 2008 at 16:45 UTC ( [id://678782]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl as one's first programming language
in thread Perl as one's first programming language

(As a side note I could imagine that learning perl first "spoils" you as a programmer, i.e. you never want to miss it's dwim'miness.)

It's funny, many people in the threads linked above said that back then, too. Reminds me of the great, recent I think Perl ruined me as a programmer.

In 2002, I thought it silly. Perl is too good of a tool for the job, so start with something worse? What nonsense.

Now, though, I'm not so sure. When I learned photography, I learned with an ancient 35mm Pentax, developing my own film and printing my own prints. It was a gigantic pain! My workflow was hours longer than it is today with digital. Sometimes I'd spend a day on some rolls of film and get nothing out of it.

But, comparing myself with other amateurs who have been digital exclusive, I think I picked up many virtues. I no longer have to buy film, but I'm still careful about the composition of every single shot. I grew up without Photoshop, so I don't take shots I intend to fix later, I take the right shot now. Etc. etc.

My comparison, did my own programming become more robust because I started out with a "pain in the rear" language? Today, I think so. The real question is whether or not it was worth the aggravation, though, and I don't have an answer for that. I'm better today for my experience, but what if it turned me off of programming entirely?


On the subject of types, I do not recall which Perl-related slideshow I was watching, but one of the slides said something like:

I want static typing!
No, you don't. Remember the hell that was atoi()?

I'm sort of undecided on the issue at the moment, but the annoyance that slide made me remember tips the scale in the direction of dynamically typed languages.

Replies are listed 'Best First'.
Re^3: Perl as one's first programming language
by mr_mischief (Monsignor) on Apr 07, 2008 at 18:16 UTC
    I'm reminded of those who said that photography itself would destroy or devalue painting, or of those who said that the phonograph would destroy live music.

    There is only so much you can do with a digital camera, just as there's only so much you can do with a 35mm SLR vs. a treated copper plate in a 200mm box camera.

    There is also only so much one can wring out of Lisp, Perl, Ruby, Python, Smalltalk, ML or the other languages people say have spoiled them. Yet these tools are very useful for those looking to work quickly inside those limitations. Those who know assembly for an architecture (or who can customize the microcode for it) will always have certain advantages bought by taking on certain disadvantages.

      To use your photography analogy, I would suggest that to be a good photographer you need to have an understanding of certain basic skills which are common to painting, such as how to frame your subject for maximum effect. On top of that, you need certain domain-specific skills (a knowledge of how aperture and focal length interact, for example) and some trivial mechanical skills (which dial do I twiddle to set the shutter speed).

      To be a good painter you need the skills common to photography, plus domain-specific skills like how to mix paints and apply them accurately to the canvas, and trivial mechanical skills like how to wash brushes.

      Learning to program by learning perl will teach the trivial mechanical skills, and lots of perl-specific skills. However, if you want to learn the skills that are common to all programming, I think it's a bad choice. That's because perl does so much for you that you need to be doing really obscure or advanced stuff for that to matter so it's hard to teach them. Better to learn an assembler and C where it's much easier to learn that stuff.

      I don't mean to say that everyone should become an expert in assembler and C before tackling perl, just spend a week or two with them, so you get a basic understanding of what a variable really is, simple data structures like a linked list, how memory works, how loops and subroutines work, and so on. With those skills, the very hard problems that we claim perl makes merely difficult will be interesting instead of frustrating. Plus you'll *really* get to appreciate all that perl gives you "for free".

        I consider the fiddly bits of dealing with the machine an altogether different problem domain from designing and implementing an algorithm in a high level language.

        I think the common parts of programming can be taught in Perl without those low-level specific things getting in the way.

        Then, when you need raw performance or to bootstrap an OS or bootstrap a development environment on an OS, you can worry about the fiddly bits, which are much like specific brush strokes or mixing paints. Most painters, after all, start with pre-mixed colors and move into mixing their own paints for the best results.

Re^3: Perl as one's first programming language
by hardburn (Abbot) on Apr 07, 2008 at 19:05 UTC

    I'm not sure which slideshow the above was in, but MJD has an excelent slideshow on type systems. He argues that the problem isn't really type systems in general, but the fact that C has perpetuated a broken type system, and that languages exist that do it much, much better.


    "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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://678782]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-03-29 02:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found