Re: Free Perl IDE for a begginer
by fenLisesi (Priest) on Jan 12, 2008 at 12:21 UTC
|
karpatov,
Many monks use GNU emacs or vi along with the Perl debugger, but ActiveState products are probably closer to what you are after. Some of their products are available free of charge, but you must see for yourself whether those are enough for you. You may find the ones that are only available for a fee affordable, too.
Why don't you post more of those problems here, by the way? Let the Monks Collective work for you.
You can use Super Search on this site or google for something like site:perlmonks.org IDE (and choose recent nodes) to come up with threads such as What's the best Perl IDE?, which probably has good pointers for you.
Hope this helps. Cheers.
| [reply] |
|
Thanks for reply.
I will have a look at those tools.
I already asked some question a few days ago and got many useful suggestions just during a few hours. In fact the nice stance towards the beginners I experienced is one of the reason why I am considering learning some Perl although its syntax is really scaring for me (especially when I saw a few code chunks written by Perl and Python side by side :-)).
karpatov
| [reply] |
|
Perl often lets you code the way you want to code and it is easy to abuse that, especially for the kind of "comparison" that you mentioned. It should be easy to provide counter examples. If you are concerned about how "standard" your code will look, you may want to
- use strict;
- use warnings;
- get suggestions from Perl::Critic
- get indentation and other formatting help from perltidy
Actually, the first two are more like you should, no matter what you want, until you become an expert.
Keep the questions coming. Cheers.
| [reply] [d/l] [select] |
|
|
try the ptkdb debugger ptkdb found at ptkdb.sourceforge.net
I run it as follows:
perl -d:ptkdb your_program_name_here.pl
Terence
| [reply] |
|
|
Re: Free Perl IDE for a begginer
by bastard (Hermit) on Jan 12, 2008 at 14:34 UTC
|
Hello karpatov,
You'll likely find that much of the community here uses either vi or emacs primarily because they're simple and stay out of your way. One of the problems with fancier IDEs is in addition to learning the language you also have to learn the ide.
I'm aware of these in the way of Perl IDEs although I haven't really used them (i use vi myself).
Open Perl IDE - it appears simple and straighforward with breakpoints
http://open-perl-ide.sourceforge.net/
I've heard good things about Active states Komodo, but the IDE with debugging is somewhat pricey. There is also now a stripped down version of just the editor. Here are the URLs:
http://www.activestate.com/Products/komodo_edit/
http://www.activestate.com/komodo_ide
What I liked about perl from the beginning is it doesn't require you to program any specific way. (Many here may faint at what i'm about to say). When i started programming perl every variable was global and the entire programs I was writing were generally procedural in nature. No subroutines, and yes even a few gotos. Over time I started packaging things into subroutines just for convenience but still exclusively used global variables. Eventually I made the switch to scoped variables and did away with the globals. Then came the creation and use of objects, then CPAN, etc... At times I still find myself using the trusty print statement to drop variable states to the terminal.
I would suggest the following: (much in agreement with fenLisesi)
1. Make sure you put the line "use strict;" on about the second line of the program. It will make programming issues much more apparent.
2. Follow up that line with "use warnings;" it will provide convenient tips when you are straying a bit.
3. When getting started use a short code to test routine. Only add a few lines, save and run to verify that the next step works. With perl its trivial to do unlike compiled languages.
4. Keep it simple. Try to keep subroutines small. The larger they are the more that can go wrong inside them. Once a subroutine is finished and working, you can move elsewhere and trust you won't break whats inside it.
5. If you get truly stumped, write a separate test program to work out just the current problem. I often do this when trying out a new module or data structure that won't cooperate. Often i'll start by making the sample code thats usually in the module documentation work. Then tweaking it in small ways to get a feel for how it operates. Once you get whatever you were trying to do working you can then move that working code into a subroutine back in the main application.
6. The final one that I nearly forgot since I don't use it anymore is a decent syntax reference whether its a good website or perhaps a pocket oreilly perl reference book.
Hope it helps!
Update:
I forgot one of the most essential debugging tools:
Data::Dumper
You can stick nearly any data structure into it and get a decent picture of whats in it (objects not so much).
| [reply] |
Re: Free Perl IDE for a begginer
by starX (Chaplain) on Jan 12, 2008 at 20:14 UTC
|
I almost can't believe no one's suggested this to you, but have you looked at Beginning Perl for Bioinformatics? From the description: "This book shows biologists with little or no programming experience how to use Perl..."
Seems to me like a good place to start for you, but I must add the disclaimer that I am not a biologist, and I've never picked up this book myself. It might be worth checking out though.
Also, I stand by the folks that talk about emacs (especially with cperl mode installed) and the command line perl interpreter as being the way to go. use strict; and use warnings;, get the feel of the perl debugger, and make ample use of the chatterbox and SOPW, and I'm sure you'll be fine. | [reply] [d/l] [select] |
|
I am just looking for some description of functionalities of the recommended programs and it seems that all the recommendations are big improvements over my current technique (syntax highliting editor + bat files (*.pl and pause) to run the script in cmd. Thanks for help.
In fact I am aware of the book (Beginning Perl for Bioinformatics) and I can even recommend it. It is almost 5 years since I had to do some DNA/protein sequence manipulation and when looking whether there was a way how to automate I stumbled against the book (online,link dead now). It demonstrated perl syntax/structures/techniques on the problems of my interest as examples, so I just had to get oriented a little (the book is really clearly written), slightly modify and put together relevant chunks of the code (a matter of one week time). But since I forget everything and only notion remained that perl is good for string manipulation (which is of interest for me again now). The book had one drawback thought - there was to much molecular biology explained for a molecular biologist`s taste, so I will go for Learning Perl and Getting Started with Perl recommended by trialmonkey. thanks
karpatov
| [reply] |
Re: Free Perl IDE for a begginer
by misc (Friar) on Jan 12, 2008 at 12:38 UTC
|
Hi,
since you are writing about your troubles with programming at all,
this is not what you've asked for, but I'll try to explain how I program in short..
I prefer to write my scripts with vi.
It's very powerful, and you'll be able to edit you scripts much faster than with the common ide's. (it also has indentation, of course)
I'm very seldom using a debugger,
if there are troubles, I normally just insert some print statements instead, both to just show me in which line the execution is as well as to print some expression's values.
You can look through the output very fast if the script is running, instead of having to watch some variables at the right time.
I guess it's also a matter of the structure of thinking: I need to think about what WILL happen at runtime - and if there are troubles, what will happen at the next runtime and where to insert some print statements.
If you are used to a debugger, you will most likely just fire your script and watch some expressions, which show you then what HAS happened.
Instead of having to think in the whole context, you are able to look at separated parts.
This way there is no need to have the whole script's structure in your mind, instead you are able to change the separated parts to finally do what you want.
Programming is a kind of riddle to me, which is pure fun to solve.
And I guess this has something to do with how you think while programming, using a debugger always prevented me from thinking enough.
| [reply] |
|
Thanks for reply.
In fact I used print(variable) system in R (before I found Sci-views), but I was always craving for the possiblity to have a graphical interface allowing to follow values of selected variables line by line - usually the error was caused by some problem well before the line causing program crashed. So having IDE with this capabilities would be nice.
There is no danger that I would become a programming expert enjoying the beauty of the solutions. Too late for me. For me it will be always a mean to get the things done. Is the code ugly? Is it slower than necessary? I don`t care, it works and I can use the output for solving the relevant biology. Are there some general programming tips for the Seekers Of The Way Of The Lowest Resistance like me :-)?
karpatov
| [reply] |
|
I'm no expert.
I just have fun with programming..
But, ugly code is awful.
And definitely not the way of the lowest resitance.
Why ?
I believe you can do fast and simple hacks - which will work and do what you want.
But, if you e.g. instead of writing some functions, modules, .. , just hack a script with a few hundred lines without a structure at all, it will work now - but it's extremely hard to maintain such a thing.
So instead of thinking about a concept - which needs some time -, and having the experience that it's possible to materialize your thoughts in a program, you just hack it down. And if there are needed changes in the script (as always), the script will get uglier and uglier - until you don't know anymore at all what the heck is happening in your program. Which is quite frustrating, time expensive, and you'll need a debugger(.-)).
On the other hand I've always made the experience that some thoughts about the structure before starting to code pay out.
It's a great feeling to me to find solutions - and you'll be able to change your scripts with much less work.
So I'd like to propose structured and well thought solutions - Although perhaps this could seem like unneccessary work
Have fun :-)
| [reply] |
Re: Free Perl IDE for a begginer
by boojeboy (Novice) on Jan 12, 2008 at 21:12 UTC
|
Has anyone mentioned Eclipse with the EPIC plug in?
I like it as much (or more) than Activestate's product...
| [reply] |
Re: Free Perl IDE for a begginer
by trialmonkey (Hermit) on Jan 12, 2008 at 17:49 UTC
|
In my experience many beginners spend too much time watching code in an IDE, and not enough time learning how to program in the language.
Might I suggest spending some time with Learning Perl and/or Getting Started with Perl to improve your skills. This will pay dividends regardless of the editor you choose.
| [reply] |
Re: Free Perl IDE for a begginer
by hungry_john (Acolyte) on Jan 12, 2008 at 17:39 UTC
|
Pardon me but I couldn't resist:
"biologist forced to do some programming"
Evolution in action, right before me eyes.
The confusion of evolution.
Who will survive? The programmer or the biologist?
My guess is the programmer will survive and the biologist
will go extinct.
Back to the matter at hand:
I found these videos on YouTube that help me alot.
"http://video.google.com/videosearch?q=perl+tutorials&hl=en&sitesearch="
I am really looking forward to seeing some of your code.
I am writing simple code that seeks data on the Web, processes it and either loads my databases or disgards the waste. From the database a bunch of triggers fires and makes my computer jump up and down. Ha ha ha.
Eat, drink and be merry. My favorite biological algorithm.
DNA is an antenna.
| [reply] |
Re: Free Perl IDE for a begginer
by assemble (Friar) on Jan 13, 2008 at 20:14 UTC
|
My favorite editor right now, is vim; however, that's not really an IDE. There is a windows version, but I prefer Komodo Edit on Windows.
Komodo Edit says that it's a text editor, but it does quite a bit more. It can be linked to the perl interpreter and can emulate vim commands, so it's very powerful. There is also the Komodo IDE, but I haven't used it, and it isn't free, so I can't comment on it.
A lot of people like Eclipse with the EPIC plugin. (EPIC has the Perl extensions for Eclipse.) It can also be linked to Perl, and has a lot of nice features. It's written in Java, so it can eat a bunch of resources sometimes, but it can run on lots of platforms.
| [reply] |
|
I second the Eclipse with EPIC plug-in! IMHO only better thing for Perl is ActiveStates Komodo which I would probably use if it had better support for XHTML, CSS and JavaScript (no fancy WYSIWYG - just code completion).
As of using a lot of "performance sometimes" - it's actually pretty good if you ask me. Until recently I was running it on a PIII 850 Mhz and 256 MB of RAM Compaq laptop dating back to '99 I think - admitted, I used Gentoo + XFCE for it. And it slowed down only after I started Opera, Apache and MySQL :D
While not the most scientific test ...
alex@msi ~ $ free -m
total used free shared buffers cached
Mem: 2018 685 1332 0 135 207
-/+ buffers/cache: 342 1675
Swap: 2175 0 2175
>>> Here I started Eclipse 3.4 with both Aptana (html/css...) and EPIC (perl) plug-ins active.
alex@msi ~ $ free -m
total used free shared buffers cached
Mem: 2018 910 1108 0 138 301
-/+ buffers/cache: 470 1547
Swap: 2175 0 2175
alex@msi ~ $
Have you tried freelancing? Check out Scriptlance - I work there. For more info about Scriptlance and freelancing in general check out my home node.
| [reply] |
|
I was going to say that maybe it's just my old laptop not liking it, but your laptop specs are worse :-O
Windows doesn't seem to like Java very much in general, that's probably why it felt a bit sluggish to use and ate up a ton of memory. In fact, I don't think Windows gets along with any Java apps I've seen... One of these days I might back all the junk up from that laptop and see how much it likes linux...
| [reply] |
Re: Free Perl IDE for a begginer
by jbullock35 (Hermit) on Jan 13, 2008 at 11:22 UTC
|
I am a biologist forced to do some programming (I have some experience with R and VBA)
You might want to look for an IDE that has hooks for both R and Perl. Eclipse, WinEdt, and emacs are the options that come to mind. If you go with Eclipse, see StatET; for WinEdt, see the R-WinEdt package; for emacs, see ESS.
That said, I haven't found anything that's great for both programs. I use emacs for R and Komodo IDE for Perl and switch back and forth all the time. (If you want to try Komodo IDE and are in academia, ask about the educational discount, which is very substantial.)
| [reply] |
|
More or les off-topic to Perl:
As for R I am using both Tinn-R and Sci-Views and I am quite happy with this combination. But when I have time I will check the ones you mentioned. Definitely would be nice to have one IDE for both languages. Thanks.
| [reply] |
Re: Free Perl IDE for a begginer
by pemungkah (Priest) on Jan 13, 2008 at 02:40 UTC
|
If you're on a Mac, Affrus http://www.latenightsw.com/affrus/ is really quite good, and does indeed have the variable watching implemented exactly as you prefer. Not free though - $99.
I seem to recall at least one Perl/Tk graphical debugger, but getting it running is nontrivial. | [reply] |
Re: Free Perl IDE for a begginer
by DarkLord1 (Novice) on Jan 14, 2008 at 02:20 UTC
|
I am fond of SourceForge's PerlIDE (Perl Integrated Development Environment).
I have also used the more powerful Komodo by ActiveState (who also provide the open source versions of Perl); but in its open source form it is pretty limited; you have to pay a modest amount to get the more powerful one.
PerlIDE has a good debugger and the ability to set watch variables, break points, etc. It also has a nice feature (not unusual for most IDE's, but nice nonetheless) that once you reach a breakpoint, just mousing over a variable anywhere in the code that has already run will give you a pop-up bubble that shows its value. That means that many of the quick checks can be done without having to set watch variables.
The IDE is easy to use (it has documentation, but I have found that it is not all that great and the package is largely intuitive and self-explanatory so the weak documentation is not much of a problem. The only drawback that I have found is that I can't figure out how (if there is a way at all) to easily do command-line running of scripts from within the IDE. Komodo, on the other hand, supports such a capability very nicely.
DarkLord1
Looking for Redemption in the Monastery
| [reply] |
Re: Free Perl IDE for a begginer
by sshahar1 (Initiate) on Jan 13, 2008 at 09:37 UTC
|
I like Perl Express, I think it can be helpful to beginners
| [reply] |
Re: Free Perl IDE for a begginer
by systems (Pilgrim) on Jan 13, 2008 at 21:55 UTC
|
well, I have like two advices.
1) you will be spending a lot of time learning perl and thinking about your program design, so dont pick a tool/editor/ide that have a high learning curve, it will distract you.
2) no matter what you pick, even if later you feel you made a bad choice, just stick with it (and try to ignore that feeling) for as long as you find it bareable, you will be wasting more time looking for a different tool.
I've been looking for the best most amazing free open source editor since for ever now, and I've never found it, it doesn't exist (I think). I am surely addicted, I can never stop myself from trying free editors/ides. I couldn't even stop myself from replying to this node. I should probably join some text-editor or ide anonymous group (*grin*).
There will always be something you don't like about the ide or editor your use, maybe this is why there exists so many. So many people have tried!
Ahh! also you should check Scite , it integrates nicely with Perl | [reply] |
Re: Free Perl IDE for a begginer
by Anonymous Monk on Jan 14, 2008 at 21:29 UTC
|
karpatov, you mention that you want a debugger, but Perl already comes with one, so I'm guessing you want a GUI debugger. That limits your choices somewhat, since many free software users just use the terminal-based one (when necessary -- and lots of devs only very infrequently use a debugger).
You can use Emacs, along with debugger integration, but it will take some effort on your part.
If you want to put in near zero effort, have a nice GUI debugger, and also a slew of other fancy features, you probably want the Komodo IDE. The people who develop Komodo are paid to make your life easier.
Eclipse is also an option, but personally I can't stand it. It's huge, slow, has (IMO) an awful editor component, and isn't as easy to use as it should be.
| [reply] |
|
well, I never tried the komodo ide, but I downloaded and checked their new free komodo editor.
if anything its slooooooow, if the komodo ide is anything like it, it will have to be a lot slower than eclipse.
| [reply] |
|
Yeah, Komodo (the editor and also the full IDE) and Eclipse are both slow. I haven't done a side-by-side comparison of the two to see which is slower though.
That said, the OP sounds new at this, and probably won't be pushing the limits of rapid text editing, so the speed should be ok for him.
If you want a full-featured IDE for Perl that's easy to use and has a lot of power IDE features (GUI debugger, code browser, regex helper tool, projects, snippets, macros, templates, and so on), then I think Komodo is a good compromise.
I don't want to sound like an advertisement for it though. I'd prefer the OP use completely free software tools. But at least ActiveState has been good for the community in general, and the editor component of Komodo is licensed under some sort of open source license.
| [reply] |
|
|
|