I came to Perl from a long C background, so most of the syntax wasn't the issue. It was the regular expressions that I had only touched on in UN*X that was my stumbling block (and many others' since they look foreboding and yet are a godsend). Now I love them, but it took me a lot of "tough loving" to beat them into my skull.

Usually when people ask me how to get into programming, I tell them to use Python. It's a great prototyping language with similar syntax to several other common languages. It has the same logic structures and (this is the key) forces good formatting habits. It is also easy to convert Python to C code as long as you make sure that you use options that are native to both languages.

We've all dealt with bad style, and I truly believe it comes from never being taught good readable style in the first place. By forcing them to tab their logic, it teaches them readability, which is extremely important as they move to other languages without strict rules of style.

Once they have a sense of readability, they can adopt their style to the language as they read others code and find what feels natural. Then, perhaps, their code won't look obfuscated on accident.

In reality, any language can be learned first, but I like to advocate Python because I feel that they will become better programmers in the long-run. Many languages give programmers the freedom to get set in their ways before they know what their ways are, and that is a problem.


In reply to Re: Re: Re: Re: How did you learn Perl? by iamnothing
in thread How did you learn Perl? by venimfrogtongue

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.