Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Further to this non-article (476795) that I'm not going to write, I've been working through O'Reilly's "Java Examples in a Nutshell" exercises in Eclipse 3.1 with Java 5 (or 1.5 or 2.0 or J2SE, I wish Sun would sort their versioning out and have their marketing department shot). I also tackled some 1000-point questions on TopCoder in Java. Some of them are actually difficult (admittedly usually because of the physics or numerical analysis involved and not for the language contortions). On TopCoder I also saw more C#/.NET code. (I’m interested to know why there is a fork from Ruby to C# in the levenez’s language history - haven’t quite worked that out)

The biggest differences in workflow that I've noticed, apart from the Java code being on average about four times as verbose as the equivalent Perl code (and Java 5 language proper approaching the design of C++ at an alarming rate), I think comes from the some of the niceties of the Eclipse IDE.

I’m no emacsian-master by a long shot. To come clean, I’ve actually been using EditPlus2 on a Windows client machine to edit my Perl code. I started out using WIMP GUI IDEs 15 years ago and never got out of the habit. I think it has something to do with that whole “recognition vs recall” thing - and I have a short memory sometimes.

Being more specific:

In Eclipse you have a javadoc window open that follows your cursor. Whenever you go over a symbol in your source it displays the documentation associated with that given symbol (by looking at the symbol’s source code and parsing out the comments like perldoc). You can also go to the Type Hierarchy and get a tree of the sub/superclasses of the class you are looking at (with methods). After you type a class name or instance identifier in the source you can hit CTRL-space and it will give you a drop down menu of all the methods it has. You can select one and it types the function name for you.

Why not something similar in Perl? Or what is some of the equivilant in Perl IDEs (emacs for example)? Take Set::Object for example. My usual workflow would be to cpan install module, copy and paste the Synopsis into my code and then munge it into what I need, and then hopefully remember the API if I need to use it again.

I’m sure there must be equivilant magic in Perl-land.

I guess my question would be how do you work with a new foreign API in Perl? Is it a matter of studying the entire module's perldoc in a seperate window and then retaining that information when writing your source? Is there a way in your Perl IDE (eg emacs) to get to the documentation of a given package or blessed reference at the cursor?

More generally, what are some of the tricks you use to do things that offer the same benefits as the features of a recognition-based IDE?

As a specific example using Set::Object - Let's suppose you wanted to use it but didn't know anything about it. Can you describe in detail your workflow of acquiring and using the API through your Perl environment?

-Andrew.


Andrew Tomazos  |  andrew@tomazos.com  |  www.tomazos.com

In reply to Perl IDE and New Foreign APIs by tomazos

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2024-04-19 14:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found