Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Begin Your Skyscraper

by perl.j (Pilgrim)
on Aug 10, 2011 at 18:26 UTC ( [id://919713]=perlmeditation: print w/replies, xml ) Need Help??

Perl is powerful. The hardest part of learning of it's powers is starting off, or "Laying Your Foundations". But after that, you can learn Perl's true power, and Begin Your Skyscraper.

MY TIPS TO LEARNING PERL (SECOND)

1) Learn references. References are an extremely powerful tool in Perl. To learn more about references, see perlreftut and perlref in the Perldocs.

2) Perl/Tk. Possibly the most widely known GUI for Perl, this is a very useful tool. It makes Perl fun(ner)! To learn Perl/TK, I would refer you to the book Learning Perl/Tk and then Mastering Perl/Tk. I will also refer you to my tutorial.

3) Keep practicing. Reading a book teaches you to program Perl, but practicing makes you a Perl Programmer.

4) Read the source code for Perl Modules. This is a GREAT way to learn. By reading the source code, you are looking at all of the features of the module, and how far it can really go. Even better, read the source code for Perl itself (although that may be really hard if you don't know C since Perl is partially written in C).

5) Look through all of the programs you have written so far. See what you can fix, what you can do better, and what you did better before (hopefully you excelled and have not gotten worse).

6) Finally, keep up with Perl. I know it may be kind of hard, but it can help you use all that Perl has to offer. Also, make sure your Perl version is up to date (or at least almost up to date) so that everything is compatible.

--perl.j

Replies are listed 'Best First'.
Re: Begin Your Skyscraper
by JavaFan (Canon) on Aug 11, 2011 at 08:22 UTC
    Perl/Tk. Possibly the most widely known GUI for Perl
    Really? And you know this because the number of Perl/Tk questions outnumber the number of web questions asked on Perlmonks? I think nowadays there's only one GUI that dominates the Perl world, and it's HTML/CSS/javascript.
    Even better, read the source code for Perl itself (although that may be really hard if you don't know C since Perl is partially written in C).
    Muhahaha. You're right that Perl is only partially written in C, it's mostly written in C-preprocessor macros. But reading the perl source code to make you a better Perl programmer is like saying that reading the DNA sequence of roses makes you a better gardener.
    By reading the source code, you are looking at all of the features of the module, and how far it can really go
    Really? How does that work? Most modules could "go" much further than they are going, but how do you determine how far it could "go"?
    Finally, keep up with Perl. I know it may be kind of hard, but it can help you use all that Perl has to offer. Also, make sure your Perl version is up to date (or at least almost up to date) so that everything is compatible.
    I doubt so. Tell me, which language features did 5.12 and 5.14 introduce that makes one a much better programmer? Heck, one could even ask that about 5.8 and 5.10. Surely you aren't thinking that using (*MARK) inside a regexp, or smart matching makes you a better programmer?

      Really? And you know this because the number of Perl/Tk questions outnumber the number of web questions asked on Perlmonks? I think nowadays there's only one GUI that dominates the Perl world, and it's HTML/CSS/javascript.

      That being said, the few times I've needed a pure desktop GUI, Tk was the best I found. It's old and primitive, but it works with minimal headaches on pretty much every platform you can think of.


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

        It's old and primitive, but it works with minimal headaches on pretty much every platform you can think of
        Platforms I immediately think of: the web browser, tablets, smart phones, JVM. Granted, Perl doesn't run on them either (but that's something Jesse would like to see fixed), but thinking "pretty much every platform you can think of" are Windows/Linux/Other Unix/Mac OSses running their GUIs is very 1990s. The world has moved on. "Platform" nowadays is so much more.

        I don't know any platform that runs Perl/Tk, but doesn't run a graphical web browser. But I bet I'll see dozens of platforms fully capable of running web browsers, but not Perl/Tk in my walk from the office to the train station.

      Aww, come on, smart matching has to make you smart. Why else would they call it that...

      Often I wish I had chosen Gtk2 to do my program, but one thing that seems obvious to me is that not everything can be done with HTML/CSS/Javascript, sometimes you really need a full featured user interface and Tk is probably the easiest one if not the most reliable.
