Re: Coding best practices

2009-08-19 Thread Shlomi Fish
On Friday 14 August 2009 16:18:38 Shawn H. Corey wrote: > Shlomi Fish wrote: > > My recent impression of most Perl programmers has been the opposite - > > most of them have been too lazy or unmotivated to learn about the perl -d > > flag (or similar interactive debuggers), and are always using prin

Re: Coding best practices

2009-08-14 Thread Jenda Krynicky
From: "Shawn H. Corey" > I use Data::Dumper a lot, so most of my debugging statements have > "Dumper" in them, making them easy to find. For those that don't, I add > "# TEMPORARY" at the end. And I leave them behind; I just put a "#" in > front of them. :) I tend to not indent them. So they

Re: Coding best practices

2009-08-14 Thread Randal L. Schwartz
> "Steve" == Steve Bertrand writes: Steve> Interesting. So, print is a debugging tool that does a complete full Steve> circle. Many on the list have helped me with using different debug Steve> techniques which have greatly helped me advance my understanding of what Steve> my code is actually

Re: Coding best practices

2009-08-14 Thread Randal L. Schwartz
> "Steve" == Steve Bertrand writes: SB> - what in God's name is Abigail's last name? >> >> '' (the answer to your question) Steve> I knew pretty much for fact that this would be the answer, but honestly, Steve> I wanted to know how you would write the empty string, without thinking Steve> a

Re: Coding best practices

2009-08-14 Thread Shawn H. Corey
Chas. Owens wrote: On Fri, Aug 14, 2009 at 10:20, Shawn H. Corey wrote: snip Komodo doesn't work on my machine and since it's propriety, I can't get its source to compile it. snip Odd, it works just fine on my OS X box, my Linux box, and I hear it works in MS Windows. You must be using a flav

Re: Coding best practices

2009-08-14 Thread Shawn H. Corey
Chas. Owens wrote: On Fri, Aug 14, 2009 at 09:59, Shawn H. Corey wrote: Chas. Owens wrote: Are you using a visual debugger or a commandline debugger? Command line, they didn't have visual debuggers back then. :) snip Why, back when I was a lad we had to debug things by checking the [waveleng

Re: Coding best practices

2009-08-14 Thread Chas. Owens
On Fri, Aug 14, 2009 at 10:20, Shawn H. Corey wrote: snip > Komodo doesn't work on my machine and since it's propriety, I can't get its > source to compile it. snip Odd, it works just fine on my OS X box, my Linux box, and I hear it works in MS Windows. You must be using a flavor of BSD other tha

Re: Coding best practices

2009-08-14 Thread Chas. Owens
On Fri, Aug 14, 2009 at 09:59, Shawn H. Corey wrote: > Chas. Owens wrote: >> >> Are you using a visual debugger or a commandline debugger? > > Command line, they didn't have visual debuggers back then. :) snip Why, back when I was a lad we had to debug things by checking the [wavelength of the RF

Re: Coding best practices

2009-08-14 Thread Shawn H. Corey
Chas. Owens wrote: Are you using a visual debugger or a commandline debugger? I find this makes all of the difference in the world. Try downloading a trial version of [Komodo IDE][1] or using [ddd][2]. I detest IDEs, but visual debuggers are incredibly more useful than commandline debuggers, a

Re: Coding best practices

2009-08-14 Thread Shawn H. Corey
Chas. Owens wrote: Are you using a visual debugger or a commandline debugger? Command line, they didn't have visual debuggers back then. :) -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. I like Perl; it

Re: Coding best practices

2009-08-14 Thread Chas. Owens
On Fri, Aug 14, 2009 at 09:18, Shawn H. Corey wrote: snip > The last time I used a debugger was on a large C project. For small > programs and unit testing, it was fine, but when things went over 2000 > lines, it became increasingly frustrating to use. Of course, print > statements have their lim

Re: Coding best practices

2009-08-14 Thread Shawn H. Corey
Shlomi Fish wrote: My recent impression of most Perl programmers has been the opposite - most of them have been too lazy or unmotivated to learn about the perl -d flag (or similar interactive debuggers), and are always using print's or going on IRC asking "What is wrong with this code?" I find

Re: Coding best practices

