http://www.perlmonks.org?node_id=82238


in reply to Delving Deeper into the World of Programming

For those of you without computer science degrees, how did you become experts at programming? Was it through the applied use of a programming language or through the study of more abstract programming theory, or a little bit of both?
Same way you get to Carnegie Hall. "Practice, Practice, Practice."

But yes, to answer your question, "yes". I spent most of my time faced with a programming problem in front of me, and a stack of manuals to my side. Nothing like a paycheck to motivate you to solve problems in your programming.

But in the "off hours", I also spent hours and hours just reading code. I can't emphasize this point enough. Get all the code you can already written in the language you wish to learn. And in languages you don't know yet.

What happens over time is that the "rhythm" of the language starts pounding inside your head. And then you start noticing that "rhythms" from one language can be reused in another, as long as they're from common families.

If the reference manual is like the dictionary, existing code is where you learn the "idioms". How do people typically write a subroutine call? Where does argument parsing get placed? How do you handle errors? What are hashes commonly called, and why? This is makes someone fluent in the language.

For example, the Schwartzian Transform was nothing more than an idiom I had learned in LISP, recoded to Perl. That's why I was able to hack it up in a few minutes in response to a question in CLPM, and nearly without even thinking about it, because I already had thought about it when I was first playing with list processing.

And then comes along a tool like YACC, where I'm puzzled about what the term "LALR(1) Grammar" means. So I do grab theory books from time to time, and learn just enough to be dangerous. {grin} But what I learned there applied a lot to Parse::RecDescent, and I end up already writing columns using it within a short time of being exposed. Because I'm reusing the patterns in my head. The idioms of the languages.

-- Randal L. Schwartz, Perl hacker

  • Comment on Re: Delving Deeper into the World of Programming

Replies are listed 'Best First'.
Re: Re: Delving Deeper into the World of Programming
by nysus (Parson) on May 22, 2001 at 19:06 UTC
    Your words reinforce my thoughts on how closely programming and language (spoken and written) are related. I'm sure that's a topic quite a few books have been written on already.

    I will definitely take your advice to read other people's code. It's something I haven't been doing much of. Thanks.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar";
    $nysus = $PM . $MCF;