BastardOperator has asked for the wisdom of the Perl Monks concerning the following question:
I consider myself to be an o.k. Perl programmer. As in most things that I do, I long to be the best that I can. I recently posted a reply to a question "Single-machine IPC via sockets" and other things to say in the dark in which I gave example code for using Unix domain sockets.
merlyn replied with the following:
"Ahh, this uses the ugly %SIG-handler code that breaks servers sooner or later. There are better ways to reap kids. I have a few samples in my columns. Best look for examples that use a no-wait waitpid at strategic points in the top-level loop."
Excellent! I learned something today (as I do most days :^) ). The thing is, where does one find information like this. I'm not a computer scientist, I haven't studied algorithms, I don't know too much about the BigO theory, and I don't have a ton of programming experince (~ 1year). So, where do I find this stuff out ahead of time? I've got a couple programs with that "ugly %SIG-handler code" running currently, and I would've continued the same way had merlyn not said anything.
Is a book like Advanced Perl Programming the answer? Or is it really just a matter of experience, having things break or not work optimally, before I'll know and be able to spot these things ahead of time? I try to keep up with the newsgroups and this site, but apparently there's some things that I've missed. I'd love an all-inclusive answer, but 50 url's to web-sites would do :^).
merlyn replied with the following:
"Ahh, this uses the ugly %SIG-handler code that breaks servers sooner or later. There are better ways to reap kids. I have a few samples in my columns. Best look for examples that use a no-wait waitpid at strategic points in the top-level loop."
Excellent! I learned something today (as I do most days :^) ). The thing is, where does one find information like this. I'm not a computer scientist, I haven't studied algorithms, I don't know too much about the BigO theory, and I don't have a ton of programming experince (~ 1year). So, where do I find this stuff out ahead of time? I've got a couple programs with that "ugly %SIG-handler code" running currently, and I would've continued the same way had merlyn not said anything.
Is a book like Advanced Perl Programming the answer? Or is it really just a matter of experience, having things break or not work optimally, before I'll know and be able to spot these things ahead of time? I try to keep up with the newsgroups and this site, but apparently there's some things that I've missed. I'd love an all-inclusive answer, but 50 url's to web-sites would do :^).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Perl secrets
by merlyn (Sage) on Sep 14, 2000 at 03:54 UTC | |
by BastardOperator (Monk) on Sep 14, 2000 at 04:08 UTC | |
by merlyn (Sage) on Sep 14, 2000 at 04:15 UTC | |
by mirod (Canon) on Sep 14, 2000 at 04:18 UTC | |
by tilly (Archbishop) on Sep 14, 2000 at 07:45 UTC | |
Re: Perl secrets
by tye (Sage) on Sep 14, 2000 at 07:22 UTC | |
RE: Perl secrets
by swiftone (Curate) on Sep 14, 2000 at 19:09 UTC | |
by adamsj (Hermit) on Oct 08, 2000 at 01:15 UTC | |
RE: Perl secrets
by jlawrenc (Scribe) on Sep 14, 2000 at 21:45 UTC |
Back to
Seekers of Perl Wisdom