2009-08-14 Thread Peter Scott
On Fri, 14 Aug 2009 00:52:24 -0400, Chas. Owens wrote: > I have seen the opposite: too many coders sticking with print instead of > picking up a debugger when the situation called for one. I tend to > debug with a combination of looking at the code, logs, and print > statements, but a good visual

Re: Coding best practices

2009-08-13 Thread Steve Bertrand
Chas. Owens wrote: > On Fri, Aug 14, 2009 at 00:21, Uri Guttman wrote: > snip >> i started with punch cards. print was all you had besides thorough and >> deep analysis of your code. that is a talent lost on too many coders >> today. and even today proper use of print is better than any debug >> to

Re: Coding best practices

2009-08-13 Thread Steve Bertrand
Chas. Owens wrote: > On Fri, Aug 14, 2009 at 00:21, Uri Guttman wrote: > snip >> i started with punch cards. print was all you had besides thorough and >> deep analysis of your code. that is a talent lost on too many coders >> today. and even today proper use of print is better than any debug >> to

Re: Coding best practices

2009-08-13 Thread Shlomi Fish
On Friday 14 August 2009 07:21:00 Uri Guttman wrote: > > "SB" == Steve Bertrand writes: > >> i don't use it but i know plenty who do and it seems to be a good > >> idea. i would recommend it for most perl hackers and if you want to > >> enforce a known set of coding styles. i strongly en

Re: Coding best practices

2009-08-13 Thread Uri Guttman
> "CO" == Chas Owens writes: CO> On Fri, Aug 14, 2009 at 00:21, Uri Guttman wrote: CO> snip >> i started with punch cards. print was all you had besides thorough and >> deep analysis of your code. that is a talent lost on too many coders >> today. and even today proper use of print

Re: Coding best practices

2009-08-13 Thread Chas. Owens
On Fri, Aug 14, 2009 at 00:21, Uri Guttman wrote: snip > i started with punch cards. print was all you had besides thorough and > deep analysis of your code. that is a talent lost on too many coders > today. and even today proper use of print is better than any debug > tool. but it is still a skill

Re: Coding best practices

2009-08-13 Thread Steve Bertrand
Uri Guttman wrote: >> "SB" == Steve Bertrand writes: > > SB> Uri Guttman wrote: > >> > >> i wish i could understand my comments better! :) > > SB> Your name came up in "Perl Best Practices" (along with many > SB> others). You also made me realize that the use of $_ in a > SB> pa

Re: Coding best practices

2009-08-13 Thread Uri Guttman
> "SB" == Steve Bertrand writes: SB> Uri Guttman wrote: >> >> i wish i could understand my comments better! :) SB> Your name came up in "Perl Best Practices" (along with many SB> others). You also made me realize that the use of $_ in a SB> particular code snip was not a good id

Re: Coding best practices

2009-08-13 Thread Steve Bertrand
Chas. Owens wrote: > On Thu, Aug 13, 2009 at 20:25, Steve Bertrand wrote: > snip >> - is "Perl Best Practises" what most of you use as general guidelines? >> IOW, if I continue reading it, will you be able to better understand my >> code (even though I stick with a few _small_ personal techniques)?

Re: Coding best practices

2009-08-13 Thread Chas. Owens
On Thu, Aug 13, 2009 at 20:25, Steve Bertrand wrote: snip > - is "Perl Best Practises" what most of you use as general guidelines? > IOW, if I continue reading it, will you be able to better understand my > code (even though I stick with a few _small_ personal techniques)? From > what I've read so

Re: Coding best practices

2009-08-13 Thread Steve Bertrand
Uri Guttman wrote: >> "SB" == Steve Bertrand writes: > > SB> - is "Perl Best Practises" what most of you use as general guidelines? > SB> IOW, if I continue reading it, will you be able to better understand my > SB> code (even though I stick with a few _small_ personal techniques)? From

Re: Coding best practices

2009-08-13 Thread Uri Guttman
> "SB" == Steve Bertrand writes: SB> - is "Perl Best Practises" what most of you use as general guidelines? SB> IOW, if I continue reading it, will you be able to better understand my SB> code (even though I stick with a few _small_ personal techniques)? From SB> what I've read so far

Coding best practices

2009-08-13 Thread Steve Bertrand
There are many senior (ie. *very* *very* respected/acknowledged in the community), Perl programmers on this list, who still take the time to answer questions on what may seem like an insignificant list. Many of these people have helped me, even directly. The more I read the books, the more I appr