Re: Begin Your Skyscraper
by scorpio17 (Canon) on Aug 11, 2011 at 15:15 UTC
    You should also consider wxPerl. I like it much better than Perl/Tk - BUT, I also do a lot of C++ programming using wxWidgets, so I'm pretty familiar with the wx widget library. One issue, for example, is that Tk looks like Tk everywhere. wxWidgets uses the native GUI elements for whichever environment you're running on (so on windows, it looks more like a native windows app, etc.). Having said all that, I usually make everything into a webapp, then use the browser as my GUI.

      I'd absolutely not proclaim Wx to be better than Tk. They both serve a different public, both in end-user as in developer.

      I myself don't like Wx at all: I cannot get all the needed dependencies to compile/test/run on the operating systems I need a GUI on: HP-UX, AIX are amongst them. Tk builds out of the box: no dependencies needed whatsoever.

      I can have a small application up and running in Tk within minutes. And it looks nice. At least nice enough for the purpose. With Wx I need a whole lot more time for the design, and even then - to my eyes - it doesn't even look "better". If GUI/functionality compose time in Tk is estimated to 30/60 percent of my precious time, in Wx I'm likely to go to 80/20 percent. And I don't like Wx' documentation nor the overly complex OO style.

      I really absolutely do not care about the fact that you can make your GUI app look "native" with Wx. Most people indeed say that Wx is "beautiful", and that Tk is (butt) ugly. I do not agree at all, but that is a personal opinion. The fact that Tk looks like Tk everywhere is a pré!

      So "better" totally depends on what you want to achieve, and if it is possible at all.


      Enjoy, Have FUN! H.Merijn
        I didn't say wxPerl was "better" than Perl/Tk... I said I like it better. On most linux distributions, installation is as easy as "apt-get install wxperl". For windows, there are pre-built binaries available here:
        http://www.wxperl.co.uk/
        There are tools, like wxGlade, that make building your GUI a mostly drag-n-drop exercise. So, it is also possible to have a small app up and running in minutes with wxPerl.

        The OP listed learning Perl/Tk as an essential step, as if it were the ONLY possible solution for GUIs with perl, and that's clearly not the case. There's also PerlQt. Like all things perl, TMTOWTDI.

        I'd absolutely not proclaim Wx to be better than Tk.

        Read carefully

Re: Begin Your Skyscraper
by Anonymous Monk on Aug 11, 2011 at 14:20 UTC

    Walk the walk before you talk the talk. There are enough self proclaimed experts in this world right now to last multiple lifetimes. You do yourself no favors by trying to parrot what you've read from others rather than dedicate the time actually understanding what is being said.

    It's great that you want to contribute to the community. Don't lose that enthusiasm but maybe channel it into actually becoming that expert by spending a little more than a few weeks learning to program. Then everyone will benefit.

Re: Begin Your Skyscraper
by runrig (Abbot) on Aug 11, 2011 at 17:49 UTC
    I believe Learning Perl/Tk is unneccessary because it was incorporated into and superceeded by Mastering Perl/Tk.
Re: Begin Your Skyscraper
by sundialsvc4 (Abbot) on Aug 11, 2011 at 14:14 UTC

    Another good advice would be:   “approach Perl in the greater context of ‘a tool for professional-grade software development.’ ”   Your real focus needs to be upon the latter.   “A tool for a job,” is not “the job.”   (Translation:   No matter if you buy me the most dazzling titanium framing-hammer in the known universe, and the most idiot-proof computerized measuring tool, I know to hire a contractor to install a new window.   Hand tools are dangerous in my hands, but I make good money as a computer programmer, and with that money I hire people who know what they are doing.)   Perl is “a damn good tool,” yet, it is only one of many.

    Programmers on-the-job are constantly confronted with things they don’t know; with incomplete descriptions of failures that are unexplained and poorly described.   They are constantly detectives and investigators.   They are doing things of profound importance to their employers’ core business, using technology that is remarkably delicate and unforgiving.   Hence, their personal traits are as much or more important than whatever their technical competencies may be.

    “Study CPAN” is excellent advice, but not only for the code itself:   also, for the process by which it got there and stays there.   This is peer-reviewed code, constantly cross-checked by tools like CPANTS, widely used as, as it were, a software product.   If you can train yourself to produce work at that level, and to be recognized for doing so by your new appreciative end-users (who, by the way, have requested forty-’leven new features...), then you have demonstrated the ability to do deliver something that is very commercially valuable indeed.

Re: Begin Your Skyscraper
by Anonymous Monk on Aug 11, 2011 at 22:41 UTC

    My only tip, a one word recommendation for learning Perl ... wait for it ...

    Praxis

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-03-28 18:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found